配置两台交换机堆叠示例(先连线后配置方式) 您所在的位置:网站首页 华为s5700-28p-li-ac交换机堆叠 配置两台交换机堆叠示例(先连线后配置方式)

配置两台交换机堆叠示例(先连线后配置方式)

2023-08-31 12:49| 来源: 网络整理| 查看: 265

提前规划堆叠方案。

规划SwitchA的堆叠成员ID为1,SwitchB的成员ID为2。规划SwitchA作为主交换机,其堆叠优先级最高,为150。SwitchB的堆叠优先级为120。规划堆叠域编号(Domain ID)为10,不与网络中其他堆叠系统的域编号冲突。规划SwitchA和SwitchB用于堆叠连接的端口为10GE1/0/1~10GE1/0/4。 按照前期的规划,连接SwitchA和SwitchB之间的堆叠线缆。 先完成SwitchA的堆叠配置(SwitchA规划的优先级高)。

# 配置SwitchA的堆叠优先级为150,Domain ID为10。缺省情况下,设备的堆叠成员ID为1。此处默认SwitchA的堆叠成员ID为1,无需配置。 system-view [~HUAWEI] sysname SwitchA [*HUAWEI] commit [~SwitchA] stack [~SwitchA-stack] stack member 1 priority 150 Info: The operation will take effect after reboot. [*SwitchA-stack] stack member 1 domain 10 Info: The operation takes effect only after the save command is executed. The device with a lower priority then will be reset in the stack merging scenario. [*SwitchA-stack] quit [*SwitchA] commit # 将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: After the configuration is complete, 1.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. 2.The interface(s) may go Error-Down (crc-statistics) because there is no shutdown configuration on the interfaces.Continue? [Y/N]: y [*SwitchA-Stack-Port1/1] commit [~SwitchA-Stack-Port1/1] return

被配置为堆叠物理成员端口后,端口下会自动配置port crc-statistics trigger error-down。

检查堆叠配置信息。

# 上述配置完成后,执行命令display stack configuration查看配置是否与规划的一致,如果不一致,需要修改配置。

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: ---------------------------------------------------------------------------- MemberID Domain Priority Switch Mode Uplink Port Oper(Conf) Oper(Conf) Oper(Conf) Oper(Conf) Oper(Conf) ---------------------------------------------------------------------------- 1(1) --(10) 100(150) Auto(Auto) 4*40GE(4*40GE) ---------------------------------------------------------------------------- Stack-Port Configuration: -------------------------------------------------------------------------------- Stack-Port Member Ports -------------------------------------------------------------------------------- Stack-Port1/1 10GE1/0/1 10GE1/0/2 10GE1/0/3 10GE1/0/4 -------------------------------------------------------------------------------- 保存SwitchA的配置后重启设备。

save Warning: The current configuration will be written to the device. Continue? [Y/N]: y reboot Warning: The system will reboot. Continue? [Y/N]: y 关闭SwitchA的堆叠端口。

# 待SwitchA重启完成后,登录SwitchA,关闭其堆叠端口。

system-view [~SwitchA] interface stack-port 1/1 [~SwitchA-Stack-Port1/1] shutdown [*SwitchA-Stack-Port1/1] commit [~SwitchA-Stack-Port1/1] quit

关闭堆叠端口是为了避免SwitchA和SwitchB提前堆叠合并。如果不关闭堆叠端口,SwitchB在配置时有可能会因为符合堆叠合并的条件而提前与SwitchA进行堆叠合并。此时SwitchB会自动重启,但是未保存配置,从而导致启动后配置丢失,堆叠无法建立。

完成SwitchB的堆叠配置。

# 配置SwitchB的堆叠成员ID为2,优先级为120,Domain ID为10。 system-view [~HUAWEI] sysname SwitchB [*HUAWEI] commit [~SwitchB] stack [~SwitchB-stack] stack member 1 priority 120 Info: The operation will take effect after reboot. [*SwitchB-stack] stack member 1 domain 10 Info: The operation takes effect only after the save command is executed. The device with a lower priority then will be reset in the stack merging scenario. [*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来进行堆叠配置。Switch B使用stack member 1 renumber 2 inherit-config命令修改堆叠成员ID时,需要指定inherit-config参数。如果不指定inherit-config参数,member 2不会继承member 1的堆叠配置,需要使用member 2重新进行堆叠配置。指定inherit-config参数后,member 2可直接继承member 1的堆叠配置。 # 将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: After the configuration is complete, 1.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. 2.The interface(s) may go Error-Down (crc-statistics) because there is no shutdown configuration on the interfaces.Continue? [Y/N]: y [*SwitchB-Stack-Port1/1] commit [~SwitchB-Stack-Port1/1] return 保存SwitchB的配置后重启设备。

save Warning: The current configuration will be written to the device. Continue? [Y/N]: y reboot Warning: The system will reboot. Continue? [Y/N]: y 打开SwitchA的堆叠端口。

# 在SwitchB重启过程中,打开SwitchA上之前被关闭的堆叠端口,使SwitchA和SwitchB建立堆叠。

[~SwitchA] interface stack-port 1/1 [~SwitchA-Stack-Port1/1] undo shutdown [*SwitchA-Stack-Port1/1] commit [~SwitchA-Stack-Port1/1] return

建议在SwitchB重启过程中打开SwitchA上被关闭的堆叠端口,如果在SwitchB重启完成后再打开,会因为堆叠合并而导致SwitchB再自动重启一次。

验证配置结果。

# 等待几分钟后,在主交换机SwitchA上使用命令display stack查看堆叠是否组建成功。

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

如上所示,显示两台交换机的信息,表示堆叠建立成功,且主交换机为成员ID为1的设备,即SwitchA。

# 查看堆叠系统拓扑信息。

display stack topology Stack Topology: ---------------------------------------------- Stack-Port 1 Stack-Port 2 MemberID Status Neighbor Status Neighbor ---------------------------------------------- 1 up 2 -- -- 2 up 1 -- -- ---------------------------------------------- Stack Link: ---------------------------------------------------------------------------- Stack-Port Port Status PeerPort PeerStatus ---------------------------------------------------------------------------- Stack-Port1/1 10GE1/0/1 up 10GE2/0/1 up Stack-Port1/1 10GE1/0/2 up 10GE2/0/2 up Stack-Port1/1 10GE1/0/3 up 10GE2/0/3 up Stack-Port1/1 10GE1/0/4 up 10GE2/0/4 up Stack-Port2/1 10GE2/0/1 up 10GE1/0/1 up Stack-Port2/1 10GE2/0/2 up 10GE1/0/2 up Stack-Port2/1 10GE2/0/3 up 10GE1/0/3 up Stack-Port2/1 10GE2/0/4 up 10GE1/0/4 up ---------------------------------------------------------------------------- 保存堆叠系统配置。

在检查堆叠已成功建立后,建议用户立即使用save命令保存堆叠系统配置。

save Warning: The current configuration will be written to the device. Continue? [Y/N]: y


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有