Traffic Forwarding When an M-LAG Works Properly
An M-LAG dual-active system starts to work after it is established successfully. The M-LAG master and backup devices load balance traffic and their forwarding behaviors are the same. The following describes how an M-LAG forwards traffic when it works properly.
Unicast Traffic Forwarding
Unicast traffic forwarding includes Layer 2 known unicast traffic forwarding and Layer 3 unicast traffic forwarding.
In Figure 4-6, an access device is dual-homed to an M-LAG dual-active system and known unicast traffic is forwarded as follows:
For north-south unicast traffic from the M-LAG access side, M-LAG member devices forward the traffic together after receiving it from the access device through aggregated links in load balancing mode. M-LAG master and backup devices forward received north-south unicast traffic to the network side based on the routing table.
For east-west unicast traffic, when the M-LAG dual-active system is set up and there is no single-homing interface, Layer 2 traffic is preferentially forwarded through the local M-LAG device, and Layer 3 traffic is forwarded through dual-active gateways. Layer 2 and Layer 3 east-west unicast traffic is not forwarded through the peer-link and is directly forwarded to corresponding member interfaces by M-LAG master and backup devices.
Multicast Traffic Forwarding
M-LAG Connecting to a Layer 2 Network
If an M-LAG is connected to an upstream Layer 2 network, traffic from the Layer 2 network to the M-LAG can only be sent to one device in the M-LAG; otherwise, a loop may occur. In Figure 4-7, assume that the M-LAG uplink interface on the right M-LAG member device is blocked by STP.
When ServerB functions as a multicast source and ServerA functions as a multicast group member, both M-LAG master and backup devices can forward multicast traffic. When receiving traffic from the network side, the receiving device directly forwards the traffic to the local M-LAG member interface. If the local M-LAG member interface fails, multicast traffic is forwarded through the peer-link to the M-LAG member interface on the other M-LAG device for transmission, as shown in Figure 4-8.
When ServerA functions as a multicast source and ServerB functions as a multicast group member, traffic from the multicast source is load balanced to M-LAG master and backup devices. Because the uplink interface on the right M-LAG device is blocked, the outbound interface of multicast traffic is the peer-link interface.
M-LAG Connecting to a Layer 3 Network
If an M-LAG is connected to an upstream Layer 3 network, M-LAG member devices need to support Layer 2 and Layer 3 multicast. In Figure 4-9, an access device is dual-homed to an M-LAG dual-active system and multicast traffic is forwarded as follows:
When ServerB functions as a multicast source and ServerA functions as a multicast group member, both M-LAG master and backup devices divert traffic from the multicast source, query the local multicast forwarding table, and load balance the traffic to the multicast group member based on the following rules:- If the last digit of the multicast group address is an odd number (for example, 225.1.1.1, FF1E::1, or FF1E::B), the M-LAG device where the master M-LAG member interface resides forwards the traffic to the multicast group member.
- If the last digit of the multicast group address is an even number (for example, 225.1.1.2, FF1E::2, or FF1E::A), the M-LAG device where the backup M-LAG member interface resides forwards the traffic to the multicast group member.
In versions earlier than V200R003C00, only the M-LAG device where the master M-LAG member interface resides forwards multicast traffic to the multicast group member. In V200R003C00 and later versions, both devices where the master and backup M-LAG member interfaces reside can forward multicast traffic to the multicast group member to implement load balancing. If the two M-LAG devices run different versions, the multicast traffic forwarding rule is subject to the device running the earlier version.
When ServerA functions as a multicast source and ServerB functions as a multicast group member, traffic sent by the multicast source is load balanced to M-LAG master and backup devices. After receiving the traffic, M-LAG master and backup devices query the local multicast forwarding table and forward the traffic.
According to multicast traffic forwarding in the preceding figure, an independent Layer 3 link needs to be configured between M-LAG devices when the M-LAG forwards multicast traffic, which is different from unicast traffic forwarding. The reason is that only one uplink exists at the network side when a fault occurs, and the independent Layer 3 link deployed between M-LAG master and backup devices can transmit multicast packets. In Figure 4-10, the network-side link is connected to the M-LAG backup device. Multicast packets forwarded through a peer-link interface cannot be forwarded to the specified M-LAG member interface because of unidirectional isolation, and multicast packets in which the last digit of the multicast group address is an odd number cannot be forwarded to the M-LAG device where the master M-LAG member interface resides through the peer-link. Therefore, the multicast packets can only be forwarded to the M-LAG device through the independent Layer 3 link.
Broadcast Traffic Forwarding
M-LAG Connecting to a Layer 2 Network
If an M-LAG is connected to an upstream Layer 2 network, traffic from the Layer 2 network to the M-LAG can only be sent to one device in the M-LAG; otherwise, a loop may occur. The following uses traffic forwarding on an M-LAG master device as an example. In Figure 4-11, assume that the M-LAG uplink interface on the right M-LAG member device is blocked by STP. After receiving broadcast traffic, the M-LAG master device forwards the traffic to each next hop. When the traffic reaches the M-LAG backup device, the traffic is not forwarded to S-1 because of the unidirectional isolation mechanism between peer-link interfaces and M-LAG member interfaces.M-LAG Connecting to a Layer 3 Network
The following uses traffic forwarding on an M-LAG backup device as an example. In Figure 4-12, the M-LAG backup device forwards received broadcast traffic to each next hop. When the traffic reaches the M-LAG master device, the traffic is not forwarded to S-1 because of the unidirectional isolation mechanism between peer-link interfaces and M-LAG member interfaces.