← All posts
EVPN

EVPN Route Types 1 to 5: What Each One Does and When It Gets Used

EVPN Route Types 1 to 5: What Each One Does and When It Gets Used

What EVPN route types actually are

If you've looked at a BGP EVPN table and wondered why there are five different route types, you're not alone. Each type solves a specific problem, and once you understand which problem each one addresses, the whole thing starts to make sense.

I've spent a lot of time in EVPN labs and production networks, and the confusion almost always comes from treating the route types as an abstract list rather than as solutions to concrete networking problems. So that's the angle I'll take here.

Route Distinguishers and Route Targets first

Before getting into the route types, it's worth covering route distinguishers (RDs) and route targets (RTs), because they appear in every EVPN route and confuse people more than the route types themselves.

An RD makes a prefix unique in the BGP table. Two VTEPs can both have MAC address 00:50:56:ab:12:34, but with different RDs they become distinct routes. The RD doesn't control import or export policy at all.

An RT controls which routes get imported into which VRF or VNI. If VTEP-A exports RT 65000:100 and VTEP-B imports RT 65000:100, VTEP-B will install VTEP-A's routes. That's the entire mechanism for building the distributed forwarding table in EVPN.

In a typical data center, you auto-derive RDs from the loopback IP and VNI, and you set RTs to match the VNI number. That's the standard approach on both Cisco and Arista.

Type 1: Ethernet Auto-Discovery

Type 1 routes exist for one purpose: multihoming. You'll only see them in topologies where a CE device (a server or a ToR switch) is dual-homed to two or more PE devices (leafs) using an Ethernet Segment (ES).

There are two variants. The per-ESI Type 1 announces that an Ethernet Segment exists and is reachable via this PE. The per-EVI Type 1 is per-VNI per-ESI, and it carries the label or VNI used for traffic toward that segment.

Fast failover with mass withdraw

The main operational benefit is fast failover. When a PE loses connectivity to the CE (the uplink goes down), it withdraws all its per-ESI Type 1 routes in a single BGP update. Remote PEs see one withdrawal message and immediately know that all MAC/IP routes behind that ESI via this PE are invalid.

That's much faster than waiting for individual Type 2 MAC route withdrawals, which could be hundreds or thousands of updates for a large segment.

Aliasing

Aliasing is the other thing Type 1 enables. In an active-active multihomed setup, both PE1 and PE2 are reachable for the same CE. A remote PE3 learns the MAC behind that CE from PE1 (via a Type 2 route) but also sees Type 1 routes from both PE1 and PE2 for the same ESI.

That means PE3 can load-balance traffic across both PE1 and PE2 even though the MAC was only advertised by PE1. The Type 1 routes from PE2 act as aliasing entries, telling remote PEs that PE2 is also a valid next-hop for that segment.

What it looks like in the table

show bgp l2vpn evpn type 1 Network Next Hop Metric LocPref Weight Path
Route Distinguisher: 10.0.0.1:1
*> [1]:[0300.0000.0001.0000.0100]:[0]/23 10.0.0.1 - 100 0 i

The first field is the ESI. The second is the Ethernet Tag. A Tag of 0 is the most common in VXLAN deployments.

Type 2: MAC and IP Advertisement

This is the core EVPN route type. Every time a VTEP learns a MAC address (from a local ARP or data-plane learning), it advertises a Type 2 route. Remote VTEPs install that route and can forward traffic directly to the advertising VTEP without flooding.

ARP suppression

When the IP field is populated (which it usually is in modern deployments), remote VTEPs can answer ARP requests locally without flooding the ARP to every VTEP. That's ARP suppression, and it makes a noticeable difference in large fabrics where ARP storm suppression becomes a real operational concern.

The ingress VTEP checks its local ARP cache before flooding. If it has a Type 2 route for the target IP, it responds directly. No flood, no wasted bandwidth.

MAC mobility

MACs move. VMs migrate. When a MAC moves from one VTEP to another, the new VTEP advertises a Type 2 route with a higher MAC mobility sequence number in the extended community. Remote VTEPs see the higher sequence number and update their forwarding table to point to the new VTEP.

If you see MAC flapping alerts in EVPN, the MAC mobility sequence number is the first thing to check. A sequence number stuck at 0 when a MAC keeps moving usually means one side isn't incrementing correctly.

Reading a Type 2 route

show bgp l2vpn evpn type 2 Network Next Hop
Route Distinguisher: 10.0.0.1:10010
*> [2]:[0]:[48]:[0050.56ab.1234]:[32]:[192.168.10.11]/136 10.0.0.1 Extended Community: RT:65000:10010 ET:8 MAC-mobility:1
PMSI: Flags 0x00, Tunnel type 6, label 10010, Tunnel Id 10.0.0.1

Breaking that down: Type 2, Ethernet Tag 0, 48-bit MAC, the MAC address itself, 32-bit prefix length (IPv4), and the host IP. The /136 is the total NLRI length in bits.

Type 3: Inclusive Multicast Ethernet Tag

Type 3 routes handle BUM traffic: Broadcast, Unknown unicast, and Multicast. These are the packets you can't deliver with a unicast lookup because you don't know where the destination is yet.

Ingress replication in VXLAN

In most data center VXLAN deployments, BUM traffic uses ingress replication. The sending VTEP makes a copy of the packet for every other VTEP in the same VNI and sends individual unicast VXLAN tunnels to each one.

Type 3 routes are how VTEPs discover which other VTEPs are part of the same VNI. Each VTEP advertises one Type 3 per VNI, carrying its own VTEP IP in the PMSI Tunnel Attribute. When a VTEP receives Type 3 routes from three other VTEPs, it knows to replicate BUM traffic to those three addresses.

That's the automatic mesh. No static configuration of remote VTEP IPs needed. BGP EVPN builds the replication list dynamically.

Reading a Type 3 route

show bgp l2vpn evpn type 3 Network Next Hop
Route Distinguisher: 10.0.0.1:10010
*> [3]:[0]:[32]:[10.0.0.1]/88 10.0.0.1 PMSI Tunnel: Flags 0x00, Tunnel Type: Ingress Replication (6) Label: 10010, Tunnel Endpoint: 10.0.0.1

Tunnel Type 6 is ingress replication. The label is the VNI. The endpoint is the VTEP IP to send the replicated copy to.

Type 4: Ethernet Segment

Type 4 routes are part of the multihoming machinery, alongside Type 1. Where Type 1 handles fast failover and aliasing, Type 4 handles Designated Forwarder election and PE discovery on a shared Ethernet Segment.

The Designated Forwarder

In an active-active multihomed setup, both PEs are connected to the same CE. For BUM traffic coming from the network side (remote VTEPs sending to the CE), only one PE should forward it to the CE. Otherwise the CE sees the same BUM traffic twice.

That PE is the Designated Forwarder (DF). The DF is elected per Ethernet Tag (per VNI) among all PEs sharing the same ESI. This means PE1 might be DF for VNI 10010 while PE2 is DF for VNI 10020, distributing the load.

DF election algorithms

The default algorithm in most implementations is service-carving. Each PE sorts the list of all PEs on the ESI (by IP address), then assigns VNIs round-robin. PE with the lowest IP gets VNIs 0, N, 2N, etc. The next PE gets VNIs 1, N+1, 2N+1, and so on.

Modulo-based and weight-based alternatives exist on some platforms when you need manual control over which PE carries more traffic.

Split-horizon filtering

Type 4 also enables split-horizon filtering. When PE1 receives BUM traffic from the CE (via the shared ESI) and needs to flood it into the fabric, it must not send it back to PE2 on the same ESI. The ESI label in the Type 1 route is used as a filter: if the incoming ESI label matches the local ESI, drop it.

Type 5: IP Prefix

Type 5 is a pure Layer 3 route type. It advertises IP prefixes (subnets, not host routes) across the EVPN control plane, and it's what enables inter-VLAN routing at scale in a spine-leaf fabric using symmetric IRB.

Symmetric IRB and the L3 VNI

In symmetric IRB, routing happens at both the ingress and egress VTEP. The ingress VTEP routes the packet from the source VLAN's L2 VNI into an L3 VNI (a VRF VNI), forwards it across the fabric via VXLAN, and the egress VTEP routes it back out to the destination VLAN's L2 VNI.

Type 5 routes carry the prefix reachability information for this. If VTEP-A has 192.168.20.0/24 locally and wants remote VTEPs to send traffic for that prefix to it, it advertises a Type 5 route with that prefix, its RD, and the L3 VNI as the label.

When to use Type 5 vs Type 2 with IP

Type 2 with an IP field advertises host routes (/32 or /128). That works for intra-fabric east-west traffic between hosts. Type 5 is used for external routes: prefixes learned from outside the fabric (from a border leaf's BGP peer), aggregate routes, or any subnet that needs to be advertised as a prefix rather than a collection of host routes.

A common pattern: the border leafs run Type 5 to advertise external prefixes into the fabric, while internal host-to-host traffic uses Type 2.

Reading a Type 5 route

show bgp l2vpn evpn type 5 Network Next Hop
Route Distinguisher: 10.0.0.1:1
*> [5]:[0]:[24]:[192.168.20.0]/17 10.0.0.1 Extended Community: RT:65000:50000 ET:8 Rmac:5000.0001.0001
PMSI: Flags 0x00, Tunnel type 6, label 50000

The label 50000 is the L3 VNI. The Rmac is the router MAC of the egress VTEP, used by the ingress VTEP to construct the inner Ethernet header when encapsulating into VXLAN.

How to read the full BGP EVPN table

When you're troubleshooting EVPN, start with a broad view and narrow down.

# All EVPN routes
show bgp l2vpn evpn # Filter by type
show bgp l2vpn evpn type 2
show bgp l2vpn evpn type 5 # Check a specific VNI's routes
show bgp l2vpn evpn vni 10010 # Verify a specific MAC is in the table
show bgp l2vpn evpn mac 0050.56ab.1234 # Check route is installed in hardware
show forwarding l2vpn evpn mac-ip
show vxlan address-table evpn

The most common issue I've seen is RT misconfiguration. If you're not seeing Type 2 routes from a remote VTEP, check that the RT it's exporting matches what you're importing locally. A single digit difference and the routes simply don't get installed.

Summary: which route type does what

Type 1 is for multihoming: fast failover via mass withdraw, load balancing via aliasing. Type 2 is the core forwarding table: MAC and optional IP, ARP suppression, MAC mobility. Type 3 builds the BUM replication mesh automatically. Type 4 handles DF election on shared Ethernet Segments. Type 5 carries subnet prefixes for L3 routing between VRFs.

Once you understand what problem each type solves, reading the BGP EVPN table stops being intimidating and starts being useful. The table is telling you exactly what every VTEP in the fabric knows and how it plans to forward traffic.

Watch the video series

Each route type has its own deep-dive episode on YouTube.

Watch the EVPN series →

Next in this series

EVPN in the Data Center: Spine-Leaf, Three-Tier, and Choosing Between Them →

Comments (0)

Please sign in to comment.

  • Be the first to comment.