Most of my recent lab time has been focused on JNCIP-ENT topics, and I wanted to spend some time on something a little different for a change. VXLAN is one of my favorite topics so when I saw this lab by Ivan Pepelnjak I knew I had to give it a try. I had also been meaning to try netlab for a while so it felt like a good excuse to finally try it. It was also my first time working on Arista but it didn't really feel foreign because it's very similar to Cisco.
Overview
This lab uses two Arista cEOS switches and two Linux hosts. VLAN 100, the routed inter-switch link, loopback interfaces, and OSPF underlay are already configured. What we are required to do is to build the VXLAN overlay by creating Vxlan1, mapping VLAN 100 to VNI 100100, defining the VTEP source interface, and adding the remote flood VTEP.
VXLAN extends a Layer 2 segment across a Layer 3 network by encapsulating Ethernet frames inside IP packets. In this lab, the underlay is the routed IP network between the switches, and the overlay is VLAN 100 carried across it. The underlay only needs to provide reachability between the VTEP addresses, while VXLAN takes traffic from VLAN 100, encapsulates it, sends it across the underlay, and delivers it back into the same VLAN on the remote switch.
Step 1: Verify the Underlay
This part of the lab is already configured, so there is no real work to do here. Even so, it is still worth checking before moving on. Things can still go wrong so it's worth verifying.
The underlay is the routed IP network between the switches. VXLAN depends on that IP network to carry encapsulated traffic between VTEPs, which are the tunnel endpoints responsible for sending and receiving VXLAN traffic. In this lab, each switch uses its loopback address as the tunnel endpoint, so the most important requirement is that each switch can reach the other switch's loopback through the underlay.
Verify OSPF and reachability:
show ip ospf neighborshow ip routeFrom s1: ping 10.0.0.2 source 10.0.0.1From s2: ping 10.0.0.1 source 10.0.0.2For example, on s1:
Step 2: Configure Underlay MTU
VXLAN adds extra headers to the original frame, so the packet becomes larger when it crosses the routed underlay. Because of that, the underlay MTU needs to be larger than the host facing interface's MTU.
If the MTU is too small, smaller packets may still work while larger packets fail. Setting the underlay MTU to 1550 gives the encapsulated traffic enough room to cross the link.
Configure MTU 1550 on the routed underlay link.
On both switches:
configure terminalinterface Ethernet1 mtu 1550endStep 3: Configure VXLAN on Both Switches
Configure s1 first, then apply the same pattern on s2 using its local loopback and the remote flood-list address for s1.
configure terminalinterface Vxlan1 vxlan source-interface Loopback0 vxlan vlan 100 vni 100100 vxlan vlan 100 flood vtep 10.0.0.2endConfiguration details:
| Command | Purpose |
|---|---|
interface Vxlan1 | Creates the VXLAN interface |
vxlan source-interface Loopback0 | Uses Loopback0 as the local VTEP source |
vxlan vlan 100 vni 100100 | Maps local VLAN 100 to VNI 100100 |
vxlan vlan 100 flood vtep remote-vtep-ip | Sends BUM traffic for VLAN 100 to the remote VTEP |
We are using the loopback for the VTEP because it gives the tunnel a stable endpoint that is not tied to one physical interface. As long as the underlay can route to that loopback, the VXLAN tunnel endpoint remains reachable.
The static flood vtep command solves a simple but overlooked problem. It tells each switch where to send BUM traffic for this VXLAN segment. In modern fabrics this is usually handled by EVPN rather than static VTEP assignment. EVPN provides a control plane for learning and advertising overlay information dynamically, which avoids maintaining manual flood lists across the fabric.
Step 4: Verify the Overlay
Once the VXLAN configuration is in place, verify the control-plane state, host connectivity, and MAC learning.
On either switch:
show vxlan vnishow vxlan vtepshow mac address-tableThese commands answer the below verification questions:
show vxlan vni: confirms that VLAN100is mapped to VNI100100show vxlan vtep: confirms that the remote VTEP is presentshow mac address-table: confirms that the switch is learning the local host onEthernet2and the remote host throughVxlan1
Example output on s1:
Then verify host connectivity from h1:
netlab connect h1 ping h2Run a full-size packet test:
netlab connect h1ping h2 -s 1472Example output:
The 1472 byte payload plus the 20 byte IPv4 header and 8 byte ICMP header creates a 1500 byte host packet. This confirms that the underlay MTU can carry the additional VXLAN overhead. If the basic ping works but the larger ping fails, check the MTU on Ethernet1 between s1 and s2.
Key Takeaways
This lab is a nice example of a simple VXLAN configuration. It was also a really good first experience with netlab, and a reminder of how much fun containerlab is to work with. Spinning up a lab is much faster and easier than what I am used to with PNETLab which makes it a lot easier to focus on the networking itself.
Thanks to Ivan Pepelnjak for putting together the lab series and for the work behind ipSpace and netlab.
