Example for Configuring a Stack
Networking Requirements
An enterprise builds a data center. The data center network must provide high reliability on the core layer and have a simple structure to facilitate configuration and management.
To meet requirements of the enterprise, core switches SwitchA and SwitchB set up a stack. Figure 1-31 shows the network topology.
Configuration Roadmap
Make a stack plan.
Connect SwitchA and SwitchB using stack cables based on the stack plan.
Configure stack software on SwitchA and SwitchB, including the stack member ID, stack priority, stack domain ID, and stack port.
Save the configurations of SwitchA and SwitchB and enable the stacking function on the two 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 100.
- 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.
SwitchA and SwitchB each use two LPUs for stack connections and are connected using ports 10GE1/0/1 to 10GE1/0/2 and 10GE2/0/1 and 10GE2/0/2.
- Connect stack cables.In Figure 1-32, SwitchA and SwitchB are connected using stack cables based on the stack plan. The two switches are connected using SIP ports on MPUs and stack member ports on LPUs.
- Configure stack parameters.
# On SwitchA, set the stack member ID to 1, stack priority to 150, stack domain ID to 10.
<HUAWEI> system-view [~HUAWEI] sysname SwitchA [*HUAWEI] commit [~SwitchA] stack [~SwitchA-stack] stack member 1 [~SwitchA-stack] stack priority 150 Info: The operation will take effect after reboot. [*SwitchA-stack] stack 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
# On SwitchB, set the stack member ID to 2, stack priority to 100, stack domain ID to 10.
<HUAWEI> system-view [~HUAWEI] sysname SwitchB [*HUAWEI] commit [~SwitchB] stack [~SwitchB-stack] stack member 2 Warning: The device will use the configuration of member ID 2 after the device resets. Continue? [Y/N]: y [*SwitchB-stack] stack priority 100 Info: The operation will take effect after reboot. [*SwitchB-stack] stack 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] quit [*SwitchB] commit
- Configure stack ports.
# Create a stack port on SwitchA, and add physical ports 10GE1/0/1 to 10GE1/0/2 and 10GE2/0/1 to 10GE2/0/2 to the stack port. Create a stack port on SwitchB, and add physical ports 10GE1/0/1 to 10GE1/0/2 and 10GE2/0/1 to 10GE2/0/2 to the stack port. The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
[~SwitchA] port-group group1 [*SwitchA-port-group-group1] group-member 10ge 1/0/1 to 10ge 1/0/2 [*SwitchA-port-group-group1] group-member 10ge 2/0/1 to 10ge 2/0/2 [*SwitchA-port-group-group1] shutdown [*SwitchA-port-group-group1] quit [*SwitchA] commit [~SwitchA] interface stack-port 1 [*SwitchA-Stack-Port1] port member-group interface 10ge 1/0/1 to 1/0/2 Warning: After the configuration is complete, 1.The interface(s) (10GE1/0/1-1/0/2) 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] port member-group interface 10ge 2/0/1 to 2/0/2 Warning: After the configuration is complete, 1.The interface(s) (10GE2/0/1-2/0/2) 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] quit [*SwitchA] commit
After service ports are configured as stack member ports, the port crc-statistics trigger error-down command is automatically configured on these member ports.
# Enable the shutdown physical ports on SwitchA and SwitchB after these ports have been added to stack ports. The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
[~SwitchA] port-group group1 [~SwitchA-port-group-group1] undo shutdown [*SwitchA-port-group-group1] quit [*SwitchA] commit [~SwitchA] quit
This operation can prevent these member ports from generating CRC error packets and then entering the Error-Down state. When ports are Up, CRC error packets may be generated on these ports if ports on both ends of a link are a stack member port and an ordinary service port respectively.
- 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 configuration Oper : Operation Conf : Configuration MB : MainBoard * : Offline configuration Isolated Port : The port is in stack mode, but does not belong to any Stack-Port Attribute Configuration: --------------------------------------------------------------- MemberID Domain Priority Mode Enable Oper(Conf) Oper(Conf) Oper(Conf) Oper(Conf) Oper --------------------------------------------------------------- 1(1) --(10) 100(150) MB(MB) Disable --------------------------------------------------------------- Stack-Port Configuration: -------------------------------------------------------------------------------- Stack-Port Member Ports -------------------------------------------------------------------------------- Stack-Port1 10GE1/0/1 10GE1/0/2 10GE2/0/1 10GE2/0/2 --------------------------------------------------------------------------------
- Save the configuration and enable the stacking function.
# Save the configuration of SwitchA and enable the stacking function. You are advised to enable the stacking function first on SwitchA that is specified as the master switch. This ensures that SwitchA restarts first and becomes the master switch.
<SwitchA> save Warning: The current configuration will be written to the device. Continue? [Y/N]: y <SwitchA> system-view [~SwitchA] stack [~SwitchA-stack] stack enable Warning: Make sure that one or more dual-active detection methods are configured once the conversion is complete and the device enters the stack mode. Switches working in different forward modes cannot set up a CSS. Current configuration will be converted to the next startup saved-configuration file of stack mode. System will reboot. Continue? [Y/N]: y
After the stacking function is enabled on a switch, this switch automatically restarts.
# Save the configuration of SwitchB and enable the stacking function.
<SwitchB> save Warning: The current configuration will be written to the device. Continue? [Y/N]: y <SwitchB> system-view [~SwitchB] stack [~SwitchB-stack] stack enable Warning: Make sure that one or more dual-active detection methods are configured once the conversion is complete and the device enters the stack mode. Switches working in different forward modes cannot set up a CSS. Current configuration will be converted to the next startup saved-configuration file of stack mode. System will reboot. Continue? [Y/N]: y
- Check whether the stack is set up successfully.
# Log in to the stack through the console interface or management interface of any switch and run the display stack command to check whether the stack is set up successfully. To log in through the management interface, specify the IP address of the master switch.
<SwitchA> display stack -------------------------------------------------------------------------------- MemberID Role MAC Priority DeviceType Description -------------------------------------------------------------------------------- 1 Master 006d-8835-2b00 150 CE16804 2 Standby 006d-8835-2c00 100 CE16804 --------------------------------------------------------------------------------
The preceding command output shows that a stack has been set up successfully and the master switch is the switch with the stack member ID 1, namely, SwitchA.
- Save the configuration.
# After a stack is set up successfully, you are advised to run the save command immediately to save the configuration.
<SwitchA> save Warning: The current configuration will be written to the device. Continue? [Y/N]: y
Configuration Files
Stack configuration file
# sysname SwitchA # stack # stack mode # stack member 1 domain 10 stack member 1 priority 150 # stack member 2 domain 10 # interface Stack-Port1/1 # interface Stack-Port2/1 # interface 10GE1/1/0/1 port mode stack stack-port 1/1 port crc-statistics trigger error-down # interface 10GE1/1/0/2 port mode stack stack-port 1/1 port crc-statistics trigger error-down # interface 10GE1/2/0/1 port mode stack stack-port 1/1 port crc-statistics trigger error-down # interface 10GE1/2/0/2 port mode stack stack-port 1/1 port crc-statistics trigger error-down # interface 10GE2/1/0/1 port mode stack stack-port 2/1 port crc-statistics trigger error-down # interface 10GE2/1/0/2 port mode stack stack-port 2/1 port crc-statistics trigger error-down # interface 10GE2/2/0/1 port mode stack stack-port 2/1 port crc-statistics trigger error-down # interface 10GE2/2/0/2 port mode stack stack-port 2/1 port crc-statistics trigger error-down # port-group group1 group-member 10GE1/1/0/1 group-member 10GE1/1/0/2 group-member 10GE1/2/0/1 group-member 10GE1/2/0/2 # return