← All chapters

VXLAN Overlays and Underlays

You can use VXLAN as an overlay, a bridge, and a router.

VXLAN uses overlay technology to improve network extensibility and flexibility.

An underlay network is the underlying network infrastructure that is in charge of packet transmissions across the networks. The overlay virtual network is constructed on top of the physical underlay network.

VXLAN uses overlay technology to provide the same Ethernet Layer 2 network services that VLAN provides but with greater extensibility and flexibility. This technology uses a VXLAN Network Identifier (VNID or sometimes VNI), which is a 24-bit segment ID that defines the broadcast domain—also called the VXLAN Segment ID. VNID facilitates optimal scaling when you compare it to a VLAN.

The VXLAN Tunnel Endpoint (VTEP) encapsulates and de-encapsulates through the Network Virtual Interface (NVE), the logical interface for those processes to occur. VXLAN may use Intermediate System-to-Intermediate System (IS-IS), OSPF, BGP, and Protocol Independent Multicast (PIM) for the underlay.

VXLAN Overlay

The following VXLAN fabric overview shows how the technology works.

VXLAN fabric operates by the following steps:

  1. The server transmits traffic to the ingress VTEP. The VTEP communicates based on the destination MAC (DMAC) and derives the next hop (or destination VTEP). If the DMAC is the default gateway MAC, first-hop routing will be performed.

Note
When a packet bridges, the target end host's MAC address is stamped in the DMAC field of the inner frame. During packet routing, the default gateway MAC address is stamped in the DMAC field of the inner frame.
  1. The VTEP encapsulates the traffic (frames) into VXLAN packets (depicted in the overlay function shown in the figure) and signals the underlay IP network.

  2. Based on the underlay routing protocol, the packet transmits from the ingress VTEP to the egress VTEP through the IP network.

  3. The destination VTEP removes the VXLAN encapsulation (overlay function) and transmits traffic to the intended server.

VXLAN as a Bridge

VXLAN can act as a bridge for packets.

Each step number corresponds to a number in the following figure:

  1. The VNID of the source end host, Host A, and the target end host, Host B, is 30000. Host A transmits traffic to the directly attached VTEP V1.

  2. V1 performs a lookup based on the DMAC address in the packet header. (For bridged communication, the target end host's MAC address updates in the DMAC field.)

  3. VTEP V1 bridges the packets and transmits toward VTEP V2 with a VXLAN header that has a Layer 2 VNID 30000 stamp.

  4. VTEP V2 receives the packets. After de-encapsulation and lookup, it bridges them to Host B.

VXLAN as a Router

A VXLAN also can serve as a router.

Each step number corresponds to a number in the following figure:

  1. If the DMAC is the default gateway, then host A transmits traffic to its default gateway, after using the Address Resolution Protocol (ARP), which configures on the directly attached VTEP V1.

  2. V1 performs a Forwarding Information Base (FIB) lookup that is based on the destination IP address in the packet header.

  3. VTEP V1 routes the packets and transmits them toward VTEP V2 with a VXLAN header stamped with the virtual routing and forwarding (VRF [Layer 3]) VNID 50000.

  4. VTEP V2 receives the packets. After de-encapsulation, routing lookup, and rewrite, it transmits them to Host F.

VTEP End-Host Detection

VTEP provides end-host detection.

When a new end host (Host A) attaches to VTEP V1, the following actions occur:

  1. VTEP V1 learns the Host A MAC and IP address via ARP (MAC_A and IP_A).

  2. V1 advertises MAC_A and IP_A to the other VTEPs V2 and V3 through the BGP route reflector in the spine.

  3. The encapsulation choice (VXLAN) also is advertised.

VXLAN: Host Moves from VTEP V1 to VTEP V3

If Host A moves from VTEP V1 to V3, the following actions occur:

  1. V3 detects Host A and advertises it with Sequence 1 (updating the previous instance of the sequence, 0). The next hop IP address reassigns it to that of VTEP 3.

  2. VTEP V1 detects a more recent route and withdraws its advertisement.

VXLAN ARP Suppression

ARP suppression is an enhanced function that is configured under the Layer 2 VNID (with the suppress-arp command). Essentially, the IP-MACs learned locally through ARP and the IP-MACs learned over BGP EVPN are stored in a local ARP suppression cache at each top-of-rack (ToR) switch. The source ToR switch traps an ARP request that the end host transmits. The ARP suppression cache performs a lookup with the destination IP as the key. If a hit occurs, then the ToR switch proxies on behalf of the destination host, which is illustrated in the following figure.

If the destination is unknown or the end host is silent, the lookup results in a miss. When this happens, the ToR switch reinjects the ARP request that it received from the requesting end host and broadcasts it within the Layer 2 VNID. The process entails transmitting the ARP request locally over the server-facing ports and transmitting a VXLAN-encapsulated packet with the Layer 2 VNID over the IP core. Every receiving VTEP with membership within the same Layer 2 VNID will de-encapsulate the VXLAN-encapsulated packet.

The receiving VTEPs then forward the inner ARP frame toward the server-facing ports. As long as the destination remains alive, the ARP request reaches the destination, which then transmits an ARP response toward the sender. The receiving ToR switch traps the ARP response, even though that ARP response is a unicast packet that is directed to the source virtual machine (VM), since the ARP suppression feature is enabled.

The ToR switch learns about the destination IP and MAC and advertises it over the BGP EVPN to all the other ToR switches. The ToR switch also reinjects the ARP response packet into the network so that it reaches the original requestor. VXLAN encapsulates it toward the IP core because the original requestor was remote.