on H3C
①配置交换机的成员编号一般主的就是1,备的是2 主: <H3C>sys [H3C]irf member 1 renumber 1 选择YES直接回车 [H3C]quit 备: <H3C>sys [H3C]irf member 1 renumber 2 选择YES直接回车 [H3C]quit 重启备设备 ②配置交换机的成员优先级 主: <H3C>sys [H3C]irf member 1 priority 30 [H3C]quit 备: <H3C>sys [H3C]irf member 1 priority 15 [H3C]quit ③配置irf端口,进入需要堆叠的物理端口,关闭端口 主: <H3C>sys [H3C]int range Ten-GigabitEthernet 1/0/49 Ten-GigabitEthernet 1/0/50 [H3C-if-range]shutdown [H3C-if-range]quit [H3C]irf-port 1/1 [H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/49 [H3C-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/50 [H3C-irf-port1/1]quit [H3C]int range Ten-GigabitEthernet 1/0/49 Ten-GigabitEthernet 1/0/50 [H3C-if-range]undo shutdown [H3C-if-range]quit [H3C]save [H3C] irf-port-configuration active 备: <H3C>sys [H3C]int range Ten-GigabitEthernet 2/0/49 Ten-GigabitEthernet 2/0/50 [H3C-if-range]shutdown [H3C-if-range]quit [H3C]irf-port 1/1 [H3C-irf-port1/1]port group interface Ten-GigabitEthernet 2/0/49 [H3C-irf-port1/1]port group interface Ten-GigabitEthernet 2/0/50 [H3C-irf-port1/1]quit [H3C]int range Ten-GigabitEthernet 2/0/49 Ten-GigabitEthernet 2/0/50 [H3C-if-range]undo shutdown [H3C-if-range]quit [H3C]save [H3C] irf-port-configuration active 注:配置完成后,将开始竞选master,竞选完成后slave自动重启, 使用dis irf 检查堆叠情况 ④配置bfd检测堆叠 配置BFD MAC [H3C] vlan 3 [H3C-vlan3] port ten-gigabitethernet 1/0/24 ten-gigabitethernet 2/0/24 [H3C-vlan3] quit [H3C] interface vlan-interface 3 [H3C-Vlan-interface3] mad bfd enable [H3C-Vlan-interface3] mad ip address 192.168.2.1 24 member 1 [H3C-Vlan-interface3] mad ip address 192.168.2.2 24 member 2 [H3C-Vlan-interface3] quit BFD和stp互斥,关闭stp [H3C] interface gigabitethernet 1/0/24 [H3C-gigabitethernet-1/0/1] undo stp enable [H3C-gigabitethernet-1/0/1] quit [H3C] interface gigabitethernet 2/0/24 [H3C-gigabitethernet-2/0/1] undo stp enable [H3C-gigabitethernet-2/0/1] quit
bfd mad
Huawei
###1. ? 规划SwitchA的堆叠成员ID为1,SwitchB的成员ID为2。 ? 规划SwitchA作为主交换机,其堆叠优先级最高,为150。SwitchB堆叠优先级为120。 ? 堆叠域编号规划(Domain ID)为10,不与网络中其他堆叠系统的域号冲突。 ? 规划SwitchA和SwitchB堆叠连接端口为10GE1/0/45~10GE1/0/48。 2. <HUAWEI> system-view [~HUAWEI] sysname SwitchA [HUAWEI] commit [~SwitchA] stack [~SwitchA-stack] stack member 1 priority 150 [SwitchA-stack] stack member 1 domain 10 [SwitchA-stack] quit [SwitchA] commit <HUAWEI> system-view [~HUAWEI] sysname SwitchB [HUAWEI] commit [~SwitchB] stack [~SwitchB-stack] stack member 1 priority 120 [SwitchB-stack] stack member 1 domain 10 [SwitchB-stack] stack member 1 renumber 2 inherit-config Warning: The stack configuration of member ID 1 will be inherited to member ID 2 after the device resets. Continue? [Y/N]: y [SwitchB-stack] quit [*SwitchB] commit 说明: 因SwitchB目前堆叠成员尚未重启。ID还是1,所以这个时候还在用,member 1.堆叠配置。 因为堆叠成员的修改ID时指定了inherit-config参数,所以SwitchB重启后继承member 1.堆叠配置;如果没有指定inherit-config参数,那么SwitchB重启后不会继承member 需要使用1的堆叠配置member 2重新堆叠配置。 因为堆叠成员的修改ID时指定了inherit-config参数,所以SwitchB重启后继承member 1.堆叠配置;如果没有指定inherit-config参数,那么SwitchB重启后不会继承member 需要使用1的堆叠配置member 2重新堆叠配置。 3.配置堆叠端口。 # 将SwitchA的业务口10GE1/0/1~10GE1/0/4加入堆叠端口1/1。 [~SwitchA] interface stack-port 1/1 [SwitchA-Stack-Port1/1] port member-group interface 10ge 1/0/1 to 1/0/4 Warning: The interface(s) (10GE1/0/1-1/0/4) will be converted to stack mode and be configured with the port crc-statistics trigger error-down command if the configuration does not exist. After the configuration is complete, these interfaces may go Error-Down (crc-statistics) because there is no shutdown configuration on the interfaces. [Y/N]: y [SwitchA-Stack-Port1/1] commit [~SwitchA-Stack-Port1/1] return 堆叠物理成员端口配置后,自动配置端口port crc-statistics trigger error-down。 # 将SwitchB的业务口10GE1/0/1~10GE1/0/4加入堆叠端口1/1。 [~SwitchB] interface stack-port 1/1 [SwitchB-Stack-Port1/1] port member-group interface 10ge 1/0/1 to 1/0/4 Warning: The interface(s) (10GE1/0/1-1/0/4) will be converted to stack mode and be configured with the port crc-statistics trigger error-down command if the configuration does not exist. After the configuration is complete, these interfaces may go Error-Down (crc-statistics) because there is no shutdown configuration on the interfaces. [Y/N]: y [SwitchB-Stack-Port1/1] commit [~SwitchB-Stack-Port1/1] return 4.检查堆叠配置信息。 # 上述配置完成后,执行命令display stack configuration检查配置是否与计划一致,如不一致,需修改配置。 # 上述配置完成后,执行命令display stack configuration检查配置是否与计划一致。如果不一致,则需要修改配置。SwitchA为例。 <SwitchA> display stack configuration Oper : Operation Conf : Configuration : Offline configuration Isolated Port : The port is in stack mode, but does not belong to any Stack-Port
Attribute Configuration:
5.保存配置后将设备下电。
# 保存SwitchA和SwitchB的配置,然后将设备下电。SwitchB的配置与SwitchA相同,略。
<SwitchA> save
Warning: The current configuration will be written to the device. Continue? [Y/N]: y
6.按照前期规划及配置,连接堆叠线缆。线缆连接完成后将设备上电。
建议先将高优先级设备上电,以使其先完成启动,优先竞争为主交换机。
7.验证配置结果。
# 通过Console口或管理网口登录堆叠系统,使用命令display stack查看堆叠是否组建成功。当通过管理网口登录时,需要使用主交换机的IP地址。
<SwitchA> display stack
MemberID Role MAC Priority DeviceType Description
+1 Master 0004-9f31-d520 150 CE6850-48T4Q-EI
2 Standby 0004-9f62-1f40 120 CE6850-48T4Q-EI
indicates the device where the activated management interface resides.
如上所示,显示两台交换机的信息,表示堆叠建立成功,且主交换机为成员ID为1的设备,即SwitchA。
# 查看堆叠系统拓扑信息。
<SwitchA> display stack topology
8.保存堆叠系统配置。
删除堆叠口 on Huawei
删除堆叠口就是将业务口从堆叠口中退出,恢复为正常的业务口。
操作步骤(V200R002之后的版本)
1. 执行命令system-view,进入系统视图。
2. 执行命令interface stack-port member-id/port-id,进入逻辑堆叠端口视图。
3. 执行命令shutdown interface { interface-type interface-number1 [ to interface-type interface-number2 ] }&< 1-10>,将堆叠成员端口状态设置为Down。
4. 执行命令undo port interface { interface-type interface-number1 [ to interface-type interface-number2 ] }&<1-10> enable,将成员端口从堆叠口中退出,恢复为业务口。
# 将堆叠成员口XGE0/0/1从堆叠口中删除。
<HUAWEI> system-view
[HUAWEI] interface stack-port 0/1
[HUAWEI-stack-port0/1] shutdown interface xgigabitethernet0/0/1
[HUAWEI-stack-port0/1] undo port interface xgigabitethernet0/0/1 enable