EVPN config Vs VRF config for L2VPN & L3VPN
Excellent question — this is a subtle but very important design point in EVPN VXLAN architecture on platforms like Cisco NX-OS (and also Juniper, Arista, etc.).
Let’s unpack it clearly 👇
1️⃣ Two Different Types of VNIs
VXLAN has two classes of VNIs in EVPN designs:
| Type | Purpose | Route Type | Control Plane Role |
|---|---|---|---|
| L2 VNI | Represents a broadcast domain (VLAN) | EVPN Type-2 (MAC/IP routes) | Part of EVI (Ethernet VPN Instance) |
| L3 VNI | Represents a tenant’s IP VRF / routing domain | EVPN Type-5 (IP Prefix routes) | Part of VRF (IP VPN Instance) |
2️⃣ EVPN = Ethernet VPN
The “E” in EVPN literally stands for Ethernet — it’s fundamentally an L2 service that’s extended over BGP.
That’s why:
-
EVPN configuration (under BGP →
address-family l2vpn evpn) manages L2 VNIs. -
Each EVI represents an L2 broadcast domain (MAC learning, ARP suppression, etc.).
So, L2 VNI configs live under the EVPN context.
3️⃣ L3 VNI = Routed VRF
A Layer-3 VNI is not an Ethernet domain. It’s an IP routing domain (VRF) that uses VXLAN to interconnect distributed gateways.
Therefore:
-
The L3 VNI belongs under the VRF configuration, not under EVPN.
-
BGP VPNv4/VPNv6 or EVPN Type-5 is used to advertise prefixes, but the association happens through the VRF, not the EVPN EVI.
🔹 Cisco NX-OS Example
✅ Notice:
-
vni 1010and1020(L2 VNIs) live underevpn. -
vni 50000(L3 VNI) lives undervrf context TENANT-A.
4️⃣ Why They’re Separated
| Reason | Explanation |
|---|---|
| Different forwarding planes | L2 VNIs perform MAC learning (bridge domain); L3 VNIs perform IP routing (VRF). |
| Different route types | EVPN Type-2 (MAC/IP) vs Type-5 (IP Prefix). |
| Different associations | L2 VNI → VLAN / bridge domain; L3 VNI → VRF. |
| Operational flexibility | You can have multiple L2 VNIs mapped into one L3 VNI (many VLANs, one VRF). |
✅ Summary
-
L2 VNI = under EVPN, part of EVI (Ethernet VPN instance).
-
L3 VNI = under VRF, part of IP VPN instance.
-
They are both advertised via BGP EVPN, but managed in different parts of the config because they belong to different layers (L2 vs L3).
Comments
Post a Comment