Sub topic 15
Multi-chassis link aggregation across two switches
This chapter assumes you know how a standard port channel works, how LACP negotiates a bundle, and why spanning tree blocks redundant paths. It covers the design problem that multi-chassis link aggregation (MLAG) solves and the failures that come with it.
The problem with one switch
A normal LAG ends on a single switch. If a server connects both of its links to one switch, the switch is a single point of failure. If the server instead connects one link to each of two switches, the two links cannot form a LAG. Each switch has its own LACP system ID, so the server sees two different partners and refuses to bundle them.
Without a bundle, the server has two uplinks to the same VLANs. Spanning tree then blocks one of them, and you lose both the extra bandwidth and the benefit of having two links.
What MLAG does
MLAG lets two physical switches present themselves as one logical switch to the device at the other end. The server or downstream switch builds an ordinary LACP bundle and sees one partner. Underneath, each member link ends on a different chassis.
The two switches are called peers. They are joined by a peer link and run a control protocol over it. The peers share a common LACP system ID, so the downstream device sees a single partner. They also synchronize MAC address tables, port channel state, and VLAN information.
How the pieces fit
| Element | Purpose |
|---|---|
| Peer link | Carries control traffic, MAC synchronization, and data frames that must cross between the peers |
| Keepalive path | A separate path, often over the management network, used to tell whether the other peer is alive |
| Shared system ID | Makes both peers look like one LACP partner |
| MLAG ID or domain | Ties the matching port channel on each peer into one logical bundle |
Vendors use different names. Cisco calls its designs vPC and StackWise Virtual, Arista uses MLAG, and Juniper uses MC-LAG. The protocols are proprietary and are not interoperable between vendors. The server side needs nothing special, only standard LACP.
Traffic behavior
The downstream device hashes each flow to one member link, as in a normal LAG. The peer that receives a frame normally forwards it directly. Peers prefer to send traffic out of their local MLAG member ports instead of across the peer link, which keeps the peer link lightly loaded.
If a peer's local member port is down, traffic for that host must cross the peer link to the other peer. Size the peer link to carry this case.
Failure modes
- Member link failure. The bundle continues on the remaining link, and the downstream device rehashes flows onto it.
- Peer switch failure. The surviving peer keeps the bundle up, and the server loses half its bandwidth.
- Peer link failure. The peers can no longer synchronize. The keepalive path tells them both are alive, so the secondary peer shuts down its MLAG ports to avoid a split brain, where both peers act as the active forwarder.
- Both paths fail. Without a keepalive, each peer may assume the other is dead and both may forward. This causes duplicate traffic and MAC flapping, so keep the keepalive path independent of the peer link.
Inconsistent configuration between peers is a common cause of trouble. VLAN lists, trunk modes, and LACP settings must match on both switches. Most platforms have a command that reports consistency, such as show vpc consistency-parameters on Cisco NX-OS.
Exercise
Exercise
A server connects one link to each of two MLAG peer switches. The peer link goes down, but the keepalive path still works. What do the peers do, and why?
Show answer
The secondary peer shuts down its MLAG member ports, so only the primary peer forwards. The keepalive shows that both peers are still alive. Without this step, both would forward independently, which causes split brain, duplicate traffic, and MAC flapping.
Exercise
Why can't a server form a normal LACP bundle across two ordinary, unrelated switches?
Show answer
Each switch sends its own LACP system ID, so the server sees two different partners. LACP only bundles links that lead to the same partner. MLAG fixes this by giving both peers a shared system ID.