更新时间:2025-01-09
1.堆叠支持版本
S5300G&S6300G系列交换机,如需配置堆叠,版本至少需要升级到7.4.12版本(正式稳定版本)
2.堆叠注意事项
1、交换机需要升级到7.4.12及以上版本才支持堆叠。
2、新发货设备已内置堆叠序列号,老版本交换机还需收集将交换机的SN、MAC,拨打400-878-3389或者智能客服转人工,申请堆叠序列号,导入序列号文件至交换机,重启生效后才可配置堆叠。
3、配置堆叠口,需先禁用端口,否则配置堆叠口时会报错;同时配置完堆叠口后,还要重新启用端口,否则重启后端口还是禁用的状态,导致堆叠协商失败。
4、堆叠竞争延迟时长一定要配置,主机固定60,备机固定30。
3.堆叠拓扑图

测试拓扑如上图,以下堆叠配置是在测试拓扑下进行的,实际请根据现场的实际拓扑进行配置修改。
4.堆叠序列号
4.1.查看是否具备堆叠序列号
新发货的设备默认已经带了堆叠授权(7.4.12版本及以上)。但是低版本升级上来的交换机还需单独申请堆叠序列号。判断设备是否具备堆叠序列号的方法:
Switch# show license
在Feature Set 里面看到STACK,即支持堆叠,如下图所示

4.2.申请堆叠序列号的方法
1、收集交换机的SN与MAC地址,拨打400-878-3389或者智能客服转人工,申请堆叠序列号(堆叠主备机都需要)。
2、序列号文件下来后,修改序列号文件名称(如果不改名,会覆盖掉原来的授权文件)
默认序列号文件名为:xxxxxxx.1.lic ,把中间的1,改成当前的日期,比如:xxxxxxx.1204.lic
3、通过TFTP服务器导入堆叠序列号至交换机
注意:序列号文件导入到flash:目录下即可,不用导入到flash:boot目录下。多个lic文件可以共存,只要名称不一样,均可生效。
操作截图如下:

5.堆叠主机配置
Switch(config)# stack slot 1 //配置堆叠主机的slot id
% Configuration will not take effect until save configuration and system reload
Switch(config)# stack slot 1 domain 1 //配置堆叠域,主备机需保持一致
% Configuration will not take effect until save configuration and system reload
Switch(config)# stack enable //使能堆叠功能
% Configuration will not take effect until save configuration and system reload.
Switch# reload //重启生效
操作截图如下:

交换机重启完成后:
Switch(config)# interface eth-1-47
Switch(config-if)# shutdown
Switch(config)# interface eth-1-48
Switch(config-if)# shutdown //配置堆叠口,需先禁用端口,否则配置堆叠口时会报错
Switch(config)# interface stack-1-1
Switch(config-if)# member-port eth-1-47
Switch(config-if)# member-port eth-1-48 //配置主机的堆叠口为1-47与1-48口
Switch(config)# interface eth-1-47
Switch(config-if)# no shutdown
Switch(config)# interface eth-1-48
Switch(config-if)# no shutdown //配置完堆叠口,必须重新启用,否则重启后端口还是禁用的状态,导致堆叠协商失败
Switch(config)# stack slot 1 priority 1000 //配置主机的优先级为1000,默认500,数字越大越优先
Switch(config)#stack slot 1 competition-delay 60 //堆叠竞争延迟时长,主机60,备机30
Switch# write //保存配置
操作截图如下:

6.堆叠备机配置
Switch(config)# stack slot 2 //配置堆叠主机的slot id
% Configuration will not take effect until save configuration and system reload
Switch(config)# stack slot 2 domain 1 //配置堆叠域,主备机需保持一致
% Configuration will not take effect until save configuration and system reload
Switch(config)# stack enable //使能堆叠功能
% Configuration will not take effect until save configuration and system reload.
Switch# reload //重启生效
交换机重启完成后:
Switch(config)# interface eth-2-47
Switch(config-if)# shutdown
Switch(config)# interface eth-2-48
Switch(config-if)# shutdown //配置堆叠口,需先禁用端口,否则配置堆叠口时会报错
Switch(config)# interface stack-2-1
Switch(config-if)# member-port eth-2-47
Switch(config-if)# member-port eth-2-48 //配置主机的堆叠口为2-47与2-48口
Switch(config)# interface eth-2-47
Switch(config-if)# no shutdown
Switch(config)# interface eth-2-48
Switch(config-if)# no shutdown //配置完堆叠口,必须重新启用,否则重启后端口还是禁用的状态,导致堆叠协商失败
Switch(config)#stack slot 2 competition-delay 30 //堆叠竞争延迟时长,主机60,备机30
Switch# write //保存配置
7.依次重启主机与备机
1、使用命令 reload ,先重启主机,再重启备机;
2、交换机重启时,需将堆叠线接好。
3、重启完成后,可通过命令 show stack 查看堆叠是否成功:

8.配置多主检测与备板管理IP地址
Switch(config)# interface eth-1-40
Switch(config-if)# stack dual-active detect mode direct //配置主机端口直连检测
Warning: The interface will block common data packets, except BPDU packets. Continue? [no]y
按 y 确认,回车
Switch(config)# interface eth-2-40
Switch(config-if)# stack dual-active detect mode direct //配置备机端口直连检测
Warning: The interface will block common data packets, except BPDU packets. Continue? [no]y
按 y 确认,回车
操作截图如下:

Switch(config)# stack dual-active backup ip address 192.168.1.1/24 slot 1
//配置主机管理IP地址,堆叠分裂后可通过MGMT端口访问,排查故障
Switch(config)# stack dual-active backup ip address 192.168.1.2/24 slot 2
//配置备机管理IP地址,堆叠分裂后可通过MGMT端口访问,排查故障
操作截图如下:
