In the previous lab I stretched one VLAN across two switches with static VXLAN. At the end I said that in real networks people usually replace the static flood list with EVPN. In this second lab we do exactly that. We also add one small twist the same bridge domain uses a different VLAN tag on each switch. It may look weird at first but this can happen during a migration or after a merger. It is also a good way to show that in EVPN the VLAN tag is only local to the switch.
Overview
This lab uses three Arista cEOS switches in a routed triangle and five Linux hosts. The loopbacks, routed links, OSPF, and IBGP sessions for IPv4 unicast are already configured. There are two bridge domains:
redis stretched across all three switches, but with a different local VLAN tag on each:201ons1,202ons2, and203ons3blueexists only ons1ands2, both using VLAN101
Our job is to build the VXLAN overlay (red as VNI 1000, blue as VNI 1001), enable the EVPN address family on the existing IBGP sessions, and configure one MAC-VRF for each bridge domain. EVPN is the control plane for VXLAN. In simple words, the switches use BGP to tell each other which VNI they belong to and which MAC addresses they learned. Because of that, we do not need to build everything by hand. In the previous lab I typed the flood vtep list myself. Here EVPN builds that list for us. It does this with type-3 routes, also called IMET routes (Inclusive Multicast Ethernet Tag). A type-3 route says, "I am in this VNI, and this is my VTEP address." Other switches use this information when they need to send broadcast, unknown-unicast, or multicast traffic. This copying of traffic to remote VTEPs is called ingress replication. The sending VTEP makes one copy per remote VTEP in the list. Because blue exists on only two switches, the ingress replication list for VNI 1001 is smaller than the list for VNI 1000.
When everything works, hr1, hr2, and hr3 will be in one stretched layer-2 domain, and hb1 and hb2 will be in another one, even if the red hosts sit behind three different VLAN tags.
Step 1: Verify the Underlay and the Existing IBGP
On each switch:
show ip ospf neighborshow ip routeshow bgp ipv4 unicast summaryFrom s1: ping 10.0.0.2 source 10.0.0.1From s1: ping 10.0.0.3 source 10.0.0.1What you want to see:
- OSPF neighbors in
FULLstate - both remote loopbacks in the routing table
- the IPv4 unicast IBGP sessions already up
- loopback-to-loopback pings working
Step 2: Configure the VXLAN Interfaces
Each switch maps its local red VLAN tag to the shared VNI 1000. The VLAN number matters only on the local link between the switch and the host. Across the fabric, the segment is identified by the VNI.
On s1:
configure terminalinterface Vxlan1 vxlan source-interface Loopback0 vxlan vlan 201 vni 1000 vxlan vlan 101 vni 1001endOn s2:
configure terminalinterface Vxlan1 vxlan source-interface Loopback0 vxlan vlan 202 vni 1000 vxlan vlan 101 vni 1001endOn s3:
configure terminalinterface Vxlan1 vxlan source-interface Loopback0 vxlan vlan 203 vni 1000endConfiguration details:
| Command | Purpose |
|---|---|
interface Vxlan1 | Creates the VXLAN interface |
vxlan source-interface Loopback0 | Uses the loopback as the local VTEP source |
vxlan vlan <local-vlan> vni 1000 | Maps the local red VLAN to the shared red VNI |
vxlan vlan 101 vni 1001 | Maps the blue VLAN to the blue VNI (s1 and s2 only) |
Compared to the static VXLAN lab, there is no flood vtep command. We are not telling the switch by hand where to send BUM traffic. EVPN will handle that part.
Step 3: Enable the EVPN Address Family
The IBGP sessions between the loopbacks already exist. To turn on EVPN, we only need to activate the neighbors under the EVPN address family.
On s1:
configure terminalrouter bgp 65000 address-family evpn neighbor 10.0.0.2 activate neighbor 10.0.0.3 activateendDo the same on s2 and s3, and activate the other two loopbacks on each switch.
Step 4: Configure the MAC-VRFs
On Arista EOS, the EVPN bridge-domain policy is under router bgp inside a vlan <local-vlan-id> block. The local VLAN IDs are different, but the route targets must match.
On s1:
configure terminalrouter bgp 65000 vlan 201 rd 10.0.0.1:100 route-target import 65000:100 route-target export 65000:100 redistribute learned vlan 101 rd 10.0.0.1:101 route-target import 65000:101 route-target export 65000:101 redistribute learnedendOn s2, use the same pattern with vlan 202 and rd 10.0.0.2:100 / 10.0.0.2:101. On s3, configure only the red MAC-VRF with vlan 203 and rd 10.0.0.3:100.
Configuration details:
| Command | Purpose |
|---|---|
rd 10.0.0.x:100 | Gives each MAC-VRF instance a unique route distinguisher |
route-target import/export 65000:100 | Puts all red instances into one EVPN service |
route-target import/export 65000:101 | Puts the two blue instances together |
redistribute learned | Advertises locally learned MAC addresses into EVPN |
The three red instances are configured under vlan 201, vlan 202, and vlan 203, which are three different numbers on three different switches. The shared service is built by the matching VNI and route targets. The EVPN updates carry the VNI. The VLAN tag never leaves the local switch.
Step 5: Verify the EVPN Control Plane
On any switch:
show bgp evpn summaryshow bgp evpn route-type imetshow vxlan vnishow vxlan flood vtepThese commands answer these checks:
show bgp evpn summary: confirms the EVPN sessions are upshow bgp evpn route-type imet: confirms type-3 (IMET) routes exist forredfrom all three switches, and forblueonly froms1ands2show vxlan vni: confirms the local VLAN-to-VNI mappingsshow vxlan flood vtep: confirms the flood lists were built by EVPN and not typed by hand
EVPN IMET routes on s1:
In the static VXLAN lab, the flood list was something I typed by hand. In this lab, it is built from the IMET routes for each VLAN. On s1, VLAN 201 floods to both remote VTEPs, while VLAN 101 floods only to s2:
Step 6: Verify Host Connectivity and MAC Learning
From the host shell:
netlab connect hr1 ping -c 3 hr2netlab connect hr1 ping -c 3 hr3netlab connect hb1 ping -c 3 hb2When we ping from hr1 to hr3, the frame enters s1 on VLAN 201 and leaves s3 on VLAN 203. But for the hosts, it still looks like one flat segment:
After some traffic flows, we can also see the MAC side of EVPN:
show bgp evpn route-type mac-ipshow mac address-table dynamicshow bgp evpn route-type mac-ip: shows the type-2 routes that carry MAC reachabilityshow mac address-table dynamic: shows where the switch installed local and remote MACs
On s1, the local hosts are on Ethernet3 and Ethernet4, while the remote MACs point to Vxlan1 in both VLANs:
The same check on s3 shows only red MACs. The blue MACs never go there because s3 imports neither the route target nor the VNI.
Key Takeaways
- VLAN tags are locally significant. The bridge domain is identified by the VNI and the route-target policy, so the fabric can still work even if the switches use different VLAN numbers.
- The flood list is now part of routing. EVPN type-3 routes build one ingress replication list per VNI, which is why
s3stays out of theblueflood domain automatically. - Per-instance RDs with shared RTs use the same import/export idea as L3VPN, but here it is used for MAC addresses instead of IP prefixes.
