Ethernet inside UDP
A VXLAN tunnel endpoint (VTEP) takes an Ethernet frame from a local segment and wraps it in a VXLAN header, UDP and an outer IP header. The outer IP addresses identify the tunnel endpoints. UDP destination port 4789 is the default.
The 24-bit VXLAN Network Identifier (VNI) tells the receiving VTEP which virtual Layer 2 segment owns the inner frame. The VTEP removes the tunnel headers and forwards that frame within the identified segment. Two segments can use the same inner MAC addresses because each has its own VNI.
VXLAN carries traffic and EVPN advertises reachability
The VXLAN header does not tell a VTEP how to discover the remote endpoint for a destination MAC. In a BGP EVPN fabric, EVPN routes can advertise where MAC and IP addresses are reachable. The VTEP uses that information to choose the tunnel destination, then sends the data frame in VXLAN. Other VXLAN deployments can learn remote MAC addresses from traffic.
Try it in a lab
- On a VXLAN-capable lab, put endpoints behind two VTEPs in VNI 10100. Send traffic between the endpoints and inspect a packet on the routed underlay.
- Find the remote VTEP address and UDP destination port in the outer headers. Compare VNI 10100 and the original source and destination MAC addresses inside the packet.
- If the lab uses EVPN, compare the MAC advertisement with the packet. The route tells you where the MAC was learned. The packet shows how the frame traveled there.
