浪潮网络交换机快速使用手册

1 如何登陆设备

PC使用串口线缆连接交换机的Console口,波特率设置为115200。

2 如何配置带外管理地址

举例:配置交换机带外管理地址为192.168.1.1/24,网关192.168.1.254

#进入全局配置模式
Switch# confiqure terminal
#禁用管理口DHCP功能
Switch(config)# no management ip address dhcp
Switch(config)#management ip address 192.168.1.1/24 gateway 192.168.1.254

3 如何配置用户

举例:为交换机添加帐号,名称admin密码inspur@123优先级4。

#进入全局配置模式
Switch# configure terminal
#添加账号
Switch(config)# username admin privilege 4 password inspur@ 123

4 如何配置SSH登录

#进入全局配晋模式
Switch# configure terminal 
#使能SSH服务
switch(config)# ip ssh server enable

5 如何配置vlan

举例:为交换机添加vlan 10并配置interface vlan 10的1P地址为192.168.1.1/24。

#进入全局配置模式
Switch#configure terminal
#进入 VLAN 接口配置模式
Switch(config)# vlan database
#创建 VLAN 10
Switch(config-vlan)# vlan 10
#退出 VLAN 接口配置模式
Switch(config-vlan)# exit
#进入 VLAN 接口配置模式
Switch(config)# interface vlan10
#配置IP地址
Switch(config-if)# ip address 192.168.1.1/24
#使能 VLAN 接口
Switch(config-if)# no shutdown
#退回到特权模式
Switch(config-if)# end
#验证、显示配置
Switch# show ip interface brief

6 如何配置静态路由

举例:为交换机配置默认静态路由,下一跳地址为192.168.1.2

#进入全局配置模式
Switch# configure terminal
#配置静态路由
Switch(config)# ip route 0.0.0.0/0 192.168.1.2

7 如何配置接口access或trunk模式

举例:将交换机编号1的接口配置access模式属于vlan10,编号2的接口配置trunk模式,放行所有vlan并将vlan10没置为native vlan

#进入全局配置模式
Switch# configure terminal
#进入端口配置模式
Switch(config)# interface eth-0-1
#配置端口模式为access
Switch(config-if)# switchport mode access
#将接口加入vlanA
Switch(contig-if)# switchport access vlan 10
Switch(config-if)# no shutdown
Switch(config-if)# exit #退出该端口
#进入端口配置模式
Switch(config)# interface eth-0-2
#配置端口模式为trunk
Switch (config-if)#f switchport mode trunk
#允许放行所有vlan
Switch(confia-if)# switchport trunk allowed vlan all
#设置native vlan
Switch(config-if)# switchport trunk native vlan 10
Switch(config-if)# no shutdown

8 如何使用combo接口

#进入全局配置模式
Switch# configure terminal
#进入端口配置模式 A-具体接口编号
Switch(config)# interface eth-0-A
#设置端口的介质类型,RJ45-电口或SFP-光口
Switch(config-if)# media-type rj45/sfp
#使能接口
Switch(config-if)# no shutdown

9 如何配置SNMP团体字

举例:为交换机添加inspur@123的只读团体字

Switch# configure terminal
Switch(config)# snmp-server enable
Switch(config)# snmp-server community inspur@123 read-only

10 如何保存配置

Switch# write #保存配置

11 如何进行软件升级

1、通过浪潮网络服务热线获取最新稳定版本
2、设置PC连接交换机的console口和管理口,配置地址192.168.1.1/24
3、配置交換机
Switch# configure terminal
#禁用管理口DHCP功能
Switch(config)# no management ip address dhcp
#交换机配置管理地址
Switch(config)#management ip address 192.168.1.2/24
Switch(config)#exit
4、上传新版本
#完整的文件名,含格式后缀.bin
Switch# copy mgmtif tftp://192.168.1.1/xXx.bin flash:/boot//xxx.bin 
#查看交换机的新版本文件
Switch# dir flash:/boot 
5、 使用新版本
Switch# boot system flash:/boot/新版本文件名 #指定新版本为下次启动文件
#保存配置
Switch# write
#重启交换机
Switch# reboot
6、交换机重启后查看新版本
Switch# show version