Example for Establishing a Stack of Two Switches (Configuring Software and Then Connecting Cables, Recommended)
Networking Requirements
An enterprise network needs to provide sufficient ports for access devices, and the network structure should be simple to facilitate configuration and management.
In Figure 1-30, SwitchA and SwitchB (two access switches) set up a stack.
Configuration Roadmap
Make a stack plan.
Complete the stack configuration of each switch based on the stack plan, including the stack member ID, stack priority, stack domain ID, and stack port. After the configuration is completed, save the configuration and power off these switches.
Connect the switches using stack cables, and then power on these switches.
Check whether a stack has been set up successfully.
Procedure
- Make a stack plan.
- Set the stack member IDs of SwitchA and SwitchB to 1 and 2 respectively.
- Specify SwitchA as the master switch and set a higher stack priority (150) for it. Set the stack priority of SwitchB to 120.
- Set the stack domain ID of SwitchA and SwitchB to 10 and ensure that this stack domain ID is unique among all stack domain IDs on the network.
- Configure SwitchA and SwitchB to use ports 10GE1/0/1 through 10GE1/0/4 for stack connections.
- Configure stack parameters.# On SwitchA, set the stack priority to 150 and stack domain ID to 10. By default, the stack member ID of a switch is 1. In this example, SwitchA retains the default stack member ID 1, and you do not configure this parameter.
<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
# On SwitchB, set the stack member ID to 2, stack priority to 120, and stack domain ID to 10.<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-configWarning: 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
NOTE:SwitchB has not restarted and its stack member ID is still 1. Therefore, member 1 is specified in the stack configuration.
The inherit-config parameter is specified when the stack member ID is changed, so SwitchB inherits the stack configuration of member 1 after restarting. If this parameter is not specified, SwitchB does not inherit the stack configuration of member 1 after restarting. You need to perform stack configuration on SwitchB based on member 2.
- Configure stack ports.# On SwitchA, add 10GE1/0/1 to 10GE1/0/4 to stack port 1/1.
[~SwitchA] interface stack-port 1/1[*SwitchA-Stack-Port1/1] port member-group interface 10ge 1/0/1 to 1/0/4Warning: 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
After service ports are configured as stack member ports, the port crc-statistics trigger error-down command is automatically configured on these member ports.
# On SwitchB, add 10GE1/0/1 to 10GE1/0/4 to stack port 1/1.[~SwitchB] interface stack-port 1/1[*SwitchB-Stack-Port1/1] port member-group interface 10ge 1/0/1 to 1/0/4Warning: 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
- Check the stack configuration.
# After the preceding configuration is completed, run the display stack configuration command to check whether the configuration is consistent with the stack plan. If not, modify the configuration. The command output on SwitchA is used as an example.
<SwitchA> display stack configurationOper : 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 -------------------------------------------------------------------------------- - Save the configuration and then power off the switches.
# Save the configurations of SwitchA and SwitchB and then power off them. The configuration of SwitchB is similar to that of SwitchA.
<SwitchA> saveWarning: The current configuration will be written to the device. Continue? [Y/N]: y
- Connect the two switches using stack cables based on the stack plan. After the switches are connected, power on them.
You are advised to first power on the high-priority switch so that it starts first and becomes the master switch.

