命令解析:请按需修改。
注意:H3C 海康 默认堆叠优先级为1越大越优先,以S系列盒式交换机为例的脚本
H3C 海康 默认是1,堆叠口有2个 主设备默认用1,对端堆叠口需要用2
备交换机stack slot 0 renumber 1 把0槽改为1槽后,用第2个堆叠口 1/2 与主设备的0/1连接
堆叠前,请确保设备恢复出厂设置!线缆先不要接!
=================================================================
一、交换机1(主)配置:
system-view
irf member 1 priority 10
interface Ten-GigabitEthernet 1/0/49
shutdown
quit
interface Ten-GigabitEthernet 1/0/50
shutdown
quit
irf-port 1/1
port group interface Ten-GigabitEthernet 1/0/49
port group interface Ten-GigabitEthernet 1/0/50
quit
interface Ten-GigabitEthernet 1/0/49
undo shutdown
quit
interface Ten-GigabitEthernet 1/0/50
undo shutdown
quit
save force
irf-port-configuration active
=================================================================
二、交换机2(备)配置:
先把设备号改为2,以下请手动执行:
system-view
irf member 1 renumber 2
y
quit
reboot
y
重启后,配置以下内容:
system-view
interface Ten-GigabitEthernet 2/0/49
shutdown
quit
interface Ten-GigabitEthernet 2/0/50
shutdown
quit
irf-port 2/2
port group interface Ten-GigabitEthernet 2/0/49
port group interface Ten-GigabitEthernet 2/0/50
quit
interface Ten-GigabitEthernet 2/0/49
undo shutdown
quit
interface Ten-GigabitEthernet 2/0/50
undo shutdown
quit
save force
irf-port-configuration active
=================================================================
三、设备启动前,把堆叠口的线缆接上:
Ten-GigabitEthernet 1/0/49---Ten-GigabitEthernet 2/0/49
Ten-GigabitEthernet 1/0/50---Ten-GigabitEthernet 2/0/50
=================================================================
四、堆叠后配置MAD分裂检测:配置完,再接MAD的互联线
举例子:创建vlan4001、端口聚合1001 1002、ip 192.168.255.1 192.168.255.2 检测分裂
system-view
irf mac-address persistent always
irf auto-update enable
undo irf link-delay
vlan 4001
description irf_mad
quit
interface Vlan 4001
description irf_mad
mad bfd enable
mad ip address 192.168.255.1 255.255.255.252 member 1
mad ip address 192.168.255.2 255.255.255.252 member 2
quit
interface Bridge-Aggregation1001
description IRF_MAD_BFD
port access vlan 4001
quit
interface Bridge-Aggregation1002
description IRF_MAD_BFD
port access vlan 4001
quit
interface GigabitEthernet 1/0/47
port link-mode bridge
description link-to-2/0/47
port access vlan 4001
undo stp enable
port link-aggregation group 1001
quit
interface GigabitEthernet 1/0/48
port link-mode bridge
description link-to-2/0/48
port access vlan 4001
undo stp enable
port link-aggregation group 1001
quit
interface GigabitEthernet 2/0/47
port link-mode bridge
description link-to-1/0/47
port access vlan 4001
undo stp enable
port link-aggregation group 1002
quit
interface GigabitEthernet 2/0/48
port link-mode bridge
description link-to-1/0/48
port access vlan 4001
undo stp enable
port link-aggregation group 1002
quit
=================================================================
五、MAD的互联接线
GigabitEthernet 1/0/47---GigabitEthernet 2/0/47
GigabitEthernet 1/0/48---GigabitEthernet 2/0/48