Layer 2 VPNs and EVPN
What this domain tests
Layer 2 VPN and EVPN questions test VPLS signaling, L2VPN pseudowires, EVPN route types, multihoming, and MAC learning. You must know which component learns MACs in the control plane versus the data plane.
Core rules
- VPLS uses
instance-type vpls, avpls-id, sites, an RD, and an RT. BGP advertises l2vpn NLRI, and MAC learning is data-plane based unless you use EVPN. - L2VPN uses
instance-type l2vpn,encapsulation-type ethernet, local and remote site IDs, and a Layer 2 label per site. - EVPN-MPLS uses
instance-type evpnandprotocols evpn encapsulation mpls. EVPN route types: 1 auto-discovery/ESI, 2 MAC/IP, 3 inclusive multicast, 4 Ethernet segment, 5 IP prefix. - EVPN multihoming uses an ESI on the access interface:
set interfaces ae0 esi <10-byte-id> all-active. The ESI must match on both PEs; type-4 routes elect a designated forwarder for BUM traffic. - MAC mobility uses sequence numbers; a higher sequence number wins.
mac-mobilityhold-down and move limits reduce thrash. - EVPN-VXLAN uses
protocols evpn encapsulation vxlan, a VNI, and a VLAN-to-VNI mapping.
Worked example
Two PEs share an access bundle to a server:
set interfaces ae0 esi 00:11:22:33:44:55:66:77:88:99
set interfaces ae0 esi all-active
Reasoning: both PEs advertise the same ESI in type-1 and type-4 routes. The type-4 route is used for DF election per Ethernet segment; all-active allows per-flow load balancing while one PE handles BUM for the segment. If the ESI values differ, the PEs treat the segment as two separate sites and MACs flap.
Traps
- VPLS requires a full mesh of PWs or hierarchical VPLS; RT mismatch silently breaks the mesh.
- EVPN MAC learning is control-plane;
no-mac-learningcan be intentional on a VPLS site but breaks unknown-unicast flooding assumptions. - ESI mismatch is a common multihoming failure.
- MAC mobility sequence numbers are per-MAC; a stale high sequence can keep a MAC pinned to the wrong PE.