BGP EVPN route types - Type-1 per ESI & Per EVI

 

⚙️ EVPN Background

In BGP EVPN, several route types are used:

Route TypeNamePurpose
Type 1Ethernet Auto-Discovery (EAD)Used for ESI advertisement & mass-withdrawal
Type 2MAC/IP AdvertisementAdvertise MAC and IP reachability
Type 3Inclusive Multicast Ethernet Tag (IMET)Used for BUM traffic flooding trees
Type 4Ethernet Segment (ES) RouteUsed for DF election
Type 5IP Prefix RouteFor inter-subnet / L3 EVPN routes

Now within Type 1 (EAD), there are two “flavors”:

  • Per-ESI Route

  • Per-EVI Route


🧩 What is “EVI”?

EVI (Ethernet VPN Instance) → represents one broadcast domain, usually a VLAN or VNI.

So:

  • One ESI = shared Ethernet Segment (multi-homed link to a host or server).

  • One EVI = one VLAN/VNI associated with that ESI.


🧭 Type-1 Route Variants

VariantFieldScopePurpose
Per-ESI RouteEthernet Tag = 0Global for the whole ESITells everyone “I’m part of this ESI.” Used for multi-homing discovery & mass withdrawal.
Per-EVI RouteEthernet Tag ≠ 0 (VLAN/VNI ID)Per VLAN or EVITells everyone “this ESI is active for this specific VLAN.” Used for DF election, MAC flush, etc.

📘 Example

Let’s take an EVPN multihoming setup:

+--------- Spine (RR) ---------+ | | +---+---+ +---+---+ | Leaf1 | | Leaf2 | +---+---+ +---+---+ | | ========= Shared Link ========= (ESI=10) to HostA

HostA is connected to both Leaf1 and Leaf2 (multi-homed).
We have two VLANs:

  • VLAN 10 → EVI 10 (VNI 10100)

  • VLAN 20 → EVI 20 (VNI 10200)


🔹 Step 1 – Per-ESI Route (Ethernet Tag = 0)

Both Leaf1 and Leaf2 advertise:

Route-Type 1: Per-ESI (Ethernet Tag = 0) ESI = 10 Label = <per-ESI label>

➡️ Purpose:

  • To tell remote PEs: “Leaf1 and Leaf2 share the same ESI 10.”

  • Used for mass withdrawal when ESI fails.


🔹 Step 2 – Per-EVI Routes (Ethernet Tag = VLAN 10, 20)

For each VLAN on that ESI, both PEs also advertise:

Route-Type 1: Per-EVI ESI = 10 Ethernet Tag = 10 ← VLAN 10 Label = <per-EVI label> Route-Type 1: Per-EVI ESI = 10 Ethernet Tag = 20 ← VLAN 20 Label = <per-EVI label>

➡️ Purpose:

  • Indicates that this ESI participates in this VLAN (EVI).

  • Used by remote PEs to:

    • Associate MAC/IP routes correctly.

    • Handle DF election on a per-VLAN basis.


🧠 When they’re used

FunctionPer-ESIPer-EVI
Discover multi-homed PEs
Mass withdrawal (ESI failure)
DF election per VLAN
MAC/IP association
VLAN-specific redundancy

🧩 Example in words

“Leaf1 and Leaf2 advertise a per-ESI route for ESI 10 saying:
We are both part of the same multi-homed segment.

Then, for each VLAN on that segment, they advertise per-EVI routes saying:
For VLAN 10, I’m active on ESI 10. For VLAN 20, same.

If the link goes down on Leaf1, it withdraws the per-ESI route → triggers mass withdrawal.
But DF election or VLAN-specific activity is controlled using the per-EVI routes.”


✅ Quick Summary Table

Route Type 1 VariantEthernet TagTriggered WhenUsed For
Per-ESI0ESI up/downDiscovery + Mass Withdrawal
Per-EVIVLAN/VNI IDVLAN participationDF Election + VLAN-specific info

Would you like me to show a real BGP EVPN route-table example (from FRR or Arista) that shows both Per-ESI and Per-EVI entries side by side?



Perfect 👌 — let’s walk through a realistic EVPN route table example (like what you’d see on Arista EOS, FRR, or Juniper EVPN) and highlight where per-ESI and per-EVI routes appear.


🧭 Lab Setup (for reference)

+----------- Spine (RR) -----------+ | | +--+--+ +--+--+ |Leaf1| |Leaf2| +--+--+ +--+--+ | | +--------- Shared Link -----------+ (ESI = 10) | +------+ |HostA | +------+ VLAN 10 → EVI 10 (VNI 10100) VLAN 20 → EVI 20 (VNI 10200)

📘 1. Per-ESI Route (Ethernet Tag = 0)

Advertised once per ESI by each PE that’s part of the multihomed segment.
Used for ES discovery and mass withdrawal.

Example output (simplified)

Leaf1# show bgp l2vpn evpn route-type 1 Route Distinguisher: 10.10.10.1:1 EVPN type-1 (Ethernet A-D per ESI) ESI: 0000:0000:0000:0000:000010 Ethernet Tag ID: 0 MPLS Label1: 1000 Next Hop: 10.10.10.1 Extended communities: - ESI Label: 1000 - ES-Import RT: 0000:0000:0000:0000:000010

Same route from Leaf2:

Route Distinguisher: 10.10.10.2:1 EVPN type-1 (Ethernet A-D per ESI) ESI: 0000:0000:0000:0000:000010 Ethernet Tag ID: 0 MPLS Label1: 2000 Next Hop: 10.10.10.2

➡️ Interpretation:

  • Ethernet Tag = 0 → Per-ESI route

  • Both Leaf1 and Leaf2 advertise it.

  • Used for:

    • ESI discovery (they share same ESI)

    • Mass withdrawal when one link fails.


📘 2. Per-EVI Route (Ethernet Tag = VLAN/VNI ID)

Advertised once per VLAN (EVI) participating on that ESI.
Used for DF election and VLAN-specific redundancy.

Example output (VLAN 10)

Route Distinguisher: 10.10.10.1:10 EVPN type-1 (Ethernet A-D per EVI) ESI: 0000:0000:0000:0000:000010 Ethernet Tag ID: 10 ← VLAN 10 MPLS Label1: 1010 Next Hop: 10.10.10.1 Extended communities: - ESI Label: 1010 - ES-Import RT: 0000:0000:0000:0000:000010

Example output (VLAN 20)

Route Distinguisher: 10.10.10.1:20 EVPN type-1 (Ethernet A-D per EVI) ESI: 0000:0000:0000:0000:000010 Ethernet Tag ID: 20 ← VLAN 20 MPLS Label1: 1020 Next Hop: 10.10.10.1

➡️ Interpretation:

  • Ethernet Tag = VLAN ID (non-zero) → Per-EVI route

  • Used for:

    • DF election (deciding which leaf forwards BUM traffic for VLAN 10/20)

    • VLAN-specific failover.


🧠 Putting it all together

Route VariantEthernet TagAdvertised byUsed forWithdrawn when
Per-ESI0Once per ESIDiscovery, Mass WithdrawalESI link failure
Per-EVIVLAN IDOnce per VLAN per ESIDF Election, VLAN redundancyVLAN removed or PE shutdown

⚡ After a Link Failure (Leaf1 → HostA down)

On Leaf1:

  • Withdraws Per-ESI route → remote PEs flush all MACs learned via Leaf1.

  • Leaf2’s Per-EVI routes remain active → Leaf2 becomes DF and forwards traffic.


✅ Summary

ConceptExample ValueKey Use
Per-ESI RouteEthernet Tag = 0“I’m part of this multihomed ESI” → mass withdrawal
Per-EVI RouteEthernet Tag = VLAN/VNI“This VLAN participates on this ESI” → DF election per VLAN

Comments

Popular posts from this blog

gNMI_with_grafana on containerlabs

EVPN Route type-1 & type-4 in action

Network Automation with ROBOT Framework