← Interview Prep

EVPN — Theory

EVPN as a BGP control plane for L2 and L3 VPNs: the route types (1 A-D, 2 MAC/IP, 3 IMET, 4 ES, 5 IP-prefix), EVI/ES/ESI/RD/RT, all-active multihoming (DF election, split-horizon, aliasing, mass withdrawal), MAC mobility & ARP suppression, symmetric vs asymmetric IRB & distributed anycast gateway, VXLAN/MPLS/SRv6 data planes, and EVPN vs VPLS.

EVPN is a BGP-based control plane for building Layer-2 and Layer-3 VPNs. It replaced VPLS's data-plane flood-and-learn with MAC learning in MP-BGP — the same way L3VPN learns IP routes — and became the one control plane behind modern DC fabrics (over VXLAN) and service-provider VPNs (over MPLS/SRv6). If you understand L3VPN's RD/RT machinery, EVPN is that idea extended to MACs, with multihoming and integrated routing bolted on.

One control plane, many data planes: EVPN routes ride the L2VPN/EVPN MP-BGP address family; the actual encapsulation is VXLAN (RFC 8365, data centers), MPLS (RFC 7432, SP), or SRv6. The route types are the whole subject.

Why EVPN (what it fixes over VPLS)

See the progression from Pseudowire → VPLS → EVPN, and EVPN as the VXLAN control plane.

The route types

Everything EVPN does is a BGP EVPN NLRI route type. Know these cold:

TypeNameJob
1Ethernet Auto-Discovery (A-D)Per-ES and per-EVI. Enables aliasing (load-balance to a multihomed host) and mass withdrawal (fast convergence when a link fails).
2MAC/IP AdvertisementThe workhorse: advertises a host MAC (and optionally its IP → ARP/ND suppression, host routing). Carries the L2VNI and, for symmetric IRB, the L3VNI.
3Inclusive Multicast Ethernet Tag (IMET)Auto-discovers PEs in a BD and builds the BUM flood list (ingress replication or a PIM tree).
4Ethernet Segment (ES)Discovers PEs sharing a multihomed segment and elects the Designated Forwarder.
5IP PrefixL3 routing: advertises IP prefixes (not just /32 host routes) — EVPN as an L3VPN, plus external/summary routes.
6 / 7 / 8SMET / IGMP Join & Leave SyncOptimized multicast (OISM) — selective forwarding & multihomed IGMP-state sync. Advanced.

Inside each route type

Every EVPN route is an NLRI of the form route-type + length + type-specific value, carried in MP-BGP (AFI 25 L2VPN, SAFI 70 EVPN). The value always begins with the RD; the real meaning is in the remaining fields plus a few extended communities. Here is what's actually inside each one.

Type 1 — Ethernet Auto-Discovery (A-D)

FieldSizeNote
RD8Per the originating EVI (or ES for per-ES A-D).
Ethernet Segment Identifier (ESI)10The multihomed segment this A-D is about.
Ethernet Tag ID4Per-EVI: the tag. Per-ES: set to MAX-ET (0xFFFFFFFF).
MPLS Label / VNI3Per-EVI carries the label used for aliasing.

Two flavors: per-EVI A-D drives aliasing (remote PEs load-balance to the ES); per-ES A-D drives mass withdrawal (one route pulls all MACs on a failed link) and carries the ESI Label extended community for split-horizon + the single/all-active flag.

Type 2 — MAC/IP Advertisement

FieldSizeNote
RD8MAC-VRF / EVI.
ESI10Which segment the host sits behind (0 = single-homed).
Ethernet Tag ID4Broadcast domain within the EVI.
MAC Address Length1In bits — normally 48.
MAC Address6The host MAC being advertised.
IP Address Length10, 32, or 128 bits.
IP Address0 / 4 / 16Optional — enables ARP/ND suppression and host routing.
MPLS Label1 / L2VNI3The bridge domain (MAC-VRF).
MPLS Label2 / L3VNI0 / 3Optional — the IP-VRF, for symmetric IRB.

Rides with the MAC Mobility extended community (sequence number + sticky flag) for VM moves and duplicate-MAC detection, and the Router's MAC extended community (the next-hop MAC for symmetric IRB).

Type 3 — Inclusive Multicast Ethernet Tag (IMET)

FieldSizeNote
RD8EVI.
Ethernet Tag ID4The BD being flooded.
IP Address Length1Of the originator address.
Originating Router's IP4 / 16The advertising VTEP/PE.

The how of BUM lives in the attached PMSI Tunnel attribute: tunnel type (ingress replication / PIM / mLDP), tunnel ID, and the flood label/VNI. That's what builds the replication list.

Type 4 — Ethernet Segment

FieldSizeNote
RD8
ESI10The shared segment.
IP Address Length1
Originating Router's IP4 / 16The PE on this ES.

Tagged with the ES-Import RT (auto-derived from the ESI) so only PEs on the same segment import it — that's how they discover each other and run DF election.

Type 5 — IP Prefix

FieldSizeNote
RD8IP-VRF.
ESI10Usually 0.
Ethernet Tag ID4Usually 0.
IP Prefix Length1A real prefix length — not just /32 or /128.
IP Prefix4 / 16The network being advertised.
GW IP Address4 / 16Optional overlay next-hop.
MPLS Label / L3VNI3The IP-VRF to route into.

Carries the Router's MAC extended community as the inner-destination MAC for the L3VNI. This is how EVPN advertises summaries, external, and silent-host routes — EVPN as a full L3VPN (see MPLS L3VPN).

The extended communities that complete the picture

The NLRI carries identity; these BGP extended communities carry the semantics:

Extended communityOnCarries
Route Target (RT)allImport/export policy — which EVI/VRF imports the route.
MAC MobilityType 2Sequence number (newest wins on a move) + sticky/static flag.
ESI LabelType 1 per-ESSplit-horizon label + single-active vs all-active flag.
ES-Import RTType 4Auto-derived from the ESI so only same-ES PEs import it.
Router's MACType 2 / 5The next-hop MAC for symmetric IRB / L3VNI routing.
Default GatewayType 2Marks the anycast-gateway MAC/IP so every leaf shares it.
EncapsulationallThe data plane (VXLAN / MPLS / NVGRE / SRv6) so receivers decap correctly.

Core concepts

TermMeaning
EVIEVPN Instance — a VPN (a broadcast domain or set of them). Identified by RD + RT, like a VRF.
Ethernet Segment (ES) / ESIThe set of links by which a device is multihomed to multiple PEs; the ESI is its 10-byte identifier (0 = single-homed).
Ethernet TagIdentifies a broadcast domain within an EVI (e.g. a VLAN) for VLAN-aware bundle services.
RD / RTSame roles as L3VPN: RD makes routes unique, RT controls import/export (which EVIs share).
VNI / labelL2VNI = bridge domain; L3VNI = the routing (VRF) domain for inter-subnet traffic.

Multihoming

The headline EVPN feature. A CE dual-homed to two (or more) PEs forms one Ethernet Segment (ES), identified by a shared ESI on those links. Two modes: single-active (only one PE forwards for the ES; the other is standby) and all-active (both forward simultaneously) — the usual DC choice, and the one worth walking through carefully.

How all-active actually works

The trick is that known-unicast uses both PEs while BUM is gated to one, and split-horizon stops the loops. Step by step:

  1. One bundle to the CE. The CE has a single LACP LAG whose members land on PE1 and PE2. The two PEs share the same ESI on those links and present a common LACP system-ID, so the CE sees one partner and hashes its flows across both links — both active, no STP.
  2. The PEs discover each other & elect a DF. PE1 and PE2 find they're on the same ES via the Type 4 (Ethernet Segment) route (matched by the auto-derived ES-Import RT), then run Designated-Forwarder election per EVI/VLAN. Only the DF sends BUM down toward the CE for that VLAN — so a broadcast isn't delivered twice.
  3. Known unicast forwards on both, both directions. CE→core: the CE's LACP hash lands a flow on PE1 or PE2; whichever receives it forwards into the fabric — both are live. core→CE: here's the key — a remote PE learns the host's MAC from a Type 2 (say PE1 advertised it) and learns from the Type 1 per-EVI Ethernet A-D that the whole ESI is reachable via both PE1 and PE2. That's aliasing: the remote PE installs an ECMP next-hop to the ESI and load-balances return traffic across PE1 and PE2 even though only PE1 advertised the MAC.
  4. Split-horizon prevents the echo. A BUM frame the CE sends to PE1 floods the fabric and reaches PE2 (the other PE on the same ESI). PE2 must not forward it back down to the CE (it already arrived locally). This is enforced by the ESI Label (MPLS, carried in Type 1 per-ES) or local-bias (VXLAN): a frame from the peer VTEP on a shared ESI is blocked from egressing the local ESI link.
  5. Failure is one message. If PE1's link to the CE dies, PE1 sends a single Type 1 per-ES withdrawalmass withdrawal — and every remote PE instantly stops using PE1 for the entire ESI (all its MACs at once) and shifts to PE2, without re-learning each MAC. DF re-election restores BUM. Sub-second, regardless of how many hosts sat behind that link.

So: Type 4 = who's on the ES + DF; Type 1 per-EVI = aliasing (ECMP); Type 1 per-ES = split-horizon label + mass withdrawal; Type 2 = the MACs themselves.

Benefits — and how they're implemented

The features people list for EVPN aren't separate magic; each falls out of a specific route type or community:

BenefitHow it's implemented
Multipath / ECMPAliasing (Type 1 per-EVI A-D) advertises the ESI as reachable via all attached PEs → remote PEs install ECMP to the segment; the routed underlay (leaf-spine Clos) adds fabric-wide ECMP.
Load balancingCE→PE by LACP hashing (common system-ID); remote→ESI by aliasing ECMP; underlay per-flow by the VXLAN outer-UDP source-port entropy (hash of the inner flow).
Active/Active forwardingAll-active multihoming — both PEs forward known unicast at once; the DF only gates BUM, so there's no idle standby link.
Fast convergenceMass withdrawal (Type 1 per-ES): one route pulls every MAC behind a failed link — no per-MAC relearn. BGP next-hop tracking / PIC speeds the rest.
Minimize unknown-unicast & floodingControl-plane learning: MACs are advertised in BGP (Type 2) before traffic flows, so destinations are already known — little to no unknown-unicast flooding (and it can be dropped/suppressed).
Proxy ARP / ARP&ND suppressionType 2 carries MAC and IP, so each leaf answers ARP/ND locally from its EVPN table (proxy) instead of flooding the request across the fabric.
Distributed L3 gatewayEvery leaf owns the same anycast gateway IP+MAC (Default-Gateway community / anycast-GW config); inter-subnet routing is local via symmetric IRB (Type 2 + L3VNI + Router's-MAC) and Type 5 prefixes — no hairpin to a central GW, and VM moves need no gateway change.

MAC mobility & ARP suppression

Integrated Routing & Bridging (IRB)

EVPN bridges within a subnet (L2VNI) and routes between subnets (L3VNI) using an IRB interface on every leaf — a distributed anycast gateway (same gateway IP+MAC everywhere), so the first hop is always local.

Asymmetric IRBSymmetric IRB
ModelBridge-Route-Bridge; ingress leaf routes into the dest L2VNIRoute-Route; both leaves route via a common L3VNI
StateEvery leaf needs all destination VNIs/ARPLeaf needs only its local VNIs + the L3VNI
ScaleSimpler, less scalableThe DC standard (Type 2 carries the L3VNI + router-MAC)

Type 5 handles prefixes with no local MAC (summaries, external, silent hosts) and is how EVPN acts as a full L3VPN.

Data planes, services & underlay

EVPN vs VPLS

VPLSEVPN
MAC learningData plane (flood/learn)Control plane (MP-BGP)
MultihomingSingle-active, awkwardAll-active (ESI + DF)
BUM / ARPFlood everywhereReduced; ARP suppression
L2 + L3L2 onlyIntegrated (IRB, Type 5)
Data planeMPLSVXLAN / MPLS / SRv6

Likely interview questions

Further reading: Juniper EVPN documentation. Related: L2VPN (PW/VPLS/EVPN) · VLAN & VXLAN · MP-BGP · MPLS L3VPN.