H3C交换机堆叠配置及命令详解

2022-12-27 15:01:48 浏览数 (1)

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

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

SW1配置

代码语言:javascript复制
[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配置

代码语言:javascript复制
#设置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

最后配置验证:

代码语言:javascript复制
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

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脚本

代码语言:javascript复制
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脚本

代码语言:javascript复制
sys
irf domain 5263
irf member 1 renumber 2
Y
!
save f
exit
reboot
Y
!
代码语言:javascript复制
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

0 人点赞