Stack Split and Dual-Active Detection
Stack Split
After a stack is set up, the master and standby switches periodically send heartbeat packets to maintain the stack state. If communication between the two switches is interrupted due to failures of stack cables or MPUs or power failure or restart of a switch, the stack splits into two standalone switches, as shown in Figure 1-15.
After a stack splits, the two switches use the same global configuration if they are running normally. In this case, the two switches use the same IP address and MAC address to communicate with other network devices. The address conflict causes a communication failure on the entire network. Dual-active detection (DAD) can be configured to ensure that only one master switch exists after the stack splits.
Dual-Active Detection
Dual-active detection (DAD) is a protocol that can detect stack split and dual-active situations and take recovery actions to minimize impact of a stack split on services.
DAD Detection Modes
Direct mode through service ports
In this mode, DAD is performed through dedicated direct links between member switches, as shown in Figure 1-16.The direct detection links can also be connected through an intermediate device, as shown in Figure 1-17. In this mode, the intermediate device must be configured to transparently transmit BPDUs. For details on the configuration method, see "Configuring Interface-based Layer 2 Protocol Tunneling" in Ethernet Switching Configuration Guide.Relay mode through Eth-Trunk interfaces
In this mode, DAD detection is performed through an inter-device Eth-Trunk link connected to a relay agent, as shown in Figure 1-18. The DAD relay function must be enabled on the relay agent. Compared with the direct mode, the relay mode does not require additional interfaces because the Eth-Trunk interface can perform DAD relay detection while running other services.To enable DAD packets to be forwarded over Eth-Trunk member links, use a switch that supports the DAD relay function as the relay agent. All Huawei CloudEngine series switches support the DAD relay function. Huawei S series switches support this function since V200R003C00. On S series switches, DAD is also called multi-active detection (MAD).
The relay agent can be a standalone switch or a stack. That is, two stacks can function as a relay agent for each other, as shown in Figure 1-19.To avoid interference to DAD in the two stacks, configure different domain IDs for the two stacks. In addition, the Eth-Trunk interface used for DAD detection must be different from the Eth-Trunk interface where the DHCP relay function is enabled.
DAD through management interfaces
In this mode, links established on management interfaces of the stack member switches are used as DAD links, as shown in Figure 1-20. This mode can be used when all stack member switches connect to the management network through their management interfaces. This mode does not occupy additional ports and does not require a DAD relay agent.To implement DAD through management interfaces, ensure that IP addresses are configured for management interfaces. After member switches set up a stack, only one management interface MEth0/0/0/0 is displayed for the stack. You only need to configure an IP address for this management interface.
As shown in Figure 1-21, when no management network exists, DAD can be implemented when stack member switches directly connect to each other through management interfaces. In this situation, the management interfaces must also have IP addresses configured.DAD through stack member ports
In this mode, links established between physical stack member ports of the stack member switches are used as DAD links, as shown in Figure 1-22. This mode uses stack links as DAD links and do not occupy additional ports.
Dual-Active Conflict Handling and Fault Recovery
After DAD is configured in a stack, the master switch periodically sends DAD competition packets over the detection links. After the stack splits, the switches exchange DAD competition packets and compare information in the received DAD competition packet with local information. If local information is better, the local switch remains in Active state and continues forwarding service packets. If the received information is better, the switch stack turns to the Recovery state. In this case, all the service interfaces except the excluded ones on the switch are Error-Down and stop forwarding service packets.
- Error-Down state of service ports: The stack in which the following situations do not occur wins:
- All service ports on a member switch are Error-Down because no forwarding link is available (no-stack-link).
- All service ports on a member switch are Error-Down because the links between LPUs and SFUs are faulty (fabric-link-failure).
If the preceding situations occur, the stack in which the Error-Down reason is no-stack-link wins.
Stack priority: The switch with a higher stack priority wins.
MAC address: The switch with a smaller MAC address wins.
A dual-active conflict will not be detected among the switches that do not support stack setup.
After the stack links recover, the two stacks merge into one. The switches in Recovery state restart and restore the Error-Down service interfaces. Then the entire stack recovers.
If the switch in Active state also fails before the faulty stack links recover, remove this switch from the network first, and then use a command to start the switches in Recovery state, enabling the switches to take over services on the original switch in Active state. After the faulty switch and stack links recover, connect the switch to the network again so that the stacks can merge.