Skip to content

迈普交换机配置(NSS7810) ​

1. 配置带外 ​

1 将网线插入到标记为 DC0 的接口上, 配置dc0带外管理口

bash
Switch> enable
Switch# configure terminal
Switch(config)# interface ethernet dc0
Switch(Config-if-DC0)# ip address 10.2.185.149 255.255.255.0
Switch(Config-if-DC0)# no shutdown
Switch(Config-if-DC0)# exit

2 配置交换机管理口的下一跳网关

bash
Switch(config)# ip route 0.0.0.0 0.0.0.0 10.2.185.1

3 开启SSH并创建用户

bash
Switch(config)# ssh-server enable
Switch(config)# crypto key generate rsa
Switch(config)# ssh-user admin password 0 your_password
Switch(config)# line vty 0 4
Switch(config-line)# transport input ssh
Switch(config-line)# login local
Switch(config-line)# end

4 保存配置

bash
Switch# write

2. 交换机pfc配置 ​

  1. 将接口加入vlan10
bash
# 创建vlan 10 并查看是否创建
switch(config)# vlan 10
switch(config-if-vlan10)# exit
switch(config)# show vlan
switch(config)# show ip interface brief

# 进入25-32口
interface 400ge 0/25-0/32

#加入vlan
switchport access vlan 10
  1. 配置IP地址
bash
! 创建 VLAN10 三层接口(SVI)
switch(config)# interface vlan 10
switch(config)# mtu 9000
switch(config-if-vlan10)# ip address 192.168.10.254 255.255.255.0
switch(config-if-vlan10)# ip address 192.168.20.254 255.255.255.0 secondary
switch(config-if-vlan10)# ip address 192.168.30.254 255.255.255.0 secondary
switch(config-if-vlan10)# ip address 192.168.40.254 255.255.255.0 secondary
switch(config-if-vlan10)# no shutdown
switch(config-if-vlan10)#exit
  1. 配置
bash
##### 端口下 ########
switch(config-if-range)# fec mode rs544 manual
switch(config-if-range)# mtu 9000
switch(config-if-range)# no storm-control unicast
switch(config-if-range)# no storm-control broadcast
switch(config-if-range)# no storm-control multicast
switch(config-if-range)# queue-schedule wrr 1 1 1 1 1 95 0 0
switch(config-if-range)# qos map-table trust dscp ingress
switch(config-if-range)# qos map-table trust dscp egress
switch(config-if-range)# pfc enable profile default
switch(config-if-range)# pfc buffer priority 5 xon 8864 xoff static 8960
switch(config-if-range)# pfc buffer priority 5 headroom 2000
switch(config-if-range)# buffer queue 5 shared-threshold dynamic 10
switch(config-if-range)# buffer queue 6 shared-threshold dynamic 10
switch(config-if-range)# qos ecn statistics enable
switch(config-if-range)# qos fast-ecn enable
switch(config-if-range)# statistics roce enable
switch(config-if-range)# no shutdown


###### 全局配置下 #####
# 配置PFC profile
switch(config)# pfc profile default
switch(config-pfc-profile)# priority 5
switch(config-pfc-profile)# no priority 3
switch(config-pfc-profile)# priority 5 deadlock-detect enable
switch(config-pfc-profile)# exit

# 配置ECN
switch(config)# qos ecn queue 5 statistics enable
switch(config)# qos fast-ecn limit 2560 queue 5

# 查看单个端口的全部配置
switch(config)# show running-config interface 400ge0/25
  1. 保存
bash
switch# write