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.
See the progression from Pseudowire → VPLS → EVPN, and EVPN as the VXLAN control plane.
Everything EVPN does is a BGP EVPN NLRI route type. Know these cold:
| Type | Name | Job |
|---|---|---|
| 1 | Ethernet 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). |
| 2 | MAC/IP Advertisement | The workhorse: advertises a host MAC (and optionally its IP → ARP/ND suppression, host routing). Carries the L2VNI and, for symmetric IRB, the L3VNI. |
| 3 | Inclusive Multicast Ethernet Tag (IMET) | Auto-discovers PEs in a BD and builds the BUM flood list (ingress replication or a PIM tree). |
| 4 | Ethernet Segment (ES) | Discovers PEs sharing a multihomed segment and elects the Designated Forwarder. |
| 5 | IP Prefix | L3 routing: advertises IP prefixes (not just /32 host routes) — EVPN as an L3VPN, plus external/summary routes. |
| 6 / 7 / 8 | SMET / IGMP Join & Leave Sync | Optimized multicast (OISM) — selective forwarding & multihomed IGMP-state sync. Advanced. |
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.
| Field | Size | Note |
|---|---|---|
| RD | 8 | Per the originating EVI (or ES for per-ES A-D). |
| Ethernet Segment Identifier (ESI) | 10 | The multihomed segment this A-D is about. |
| Ethernet Tag ID | 4 | Per-EVI: the tag. Per-ES: set to MAX-ET (0xFFFFFFFF). |
| MPLS Label / VNI | 3 | Per-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.
| Field | Size | Note |
|---|---|---|
| RD | 8 | MAC-VRF / EVI. |
| ESI | 10 | Which segment the host sits behind (0 = single-homed). |
| Ethernet Tag ID | 4 | Broadcast domain within the EVI. |
| MAC Address Length | 1 | In bits — normally 48. |
| MAC Address | 6 | The host MAC being advertised. |
| IP Address Length | 1 | 0, 32, or 128 bits. |
| IP Address | 0 / 4 / 16 | Optional — enables ARP/ND suppression and host routing. |
| MPLS Label1 / L2VNI | 3 | The bridge domain (MAC-VRF). |
| MPLS Label2 / L3VNI | 0 / 3 | Optional — 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).
| Field | Size | Note |
|---|---|---|
| RD | 8 | EVI. |
| Ethernet Tag ID | 4 | The BD being flooded. |
| IP Address Length | 1 | Of the originator address. |
| Originating Router's IP | 4 / 16 | The 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.
| Field | Size | Note |
|---|---|---|
| RD | 8 | — |
| ESI | 10 | The shared segment. |
| IP Address Length | 1 | — |
| Originating Router's IP | 4 / 16 | The 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.
| Field | Size | Note |
|---|---|---|
| RD | 8 | IP-VRF. |
| ESI | 10 | Usually 0. |
| Ethernet Tag ID | 4 | Usually 0. |
| IP Prefix Length | 1 | A real prefix length — not just /32 or /128. |
| IP Prefix | 4 / 16 | The network being advertised. |
| GW IP Address | 4 / 16 | Optional overlay next-hop. |
| MPLS Label / L3VNI | 3 | The 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 NLRI carries identity; these BGP extended communities carry the semantics:
| Extended community | On | Carries |
|---|---|---|
| Route Target (RT) | all | Import/export policy — which EVI/VRF imports the route. |
| MAC Mobility | Type 2 | Sequence number (newest wins on a move) + sticky/static flag. |
| ESI Label | Type 1 per-ES | Split-horizon label + single-active vs all-active flag. |
| ES-Import RT | Type 4 | Auto-derived from the ESI so only same-ES PEs import it. |
| Router's MAC | Type 2 / 5 | The next-hop MAC for symmetric IRB / L3VNI routing. |
| Default Gateway | Type 2 | Marks the anycast-gateway MAC/IP so every leaf shares it. |
| Encapsulation | all | The data plane (VXLAN / MPLS / NVGRE / SRv6) so receivers decap correctly. |
| Term | Meaning |
|---|---|
| EVI | EVPN Instance — a VPN (a broadcast domain or set of them). Identified by RD + RT, like a VRF. |
| Ethernet Segment (ES) / ESI | The set of links by which a device is multihomed to multiple PEs; the ESI is its 10-byte identifier (0 = single-homed). |
| Ethernet Tag | Identifies a broadcast domain within an EVI (e.g. a VLAN) for VLAN-aware bundle services. |
| RD / RT | Same roles as L3VPN: RD makes routes unique, RT controls import/export (which EVIs share). |
| VNI / label | L2VNI = bridge domain; L3VNI = the routing (VRF) domain for inter-subnet traffic. |
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.
The trick is that known-unicast uses both PEs while BUM is gated to one, and split-horizon stops the loops. Step by step:
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.
The features people list for EVPN aren't separate magic; each falls out of a specific route type or community:
| Benefit | How it's implemented |
|---|---|
| Multipath / ECMP | Aliasing (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 balancing | CE→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 forwarding | All-active multihoming — both PEs forward known unicast at once; the DF only gates BUM, so there's no idle standby link. |
| Fast convergence | Mass 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 & flooding | Control-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 suppression | Type 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 gateway | Every 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. |
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 IRB | Symmetric IRB | |
|---|---|---|
| Model | Bridge-Route-Bridge; ingress leaf routes into the dest L2VNI | Route-Route; both leaves route via a common L3VNI |
| State | Every leaf needs all destination VNIs/ARP | Leaf needs only its local VNIs + the L3VNI |
| Scale | Simpler, less scalable | The 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.
| VPLS | EVPN | |
|---|---|---|
| MAC learning | Data plane (flood/learn) | Control plane (MP-BGP) |
| Multihoming | Single-active, awkward | All-active (ESI + DF) |
| BUM / ARP | Flood everywhere | Reduced; ARP suppression |
| L2 + L3 | L2 only | Integrated (IRB, Type 5) |
| Data plane | MPLS | VXLAN / MPLS / SRv6 |