资源描述
迈普S3024B交换机配置命令
用户名:admin
密码:admin
一、还原出厂设置:
login:admin
password:
Switch>enable
Switch#file
Switch(config-fs)#dir ······························查看文件目录
size date time name
-------- ------ ------ --------
0 JAN-01-2098 00:34:32 LOGGING
1830815 JAN-01-2098 00:05:30 30XXB.Z
160 JAN-01-2098 00:03:16 PSTCONF.BAK
4591 JAN-01-2098 00:02:54 HISTORY
STARTUP.BAK
STARTUP
160 JAN-01-2098 00:01:58 PSTCONF
Switch(config-fs)#delete startup ·······················删除交换机配置文件
Switch(config-fs)#restore······························重新启动
二、保存命令:
Switch>en·······························普通用户模式en进入特权模式
Switch#write·····························在特权模式下write保存数据
Switch (config)#hostname nn-taoyuanting····在全局模式下配置交换机名称
三、查看数据
在特权模式及全局模式下都能使用show 命令查看
1、查看所有配置
Switch#show run (show running-config)
Switch(config)# show run (show running-config)
2、查看 vlan 及所属端口
Switch(config)#sh vlan (show vlan)dis vlan
---- ---- -------------------------------- -----------------------------------
NO. VID VLAN-Name Port Number
---- ---- -------------------------------- -----------------------------------
1 1 default [U] 0/0 0/1 0/2 0/3 0/4
0/5 0/6 0/7 0/8 0/9
0/10 0/11 0/12 0/13 0/14
0/15 0/16 0/17 0/18 0/19
0/20 0/21 0/22 0/23
2 100 boss [U] 0/1 0/2 0/3 0/4 0/5
[M] 0/0
3 200 boss2 [U] 0/6 0/7 0/8 0/9 0/10
[M] 0/0
4 300 boss3 [U] 0/11 0/12 0/13 0/14 0/15
[M] 0/0
四、配置交换机管理IP
Switch>en
Switch#con f
Switch(config)#interface sw0
Switch(config-if-sw0)#ip address 192.168.100.5 255.255.255.0 ········交换机管理IP192.168.100.5
设置telnet登陆密码
五、新交换机配置
1、新建vlan
Switch#con f ···········进入全局模式
Switch(config)#vlan 200 ···········新建vlan200
Switch(config-vlan200)# ···········进入vlan200端口模式
2、给vlan配置指定上行口及划分端口
Switch#vlan 200 ···········进入vlan200 端口
Switch(config-vlan200)#port 0/0 tagged 打标签 ···········把0/0以太网口设置为vlan200上行口
Switch(config-vlan300)#port 0/0 tagged
Switch(config-vlan39)#port 0/0 tagged
Switch(config-vlan200)#port 0/1-0/5 untagged ···········把交换机0/1至0/5端口分给vlan 200做非标 识端口
Switch (config)#port 0/1-0/5 ···········进入0/1-0/5组端口
Switch (config-port-range)#pvid 200 ···········给该组端口添加vlan 值200
或者
Switch (config)#port 0/1 ··········进入0/1端口
Switch (config-port-0/1)#pvid 200 ··········给该端口添加vlan 值200
2、添加路由
Switch (config)#ip route 0.0.0.0 0.0.0.0 192.168.100.1 ··把所有IP数据全部指向网关192.168.100.1
【switch】
六、删除及更改命令
1、更换vlan 把boss vlan 14改为boss vlan 40 把0/9端口vlan值改为40
vlan 1
description default
port 0/0-0/23 untagged
vlan 14
description boss
port 0/0 tagged
port 0/1-0/8 untagged
vlan 21
description cmnet
port 0/0 tagged
port 0/9-0/15 untagged
exit
!slot 0
port 0/1
pvid 14
exit
port 0/2
pvid 14
exit
port 0/3
pvid 14
exit
port 0/4
pvid 14
exit
port 0/5
pvid 14
exit
port 0/6
pvid 14
exit
port 0/7
pvid 14
exit
port 0/8
pvid 14
exit
port 0/9
pvid 21
exit
port 0/10
pvid 21
exit
port 0/11
pvid 21
exit
port 0/12
pvid 21
exit
port 0/13
pvid 21
exit
port 0/14
pvid 21
exit
port 0/15
pvid 21
exit
!
interface loopback0
ip address 127.0.0.1 255.0.0.0
exit
interface sw0
ip address 10.182.133.78 255.255.255.128
vlan-id 14
exit
snmp-server enable
snmp-server view internet 1.3.6.1 include
snmp-server community nnboss view internet ro
snmp-server engineID local 800016130300017a493601
ip route 0.0.0.0 0.0.0.0 10.182.133.1
1、操作(更换vlan 把boss vlan 14改为boss vlan 40)
s3024B(config)#vlan 40
s3024B(config-vlan40)#des
s3024B(config-vlan40)#description up-boss
s3024B(config-vlan40)#port 0/0 tagged
s3024B(config-vlan40)#port 0/1-0/8 untagged
s3024B(config-vlan40)#exit
s3024B(config)#no vlan 14
s3024B(config)#port 0/1-0/8
s3024B(config-port-range)#pvid 40
s3024B(config-port-range)#
2、操作(把0/9端口vlan值改为40)
s3024B(config)#vlan 21
s3024B(config-vlan21)#no port 0/9
s3024B(config-vlan21)#exit
s3024B(config)#vlan 40
s3024B(config-vlan40)#port 0/9 untagged
s3024B(config-vlan40)#exit
s3024B(config)#port 0/9
s3024B(config-port-0/9)#pvid 40
s3024B(config-port-0/9)#
展开阅读全文