堆叠为只存在交换机上,每个厂商每种型号称呼大不一致,比如这类名称可以统称堆叠
例如:华为:堆叠、CSS集群,华三:堆叠、IRF虚拟化,Cisco:堆叠,VSS
堆叠:将多台交换机设备组合在一起,虚拟化成一台交换设备
优点:不再需要二层MSTP和VRRP,简化了网络配置,轻松地扩展端口数、带宽和处理能力
总结:
1、简化网络拓扑
2、简化配置和管理
3、轻松扩展网络带宽或端口数量
交换机角色
主交换:负责管理整个堆叠,堆叠中只有一个主交换
被交换:负责接替主交换,当发生故障时,堆叠中只有一个备交换
从交换:主要用于业务转发,除主交换机和备交换机外,其它都是从交换
堆叠域:为了适应各种组网应用,同一个网络里部署多个堆叠,堆叠之间使用域编号(Domain ID)来区别。
堆叠成员ID:堆叠成员交换机的编号(Member ID),用来标识和管理成员交换机,ID是唯一的
堆叠优先级:确定主交换(成员角色),优先级值越大表示优先级越高,当选为主交换机的可能性越大
堆叠物理成员端口:交换机的物理端口,用于堆叠成员交换机之间的连接
堆叠端口:逻辑端口需要和堆叠物理成员端口绑定
配置步骤
堆叠线连接(物理连接:链形、环形连接)
软件配置(主交换机选举:运行状态、优先级、软件版本、桥MAC地址)
查看堆叠状态(拓扑收集:计算拓扑、检测ID)
管理维护(稳定运行:通过优先级、MAC地址比较选举备交换)
版本同步:不同版本交换机会从主交换下载系统软件
配置同步:
预防堆叠分裂:DAD检测方式(直连检测方式、)
配置步骤
园区交换机具体配置步骤
Enter system view, return user view with Ctrl+Z.
[HUAWEI]interface stack-port 0/1创建并进入逻辑堆叠端口视图
[HUAWEI-stack-port0/1]port interface GigabitEthernet 0/0/49 enable 配置业务口为物理成员端口并将其加入到逻辑堆叠端口中
Warning: Enabling stack function may cause configuration loss on the interface. Continue? [Y/N]:y
[HUAWEI-stack-port0/1]quit
[HUAWEI]interface stack-port 0/2
[HUAWEI-stack-port0/2]port interface GigabitEthernet 0/0/50 enable
Warning: Enabling stack function may cause configuration loss on the interface. Continue? [Y/N]:y
[HUAWEI-stack-port0/2]quit
[HUAWEI]stack slot 0 renumber 1 配置设备的堆叠ID,堆叠ID采用缺省值0 (可选项)
[HUAWEI]stack slot 0 priority 200 修改堆叠优先级为200成为主交换,默认为100
[HUAWEI]quit
[Stack] interface eth-trunk 10
[Stack-Eth-Trunk10] mad detect mode relay mad检测链路
[Stack-Eth-Trunk10] return
display stack configuration 查看成员交换机的堆叠配置信息
display device 查看堆叠系统中各成员交换机的个数与实际组网中交换机的个数是否一致
display stack 查看堆叠系统的连接拓扑与实际硬件连接是否一致
display stack peers 查看堆叠系统的邻居信息与实际硬件连接是否一致
display stack channel all 查看堆叠链路的连线及状态信息
Slot 0 HA FSM State(master): realtime or routine backup. 只有处于该状态时才可以主备倒换
[HUAWEI] slave switchover enable 使能主备倒换功能
[HUAWEI] slave switchover 执行主备倒换
display interface 10ge 1/0/1
显示Error-Down可能配置错误、线缆连接出错
堆叠卡做堆叠
[SwitchA] stack slot 0 priority 200 修改堆叠优先级为200成为主交换。堆叠ID采用缺省值0
[SwitchB] stack slot 0 renumber 1 修改堆叠ID为1
[SwitchC] stack slot 0 renumber 2 修改堆叠ID为2
[HUAWEI]stack enable开启堆叠功能
[Stack] interface eth-trunk 10
[Stack-Eth-Trunk10] trunkport gigabitethernet 0/0/5
[Stack-Eth-Trunk10] trunkport gigabitethernet 1/0/5
[Stack-Eth-Trunk10] trunkport gigabitethernet 2/0/5
数据中心交换机具体配置步骤
An initial password is required for the first login via the console.Continue to set it? [Y/N]: n
[~HUAWEI]stack # 进入堆叠视图
[~HUAWEI-stack]stack member 1 description main #描述堆叠成员1
[~HUAWEI-stack]stack member 1 domain 10 #将堆叠成员1加入域10中
[~HUAWEI-stack]stack member 1 priority 150 #修改成员编号为1(缺省配置:成员ID1、优先级100)
[~HUAWEI-stack]commit #提交配置
[~HUAWEI-stack]quit # 退出堆叠视图
[~HUAWEI]interface stack-port 1/2 #创建逻辑堆叠接口
[~HUAWEI-Stack-Port1/2]port member-group interface 40GE 1/0/1 to 1/0/2#端口成员组接口为40GE 1/0/1、40GE 1/0/2
[~HUAWEI-Stack-Port1/2]commit #提交配置
[~HUAWEI-Stack-Port1/2]quit #退出该模式
[~HUAWEI]return
备交换机配置
[~HUAWEI]stack
[~HUAWEI-stack]stack member 1 renumber 2 inherit-config
[~HUAWEI-stack]commit
[~HUAWEI-stack]return
Warning: The current configuration will be written to the device. Continue? [Y/N]:y
Warning: The system will reboot. Continue? [Y/N]:y
配置堆叠步骤
Error: Please choose 'YES' or 'NO' first before pressing 'Enter'. [Y/N]: n
[~HUAWEI]stack
[~HUAWEI-stack]stack member 2 description backup
[*HUAWEI-stack]stack member 2 domain 10
[*HUAWEI-stack]commit
[~HUAWEI-stack]quit
[~HUAWEI]interface stack-port 2/1
[~HUAWEI-Stack-Port2/1]port member-group interface 40GE 2/0/1 to 2/0/2
#被配置为堆叠物理成员端口后,端口下会自动配置port crc-statistics trigger error-down
configuration on the interfaces.Continue? [Y/N]:y
[*HUAWEI-Stack-Port2/1]commit
Committing....done.
[~HUAWEI-Stack-Port2/1]return
Warning: The current configuration will be written to the device. Continue? [Y/N]:y
slot 2:
Warning: The system will reboot. Continue? [Y/N]:y
[~HUAWEI] interface 10ge 1/0/5#配置业务口的直连双主检测功能
[~HUAWEI-10GE1/0/5] dual-active detect mode direct
Warning: The interface will block common data packets, except BPDU packets. Continue? [Y/N]: y
[*HUAWEI-10GE1/0/5] quit
[*HUAWEI] interface 10ge 2/0/5
[*HUAWEI-10GE2/0/5] dual-active detect mode direct
Warning: The interface will block common data packets, except BPDU packets. Continue? [Y/N]: y
[*HUAWEI-10GE2/0/5] commit
[~HUAWEI-10GE2/0/5] return
Stack domainID: 10
Dual-active status: Normal
Dual-active detect mode: Direct
Dual-active detect configuration of MEth: Disable
Dual-active direct detect interfaces configured:
10GE1/0/5 up (Physical) up (Protocol) 10 (PeerDomain)
10GE2/0/5 up (Physical) up (Protocol) 10 (PeerDomain)
[~HUAWEI] load-balance profile abcd
[*HUAWEI-load-balance-profile-abcd l2 src-mac dst-mac #配置二层报文根据源MAC地址和目的MAC地址进行负载分担
[~HUAWEI]interface stack-port 1/1进入堆叠端口视图
[~HUAWEI-Stack-Port1/1]load-balance profile abcd
[~HUAWEI-Stack-Port2/1]quit
[~HUAWEI]commit
接口代理方式双主检测功能
clear configuration interface g0/0/1 #清除GE0/0/1接口下的配置
验证双主检测功能 (没有配置业务进行测试,有业务慎用)
双主检测功能配置后:
如果堆叠系统分裂,设备会发出告警DAD_1.3.6.1.4.1.2011.5.25.246.1.1 hwDadConflictDetect
如果分裂故障恢复,设备会发出恢复告警DAD_1.3.6.1.4.1.2011.5.25.246.1.2 hwDadConflictResume
a.人为制造堆叠分裂,可以将所有用于堆叠连接的端口关闭,或直接拔掉所有的堆叠线缆
b.通过命令display stack查看堆叠成员设备的数量是否减少,如果数量减少,表示堆叠已分裂
c.通过命令display trapbuffer查看设备是否有双主检测告警
Enter system view, return user view with Ctrl+Z.
[Master-SW]set css id 1
Warning: Modifying the CSS chassis ID will cause interface configuration loss. Continue? [Y/N]:y
Info: This operation may take a few seconds. Please wait...
[Master-SW]set css priority 150
[Master-SW]css master force
Info: CSS master force function has been enabled.
[Master-SW]quit
The current configuration (excluding the configurations of unregistered boards or cards) will be written to flash:/vrpcfg.zip.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 1/7..
Save the configuration successfully.
Now saving the current configuration to the slot 1/8.
Save the configuration successfully.
Enter system view, return user view with Ctrl+Z.
[Master-SW]css enable
Info: CSS has been enabled.
[Master-SW]quit
Info: The system is now comparing the configuration, please wait.
Warning: Inactive configuration may be lost. Whether to save them to configuration file for the next startup:flash:/vrpcfg.zip?[Y/N]:y
Now saving the current configuration to the slot 1/7..
Save the configuration successfully.
Now saving the current configuration to the slot 1/8.
Save the configuration successfully.
Enter system view, return user view with Ctrl+Z.
[Backup-SW]set css id 2
Warning: Modifying the CSS chassis ID will cause interface configuration loss. Continue? [Y/N]:y
Info: This operation may take a few seconds. Please wait...
[Backup-SW]css enable
Info: CSS has been enabled.
[Backup-SW]set css priority 100
[Backup-SW]quit
The current configuration (excluding the configurations of unregistered boards or cards) will be written to flash:/vrpcfg.zip.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 2/7..
Aug 5 2019 15:09:52 Backup-SW %%01CFM/4/SAVE(s)[33]:The user chose Y when deciding whether to save the configuration to the device.
Save the configuration successfully.
Now saving the current configuration to the slot 2/8.
Save the configuration successfully.
Info: The system is now comparing the configuration, please wait.
Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'.
System will reboot! Continue?[Y/N]:y
CSS Enable switch On
Chassis Id CSS Enable CSS Status CSS Mode Priority Master Force
------------------------------------------------------------------------------
1 On Master CSS card 150 On
2 On Standby CSS card 100 Off
堆叠注意事项(堆叠失败处理流程)
1、检查设备型号之间是否支持堆叠
2、检查堆叠连线(堆叠线缆一定按照顺序插,不可跳着插(堆叠卡))
3、堆叠线缆建议满配,未满配可能导致堆叠分裂
4、检查堆叠配置是否正确(set css id 1 此处ID主备数值不能一致,此ID表示堆叠身份)
5、检查堆叠连接端口是否UP
6、若配置css master force(可选),每次主设备重启完成,备主板卡随之重启
7、正常设备重启,时长5到6分钟加载完毕,若超过10分钟,堆叠出现问题
8、堆叠配置文件存在主设备的堆叠卡中,当主设备未加载,只加载备设备,配置为空
9、检查是否有堆叠故障事件信息(display stack troubleshooting)
10、堆叠激活license注意事项:
1、可能存在多个license授权
2、激活license授权,导入到交换机中
3、激活时,注意事项:单独的授权只能激活slot,不能同时激活两个slot
案例:A、B、C三台S5720交换机堆叠
A:ID:0 优先级200 MAC:1234-7435-9640 Master
B:ID:1 优先级100 MAC:121d-7123-9650 Standby
C:ID:2 优先级100 MAC:2346-77ee-9234 Slave
测试一:C交换机意外Down
A和B配置不变,A依然是Master,C交换机加电并且拔掉堆叠线,C交换机开机后配置为上一次堆叠后配置,C交换机重启多次依旧如此。插上堆叠线,C交换机重启重新加入组中,配置与之前一样,ABC的ID不变。
测试二:A交换机意外Down
B交换机立即顶替A交换机,B作为主机,配置保持不变。B和C堆叠重启,因优先级一样,选取MAC小为主,C作为了主机,B和C的ID与之前一样为1、2。
A交换机加电插上堆叠线,B和C并没有重启,A开机完毕自动加入组,此时主机依然是C交换机,ABC的ID为0、1、2。堆叠组重启,自动选取优先级高的当做主为A。