VXLAN (Virtual Extensible LAN) is an overlay tunneling scheme where we can extend the layer 2 domain over a layer 3 underlay network.
Major use case of VXLAN occurs in extending VLAN across geographically spread Data-Centers. vMotion across data-centers requires us to have same L2 domain across data-centers and hence this can be easily achieved with the help of VXLAN overlay.
Below figure shows the VXLAN encapsulated Packet Format:
VTI (VxLAN Tunnel Interface): It is a switch port linked to a UDP socket to be shared between many VLANs. VXLAN header encapsulation and de-multiplexing occurs at this interface.
Encapsulation at headend of VXLAN tunnel and de-multiplexing at tail-end.
VNI ( VXLAN network Identifier or VXLAN Segment ID): It is a 24 bit number that distinguishes between VLANs being carried over the VTI.
VTEP (VXLAN Tunnel Endpoint): It is an entity where either a VXLAN tunnel originates or terminates.
VXLAN Segment: A network-wide layer-2 domain implemented as an overlay network of VTEPs interconnected using VXLAN Tunnel Interfaces.
Two ways to implement VXLAN based on the use cases in Data Centers:
Bridging: When the two hosts communicating are on same subnet and no gateways are required on the VTEPs. In this case packets can be simply bridged over the VTIs from source VTEP to destination VTEP.
Routing: When the two hosts communicating are on different subnet and gateway is required on the VTEP. Packet will be routed from the source VLAN to the destination VLAN on the first hop VTEP. And then will be bridged to remote VTEP.
Control Plane Options for VXLAN are:
- HER (Head End Replication) aka Ingress Replication in Cisco.
- BGP EVPN
Sample Configuration of VXLAN Tunnel: