What are vPC and MLAG, and what problem do they solve?
Show the answer
Say this first
They let two separate switches act as one LACP partner, so a server or downstream switch can bundle links to both and use all of them. There is no STP blocking and no single switch failure takes the device down, while each switch keeps its own control plane and can be upgraded on its own. vPC is the NX-OS feature. MLAG is the generic term and the name of Arista's feature.
Go deeper
Building blocks
| vPC (NX-OS) | MLAG (EOS) | Job |
|---|---|---|
| vPC domain | MLAG domain | The pair, identified by a domain ID |
| Peer link | Peer link | Port-channel carrying member VLANs and state sync |
| Peer keepalive | Heartbeat, dual-primary detection | Telling "link down" from "peer dead" |
vpc 20 on a port-channel | mlag 20 on a port-channel | Member port toward the device |
How the pair looks like one switch
- Both peers send the same LACP system ID. NX-OS derives a vPC system MAC from the domain ID
(
0023.04ee.bexx, where xx is the domain ID in hex). - MAC addresses, ARP entries (with
ip arp synchronize) and IGMP snooping state are synced across the peer link. - Each peer forwards locally. The peer link carries data only for single-attached devices and failures.
- Loop prevention: a frame that arrived over the peer link is not sent out a vPC member port, unless the peer's matching member port is down.
Compared with stacking or VSS
Stacking, VSS and StackWise Virtual merge two switches into one control plane with one config. vPC and MLAG keep two brains. You upgrade one peer at a time, but you must keep the configs consistent, which is what the consistency checks enforce.
They will ask next
Can a vPC domain have three switches?
No, it is always a pair. EVPN multihoming with an ESI is the standards-based way to attach a host to more than two leaves.
What happens to spanning tree?
STP still runs as a safety net. With
peer-switchon NX-OS both peers send BPDUs with the same bridge ID, so downstream switches see one root and there is no reconvergence when one peer fails.
Traps
- Calling vPC a stack. There are two control planes and two configs.