Forum

Notifications
Clear all

VXLAN (Virtual Extensible LAN) Protocol Explained.

1 Posts
1 Users
0 Reactions
10 Views
 josh
(@josh)
Member Admin
Joined: 2 months ago
Posts: 510
Topic starter  

VXLAN (Virtual Extensible LAN) is a network virtualization technology that extends the capabilities of VLANs, particularly in large-scale data center and cloud environments. While VLANs provide Layer 2 segmentation within a local network (limited to 4094 segments), VXLAN allows for the creation of Layer 2 virtual networks that can span across a Layer 3 (IP) network.

Essentially, VXLAN creates an overlay network (the virtualized Layer 2 segments) on top of an underlay network (the physical Layer 3 IP infrastructure). It achieves this by encapsulating Layer 2 Ethernet frames within Layer 4 UDP packets.

 

Why was VXLAN created? (Limitations of VLANs):

 

Traditional VLANs, while effective for basic network segmentation, face significant limitations in modern data centers, especially with the rise of virtualization and cloud computing:

  1. VLAN ID Limitation (4094): The 12-bit VLAN ID field in 802.1Q limits the number of unique VLANs to 4094. In large multi-tenant cloud environments or very large data centers, this number is insufficient to provide unique logical segments for every tenant or application.

  2. Lack of Layer 2 Mobility Across Layer 3 Boundaries: VLANs are Layer 2 constructs. If a Virtual Machine (VM) needs to move (vMotion) to a different physical server that is in a different Layer 3 subnet, its IP address needs to change, which can disrupt applications. Data centers need the ability to “stretch” Layer 2 networks across Layer 3 boundaries to enable seamless VM mobility.

  3. Spanning Tree Protocol (STP) Issues: Traditional Layer 2 networks often rely on STP for loop prevention. STP blocks redundant paths, leading to inefficient use of expensive network infrastructure. Data centers demand all paths to be active for load balancing and increased bandwidth.

  4. MAC Address Table Scalability: With many VMs on a single physical host, Top-of-Rack (ToR) switches can quickly reach their MAC address table limits.

VXLAN was developed to overcome these challenges.

 

How VXLAN Works:

 

VXLAN operates on the principle of MAC-in-UDP encapsulation. Here’s a breakdown:

  1. VXLAN Network Identifier (VNI):

    • Instead of a 12-bit VLAN ID, VXLAN uses a 24-bit VXLAN Network Identifier (VNI).

    • This 24-bit VNI provides a massive increase in segmentation capability, supporting approximately or over 16 million unique VXLAN segments. This is a key differentiator from VLANs.

  2. VXLAN Tunnel Endpoints (VTEPs):

    • VTEPs are the devices (physical switches or virtual switches within hypervisors) that perform the VXLAN encapsulation and decapsulation.

    • Each VTEP has an IP address on the underlying Layer 3 network. This IP address is used to build the VXLAN tunnels.

    • VTEPs are the bridges between the traditional Layer 2 network (where VMs or physical servers reside) and the VXLAN overlay network.

  3. Encapsulation Process (Data Plane):

    • When a VM (or server) on a VXLAN segment sends an Ethernet frame:

      1. The frame reaches its local VTEP.

      2. The VTEP takes the original Layer 2 Ethernet frame and adds a VXLAN header. This header includes the VNI, indicating which virtual network the frame belongs to.

      3. The VTEP then encapsulates this entire VXLAN-tagged frame within a UDP header (default UDP port 4789).

      4. Finally, an outer IP header and outer Layer 2 Ethernet header are added. The destination IP address in the outer header is the IP address of the remote VTEP (the VTEP connected to the destination VM/server).

      5. This encapsulated packet is then routed across the underlying Layer 3 IP network like any other IP packet.

  4. Decapsulation Process:

    • When the encapsulated packet arrives at the destination VTEP:

      1. The destination VTEP strips off the outer Layer 2, IP, and UDP headers.

      2. It then inspects the VXLAN header to determine the VNI.

      3. The original Layer 2 Ethernet frame is decapsulated and forwarded to the target VM/server within the correct VXLAN segment.

  5. Control Plane (How VTEPs Learn):

    • While the data plane handles encapsulation/decapsulation, VTEPs need a way to learn the MAC addresses of VMs and which VTEP they are behind. There are a few common control plane mechanisms:

      • Flood and Learn (Original VXLAN): Similar to traditional Layer 2 switches, VTEPs flood unknown unicast, broadcast, and multicast (BUM) traffic across the VXLAN tunnel using IP multicast in the underlay. As responses come back, MAC addresses are learned and stored in the VTEP’s forwarding table. This method can be inefficient for large scale.

      • EVPN (Ethernet VPN) with MP-BGP (Multiprotocol BGP): This is the most common and scalable control plane for VXLAN in modern data centers. EVPN uses MP-BGP to distribute MAC address and VTEP reachability information between VTEPs. This prevents excessive flooding, allows for more efficient traffic forwarding, and supports advanced features like active-active multi-homing.

 

Key Benefits of VXLAN:

 

  1. Massive Scalability: Over 16 million logical network segments (VNIs) compared to 4094 VLANs. Essential for multi-tenant cloud environments.

  2. Layer 2 Extension Over Layer 3: Allows Layer 2 segments to be stretched across geographically dispersed data centers, enabling seamless VM mobility (vMotion) without IP address changes. This simplifies disaster recovery and workload placement.

  3. Optimal Underlay Network Utilization (ECMP): By encapsulating Layer 2 traffic in Layer 3 packets, VXLAN leverages the robust routing capabilities of the underlying IP network. This means it can utilize all available paths (e.g., via Equal-Cost Multi-Path – ECMP routing), eliminating the need for STP and avoiding blocked links, thus improving network bandwidth utilization and resilience.

  4. Decoupling of Overlay from Underlay: The virtual network (overlay) operates independently of the physical network (underlay). This provides tremendous flexibility in network design and simplifies operations, as changes in the overlay don’t necessarily require reconfiguring the underlay.

  5. Multi-Tenancy: Provides strong isolation between different tenants or departments sharing the same physical infrastructure, enhancing security.

  6. Integration with SDN/NFV: VXLAN is a foundational technology for Software-Defined Networking (SDN) and Network Functions Virtualization (NFV) solutions, allowing for programmatic control and automation of network services.

 

Common Use Cases:

 

  • Large-Scale Data Centers: The primary use case, especially those with high levels of server virtualization.

  • Cloud Computing Environments: Essential for public and private cloud providers to offer isolated and scalable networks to numerous tenants.

  • Workload Mobility: Enabling live migration of VMs across different physical racks or even data centers without re-IP addressing.

  • Hybrid Cloud Connectivity: Connecting on-premises data centers with public cloud infrastructure while maintaining Layer 2 adjacency for certain applications.

  • Microsegmentation: While VXLAN provides the underlying transport, it works hand-in-hand with policy enforcement engines (often part of SDN solutions like Cisco ACI or VMware NSX) to implement granular security policies at the host or VM level.

In summary, VXLAN is a critical technology for modern, highly virtualized networks. It solves the scalability and mobility limitations of traditional VLANs by providing a robust and flexible way to create logical Layer 2 networks that can span across a Layer 3 IP infrastructure, paving the way for more agile, scalable, and resilient data center designs.


   
Quote
Share: