原创路由交换

H3C交换机堆叠配置命令

本文阅读 2 分钟
首页 路由交换 正文

华三交换机交换机如何做堆叠?今日正好配置记录下,根据自己理解对配置情况进行一个简单的总结概述!(两台交换机、两根光纤线,交叉链接)

首先配置前将 堆叠线路 交叉相连 SW1 Ten1/0/49 ====> SW2 Ten1/0/50 ,SW1 Ten1/0/50 ====> SW2 Ten1/0/49

img

SW1配置

[SW1]irf domain 5263   //配置自定义IRF域编号(可有可无,看需求)
[SW1]irf merber 1 priority 32 //设置SWA交换机的irf优先级为32,即将此交换机当作master角色
[SW1]int range Ten-GigabitEtherneten 1/0/49 to Ten-GigabitEtherneten 1/0/50 //首先关闭相应端口
[SW1-if-range]shutdown
[SW1-if-range]quit
[SW1]irf-port 1/1 //进入irf端口
[SW1-irf-port1/1]port group int Ten-GigabitEtherneten1/0/49 //将49号端口加入到irf接口
[SW1-irf-port1/1]port group int Ten-GigabitEtherneten1/0/50 //将50号端口加入到irf接口
[SW1-irf-port1/1]quit
[SW1]irf-port-configuration active //激活irf端口
[SW1]int range Ten-GigabitEtherneten 1/0/49 to Ten-GigabitEtherneten 1/0/50 //开启15和16端口
[SW1]undo shutdown
[SW1]save f
[SW1]reboot
[SW1]Y

SW2配置

//设置SWB交换机堆叠id为2,保存重启
sys
irf member 1 renumber 2
Y
!
save f
exit
reboot
Y
//上面操作过后需要保存配置并重启设备,设备接口编号会变成Ten-GigabitEtherneten2/0/49-Ten-GigabitEtherneten2/0/50
[SW2]irf domain 5263
[SW2]irf merber 2 priority 16 //设置SWB交换机的irf优先级为16,即将此交换机当作standby角色
[SW2]int range Ten-GigabitEtherneten 2/0/49 to Ten-GigabitEtherneten 2/0/50 //首先关闭相应端口
[SW2-if-range]shutdown
[SW2-if-range]quit
[SW2]irf-port 2/2 //进入irf端口
[SW2-irf-port2/2]port group int Ten-GigabitEtherneten2/0/49 //将49号端口加入到irf接口
[SW2-irf-port2/2]port group int Ten-GigabitEtherneten2/0/50 //将50号端口加入到irf接口
[SW2]irf-port-configuration active //激活irf端口
[SW2]int range Ten-GigabitEtherneten 2/0/49 to Ten-GigabitEtherneten 2/0/50 //开启49和50端口
[SW2-if-range]undo shutdown
[SW2]save f
[SW2]reboot
[SW2]Y

最后配置验证:

<SW1>dis irf link
Member 1
 IRF Port  Interface                             Status
 1         Ten-GigabitEthernet1/0/49             UP
           Ten-GigabitEthernet1/0/50             UP
 2         disable                               --
Member 2
 IRF Port  Interface                             Status
 1         disable                               --
 2         Ten-GigabitEthernet2/0/49             UP
           Ten-GigabitEthernet2/0/50             UP

<SW1>dis irf
MemberID    Role    Priority  CPU-Mac         Description
 *+1        Master  32        00e0-fc0f-8c02  ---
   2        Standby 1         00e0-fc0f-8c03  ---
--------------------------------------------------
 * indicates the device is the master.
 + indicates the device through which the user logs in.

 The bridge MAC of the IRF is: 84d9-31f6-a2bf
 Auto upgrade                : yes
 Mac persistent              : 6 min
 Domain ID                   : 5263

最后看到UP状态及配置完成

脚本代码

SW1脚本

sys
irf domain 5263
irf merber 1 priority 32
int range Ten-GigabitEtherneten 1/0/49 to Ten-GigabitEtherneten 1/0/50
shutdown
quit
irf-port 1/1
port group int Ten-GigabitEtherneten1/0/49 
port group int Ten-GigabitEtherneten1/0/50 
quit
irf-port-configuration active 
int range Ten-GigabitEtherneten 1/0/49 to Ten-GigabitEtherneten 1/0/50
undo shutdown
save
reboot
!
Y

SW2脚本

sys
irf domain 5263
irf member 1 renumber 2
Y
!
save f
exit
reboot
Y
!
irf domain 5263
irf merber 2 priority 16
int range Ten-GigabitEtherneten 2/0/49 to Ten-GigabitEtherneten 2/0/50
shutdown
quit
irf-port 2/2
port group int Ten-GigabitEtherneten2/0/49
port group int Ten-GigabitEtherneten2/0/50
irf-port-configuration active
int range Ten-GigabitEtherneten 2/0/49 to Ten-GigabitEtherneten 2/0/50
undo shutdown
save f
reboot
!
Y
原创文章,作者:張旭,如若转载,请注明出处:http://www.zxbke.cn/31.html/