What is VXLAN?
VXLAN, short for "Virtual eXtensible Local Area Network", is a tunneling protocol that encapsulates Ethernet frames within IP packets. By using VXLAN, it is possible to construct a logical Layer 2 (L2) network segment over a Layer 3 (L3) network.
Since the mid-1990s, VLAN (Virtual LAN) has been widely used to create logical (virtual) L2 segments on physical switches. However, standard VLAN implementations use 12-bit VLAN IDs, limiting the maximum number of L2 segments to approximately 4,000, making VLANs unsuitable for large-scale networks. VXLAN resolves this limitation.
In VXLAN, the VXLAN ID is expanded to 24 bits, enabling the creation of up to approximately 16 million L2 segments. Additionally, VXLAN allows logical L2 segments to be built over an L3 network, enabling the construction of seamless L2 segments across multiple sites connected by routers.
These features provide significant advantages, such as during live migration of virtual machines to different physical servers. In traditional setups, migrating across L2 domains leads to the loss of a consistent IP subnet, requiring the migrated virtual machine to be assigned a different IP address and forcing clients to change their target IP addresses. With VXLAN, a single L2 segment can span routers, eliminating these issues and simplifying live migrations. Its ability to transparently create logical networks across multiple locations also makes VXLAN useful for disaster recovery and fault tolerance scenarios.
Leveraging tunneling protocols like VXLAN to establish logical networks over existing infrastructures is referred to as network overlay. Another example of network overlay technology similar to VXLAN is NVGRE. Virtualizing networks through network overlays is a key component in achieving software-defined networks (SDN), which enable software-based network configurations.