VLAN & VXLAN

802.1Q tagging, trunk vs access ports, VXLAN encapsulation over UDP port 4789, VTEP endpoints, and NVO3 overlay networks.

Overview

Overview VLANs (Virtual Local Area Networks) and VXLAN (Virtual Extensible LAN) are foundational technologies for network segmentation and overlay networking, both critical in modern cloud and data center infrastructure.

A VLAN is a logical partition of a Layer 2 network. Using IEEE 802.1Q tagging, a 12-bit VLAN ID (1-4094) is inserted into the Ethernet frame header, allowing switches to segregate traffic into isolated broadcast domains without requiring separate physical infrastructure. VLANs are the building block of traditional enterprise network segmentation, used to separate departments, isolate tenants, and reduce broadcast domain size.

However, VLANs have a fundamental limitation: the 4094 VLAN limit is grossly insufficient for large multi-tenant environments like public clouds. AWS, GCP, and Azure each host millions of customer VPCs, far exceeding what 802.1Q can address. VXLAN was designed to solve this.

VXLAN encapsulates Layer 2 Ethernet frames inside UDP packets, creating an overlay network across an existing Layer 3 underlay. The VXLAN header includes a 24-bit VNI (VXLAN Network Identifier), allowing over 16 million virtual segments. Traffic flows between VTEP (VXLAN Tunnel Endpoint) devices, which perform encapsulation and decapsulation.

VXLAN is the backbone of OpenStack Neutron, VMware NSX-T, and Kubernetes CNI plugins like Flannel and Cilium. AWS uses a proprietary variant (Nitro hypervisor encapsulation) for VPC networking. Understanding VTEP behavior, multicast vs unicast VXLAN, and EVPN control plane is expected knowledge for senior networking and cloud platform engineers.

Key concepts

  • 802.1Q Tagging
  • Trunk Port vs Access Port
  • VTEP (VXLAN Tunnel Endpoint)
  • VNI (VXLAN Network Identifier)
  • EVPN (Ethernet VPN)

Interview questions

  • How does VXLAN encapsulation work, and how would you troubleshoot a scenario where pods in different Kubernetes nodes cannot communicate using a VXLAN-based CNI?
  • What is the difference between VLAN and VXLAN and when would you choose one over the other in a data center design?

Sign up free to read the full topic

More Networking topics

Start free on Cariara · Coding problems · System design studio