BGP EVPN TYPE-1 & TYPE-4 in action
🧠 Quick Recap Before Type-4
When an ESI (Ethernet Segment Identifier) is configured on dual-homed leafs:
-
Each leaf advertises:
✅ Type-1 Per-ESI → ESI discovery & mass withdrawal
✅ Type-1 Per-EVI → VLAN (EVI) participation, per-VLAN control -
Remote VTEPs use these to know who shares the ESI.
Now, to decide which leaf forwards BUM traffic (Broadcast, Unknown, Multicast) for each VLAN,
they use Type-4 routes.
⚙️ What is a Type-4 Route?
| Route Type | Name | Purpose |
|---|---|---|
| Type-4 | Ethernet Segment Route (ES Route) | Used for DF election between PEs sharing the same ESI |
🔹 Content of Type-4 Route
Each PE advertising a shared ESI sends:
🧭 Putting It Together (Flow of Events)
Let’s take this topology again:
Step-by-Step DF Election Process
| Step | Action | EVPN Route | Description |
|---|---|---|---|
| 1 | Leaf1, Leaf2 detect they share ESI=10 | Type-1 Per-ESI | Discover multihomed peers |
| 2 | Both advertise VLANs on that ESI | Type-1 Per-EVI (Ethernet Tag = VLAN ID) | Indicates which VLANs are active |
| 3 | Both advertise ES route | Type-4 (ES Route) | Used for DF election |
| 4 | Each PE learns others’ Type-4s | — | Now both know the list of PEs in the ESI group |
| 5 | Run DF election algorithm | (default = Modulus algorithm) | Deterministic: based on VLAN ID & VTEP IP |
| 6 | Result → per-VLAN DF assignment | — | One leaf becomes DF for VLAN 10, the other for VLAN 20 |
| 7 | DF starts forwarding BUM; non-DF blocks BUM | — | Unicast flows are unaffected |
🧮 DF Election Logic Example (Default Modulus)
DF = (VLAN-ID mod Number-of-PEs)
With 2 PEs:
| VLAN | Calculation | DF |
|---|---|---|
| VLAN 10 | 10 mod 2 = 0 | Leaf1 |
| VLAN 20 | 20 mod 2 = 0 | Leaf1 |
| VLAN 11 | 11 mod 2 = 1 | Leaf2 |
| VLAN 21 | 21 mod 2 = 1 | Leaf2 |
➡️ So DF role alternates per VLAN.
⚙️ Modern implementations use HRW (Highest Random Weight) algorithm (RFC 8584), which is more stable.
🧩 Relationship Between Route Types
| Function | Route Type | Advertised per | Key Use |
|---|---|---|---|
| ESI Discovery | Type-1 (Per-ESI) | Once per ESI | Identify multihomed peers |
| VLAN Participation | Type-1 (Per-EVI) | Once per VLAN | Input to DF election |
| DF Election | Type-4 | Once per ESI | Compute DF/non-DF per VLAN |
| MAC/IP Reachability | Type-2 | Per host | Learned over active PE(s) |
| Mass Withdrawal | Type-1 Withdrawal | On ESI failure | Flush stale MACs |
🛰️ Example Control Plane View (Simplified)
When both Type-4 routes are received, each leaf runs DF election and decides:
| VLAN | DF | Non-DF |
|---|---|---|
| VLAN 10 | Leaf1 | Leaf2 |
| VLAN 20 | Leaf2 | Leaf1 |
🧠 Summary
| Route | Scope | Key Function |
|---|---|---|
| Type-1 Per-ESI | 1 per ESI | ESI discovery & mass withdrawal |
| Type-1 Per-EVI | 1 per VLAN | DF election input (per-VLAN participation) |
| Type-4 | 1 per ESI | DF election control (which PE is DF) |
Comments
Post a Comment