
Overlay networks
Encapsulation protocols are fundamental in Software-Defined Networking (SDN). They are responsible for implementing the tunnels that act as a backplane to carry the logical segments traffic across the physical infrastructure. Encapsulation protocols transport frames between our VMs, containers, and bare-metal applications by encapsulating them in a few additional headers. If there is a path to the destination, encapsulation protocols do their job, regardless of the physical network topology, and regardless of whether the traffic just needs to be forwarded by a few switches or must traverse a bunch of routers too.
In this article, we will dive into overlay network protocol advancements from VXLAN to GENEVE. We’ll then discuss the current state of NSX and its role within the VMware Cloud Foundation platform.
This module, covers the following main topics:
- Part 1:
- Part 2:
By the end of this two-part module, you’ll have a solid understanding of the core concepts of network virtualization. This includes distinctions between underlay and overlay networks. You’ll also learn how major network virtualization players have influenced the development of encapsulation protocols. You’ll understand the evolution of VMware’s code from vShield, prior to the Nicira acquisition, to the current NSX implementation. Additionally, we’ll explore how NSX integrates seamlessly into the VMware ecosystem.
Encapsulation protocols
When discussing encapsulation protocols, I always explain encapsulation protocols behave like a package delivery company – think of DHL or UPS. When we want to ship an object from – say – Milan to Rome, we wrap the item to protect it. We call the carrier, tell them the destination, and we are done. We don’t care about the route they will choose or whether the delivery company will transport our parcel to the destination by airplane, train, lorry, van, car, motorbike, bicycle, push scooter, or even a catapult. We just care the package is delivered to the correct recipient so they can unwrap it and get the content. We may wish to see the goods delivered by the start of the next business day, or maybe by noon. This is what we call Quality of Service (QoS).
That’s exactly what an encapsulation protocol does. It carries data across its transport network, regardless of the topology, provided it can physically get to the requested destination.
Road to an RFC Internet Standard
Before we had a standard, there were multiple encapsulation protocols for network virtualization proposed by different vendors. The three main ones were:
- Virtual eXtensible Local Area Network (VXLAN): Initially published in August 2011 as an Experimental Internet Draft by VMware, Cisco, Arista, Broadcom, Citrix, and Red Hat (culminating as Independent RFC 7348 in August 2014).
- Network Virtualization using Generic Routing Encapsulation (NVGRE): Initially published in September 2011 as an Informational Internet Draft by Microsoft, Facebook, Arista Networks, Intel, Google, Hewlett-Packard, Broadcom, and Emulex (culminating as Independent RFC 7637 in September 2015).
- Stateless Transport Tunnelling (STT): Initially published in February 2012 as an Informational Internet Draft by Nicira (expired and archived in April 2016).
For historical tracking purposes, we shall also mention VMware’s MAC-in-MAC encapsulation mechanism, which was created for vCloud Director. It was implementing virtual networks through vCloud Networking and Security (vCNS). However, it did not survive the other encapsulation protocols competition.
STT was specifically designed by Nicira with SDN in mind and mainly used in virtual switches within the hypervisors. STT was taking advantage of TCP Segmentation Offload (TSO) and Large Receive Offload (LRO) at the physical NIC level. It was also providing enough flexibility thanks to fields that could be modified as required by new capabilities being implemented. Instead, the NVGRE and VXLAN protocols were, at least initially, mostly conceived for multi-vendor hardware-based implementations. They had a number of inflexibilities that made them comparatively less suitable for running in virtual switches.
Nevertheless, VXLAN quickly gained traction within an increasing number of vendors. This made it a good candidate for SDN implementations in virtual infrastructures too. When VMware NSX for vSphere [v6.0] was released in 2013, it used VXLAN as its encapsulation protocol to carry overlay network traffic across transport nodes through their VXLAN Tunnel End Points (VTEPs).
NSX Easter egg
When NSX was initially released, with its roots in VMware vCNS and Nicira NVP, it inherited NVP’s UDP port 8472. This was not yet the port that the IANA later reserved for VXLAN (4789) in April 2013. The port did not change until NSX for vSphere version 6.2.3, released in June 2016.
According to unofficial and unconfirmed rumours (aren’t these the distinctive traits of rumours in the end?), port 8472 may have been an Easter egg referring to Species 8472, an extraterrestrial species in the science fiction television series Star Trek: Voyager.
The name “Species 8472” was designated by the Borg, an alien group of cybernetic organisms that expand their collective by assimilating all other species they encounter. This process involves forcibly transforming individuals into Borg drones by injecting nanoprobes and surgically implanting cybernetic enhancements.
Species 8472 were tripodal, humanoid in shape but with a reptilian appearance, and possessed immense physical strength. They had advanced telepathic abilities, rapid healing, and the capacity to adapt to hostile environments. Their biological make-up rendered them immune to most forms of weaponry.
When the Borg invaded their world and tried assimilating Species 8472, they were utterly defeated. This led to a fear of this species within the Borg collective.
Speculation
In the developers’ intentions, reference to the Borg may be related to the assimilated collective of legacy hardware networking vendors. Species 8472 – by analogy – may have represented the new SDN pioneering forerunners.
VXLAN: anatomy and limitations
The VXLAN protocol was designed to overcome certain limitations in physical networks when running virtual machines in a multi-tenanted infrastructure, such as the following:
- Spanning Tree Protocol (STP): The loop-avoidance functionalities of STP prevent us from leveraging multipath failover designs.
- VLAN/PVLAN scalability: The VLAN ID is a 12-bit identifier allowing only 4,094 discrete networks, not an impressive number in an enterprise or service provider data center.
- Inadequacy in multi-tenant environments: VLAN ranges constraints and limitations to large-scale tenants’ expansion and coexistence.
- Top-of-Rack (ToR) switches MAC tables saturation: Due to the large number of workloads running in a multi-tenant environment, when MAC learning has reached its limits, unknown unicast flooding increases demand on the devices.
VXLAN tries to address these limitations by encapsulating the original payload to transparently transport it across the physical backbone. VXLAN leverages a 64-bit fixed-length header that carries metadata about the logical network the payload belongs to.
Packet format
The VXLAN packet is built (see Figure 1.1) by encapsulating the inner Layer 2 frame – originating from our virtual machines, containers, or bare metal applications – with the following four headers:
- VXLAN Header (8 bytes): Defined by RFC 7348 with four fields having the following format.
- Flags (8 bits): Must be configured as 00001000 to be valid.
- Reserved (24 bits): Must all be set to 0 and ignored on receipt.
- VXLAN Network Identifier or VNI (24 bits): Used to identify the VXLAN overlay segment the encapsulated inner frame belongs to. Being a 24-bit number, it allows up to 16,777,216 networks.
- Reserved (8 bits): Must all be set to 0 and ignored on receipt.
- Outer UDP Header (8 bytes): A standard UDP header where the source port is determined by the source VTEP performing the encapsulation process, and the destination should be the IANA-assigned, well-known port 4789. VXLAN RFC 7348, though, tolerates different destination port numbers, like those inherited from earlier implementations (as in our NSX for vSphere releases up to version 6.2.2, using port 8472).
- Outer IP Header (20 bytes for IPv4, 40 bytes for IPv6): A standard IP header – NSX for vSphere VXLAN implementation only supports IPv4 – with source and destination VTEP IP addresses.
- Outer Ethernet Header (14 bytes + 4 bytes for optional VLAN tagging): A standard Ethernet header with a source VTEP MAC address and – as a destination address – the target VTEP MAC or the transport network router interface MAC. The optional 802.1Q VLAN tagging is typically used in production environments to separate the overlay transport traffic from the other network traffic types.
The following figure illustrates a VXLAN packet – with all its headers, and the details of the VXLAN header format – encapsulating a workload frame.

VXLAN limitations
The rigid and prescriptive format of the VXLAN header fields, though, soon proved to be a constraint in SDN-based architectures. The dynamic and constantly evolving capabilities of a software control plane required several time-consuming amendments to the protocol. This led to some proprietary implementations, solving the specific needs, but introducing a dangerous drift that made vendor interoperability a challenge.
This, for example, was the case with NSX for vSphere: VMware decided to proprietarily implement a flag they called the REPLICATE_LOCALLY bit. The sixth bit of the VXLAN header flags field was used to control how the encapsulated broadcast, unknown unicast, or multicast (BUM) traffic would have to be replicated across the VTEPs in a VXLAN segment. This introduced the role of the VTEP proxy to offload the replication of VXLAN packets carrying our workloads’ BUM traffic:
- UTEP or Unicast VTEP Proxy for unicast-based replication (with the flag set to 0, the default behaviour).
- MTEP or Multicast VTEP Proxy for multicast-based replication (with the flag set to 1).
From VXLAN to GENEVE
To overcome VXLAN limitations in SDN implementations, in May 2015 a group of networking vendors – including VMware, Microsoft, Red Hat, Intel, Innovium, Arista, Cumulus, and Brocade – published an Internet Draft for a new encapsulation protocol called Generic Network Virtualization Encapsulation (GENEVE), designed to provide the flexibility required to keep pace with the evolution of the technology. In November 2020, RFC 8926 was published as a Proposed Standard.
Long story short, the GENEVE header moves away from the rigid VXLAN header format by adding room to accommodate multiple variable-length options implemented using a Type-Length-Value (TLV) format. Options can be used to carry metadata for control traffic destined to the Tunnel End Points (TEPs) – think of configuration messages or heartbeats, for example – or to implement additional advanced capabilities such as security and monitoring functionalities.
VMware NSX-T [v1.x/v2.x], VMware NSX-T Data Center [v3.x], and VMware NSX [v4.x], all take advantage of the innovations and benefits provided by the GENEVE protocol.
The GENEVE header has a minimum length of 8 bytes, like a VXLAN header. The last 4 bytes contain the same two fields, in the same order seen in the VXLAN header: 24 bits for the VNI and 8 bits reserved. The initial 4 bytes in the GENEVE header are instead totally new. They implement new useful features, namely the Packet Version field, the Options Length field, the Control Packet flag, the Critical Bit flag, and the Protocol Type field.
The GENEVE header: first 8 bytes
The initial 8 bytes of the GENEVE header have the following format:
- Ver (2 bits): This is the GENEVE packet version number and currently can only be set to 0.
- Opt Len (6 bits): This field is used to immediately declare the length of the variable-length options section. It is a value provided in 4-byte multiples and excludes the initial 8 bytes that are fixed. This field can store a value between 0 (in binary: 000000) and 63 (in binary: 111111). Hence, the overall GENEVE header size ranges from 8 bytes when zero options are attached to 260 bytes when the largest Opt Len value is used (8 bytes + 63 x 4 bytes = 8 + 252 bytes = 260 bytes).
- O (1 bit): This flag is used to declare a Control Packet, that is, a control message destined to the TEP. The encapsulated payload is the control message and must not be forwarded elsewhere.
- C (1 bit): This flag is used to declare whether any of the attached variable-length options has the Critical Bit flag set.
- Reserved (6 bits): These bits must all be set to 0 and ignored on receipt.
- Protocol type (16 bits): This field is used to declare the type of the encapsulated payload. In NSX, we’ll find the value 0x6558 representing an Ethernet frame.
- Virtual Network Identifier (VNI) (24 bits): This field provides a maximum of 16,777,216 unique IDs.
- Reserved (8 bits): These bits must all be set to 0 and ignored on receipt.
The following figure graphically illustrates a GENEVE packet – with all its added headers,and the details of the GENEVE header format – encapsulating a workload frame.

The GENEVE header: variable-length options
The initial 8 bytes of the GENEVE header are then complemented by zero or more variable-length options in type-length-value format. Each option is made of a 4-byte long header specifying the following:
- Option class (16 bits): This field is the namespace for the Type field. Option classes are regulated by a IANA protocol registry, called GENEVE Option Class, to keep track of the organizations – VMware is identified as 0x0104 – that are willing to create GENEVE options.
- Type (8 bits): This field is used to declare the format of the data of this option. Option types are autonomously allocated by each organization to allow rapid feature implementation. The first bit in this field is used to declare whether this option is critical.
- R (3 bits): These bits must all be set to 0 and ignored on receipt.
- Length (5 bits): This field is used to declare the option data length (therefore, it excludes the option header) with a value provided in 4-byte multiples. This field can store a value between 0 (in binary: 00000) and 31 (in binary: 11111). Hence, the overall option size ranges from 4 bytes for just its header when no option data is provided to 128 bytes when the largest length value is used (4 bytes + 31 x 4 bytes = 4 + 124 bytes = 128 bytes).
- Variable-length option data: This is whatever the option data needs to be.
In NSX, VMware is using variable-length options to implement In-band Network Telemetry (INT) – a framework designed to allow the collection and reporting of network state by the data plane – and several Advanced Threat Prevention security capabilities.
Introduction to NSX and its role in VMware network virtualization
NSX is a fundamental component of VMware’s multi-cloud networking strategy. It enables Virtual Private Clouds (VPCs) and full-stack automation, allowing a complete self-service, orchestrated, policy-driven experience. NSX also provides a strong suite of Advanced Threat Prevention features through consistent network-wide policies as well as visibility across multiple locations, both on-premises and off-premises.
VMware calls this the “NSX Anywhere Architecture: Any Site, Any Cloud, Any Device.”
NSX is a pivotal element in the Software-Defined Data Center (SDDC) architecture of the VMware Cloud Foundation (VCF) offering for on-premises private clouds. NSX is also key in any of the VMware Cloud options on public and hybrid cloud providers’ off-premises data centers. VMware Cloud Infrastructure products, taking advantage of NSX policy-driven API-based orchestration, unlock the value of any cloud.
NSX in VMware Cloud Foundation
- Automatically deploys full-stack Virtual Infrastructure Workload Domains from the VMware Cloud Foundation SDDC Manager with either shared or dedicated NSX fabrics.
- Supports automated deployment and configuration of NSX Edge clusters from the SDDC Manager. Enables Day2 management operations such as scale-out and scale-in tasks to accommodate changes in the North-South centralized network services demand generated by the traffic that flows in and out of the Software-Defined Data Center.
- Enables full SDDC Manager integration, allowing automated deployment of Application Virtual Networks (AVNs) in the Management Domain. AVNs enable Aria Suite applications to manage and monitor all Virtual Infrastructure Workload Domains workloads.
- Empowers application architects, through the integration with Aria Automation, to design and author Infrastructure-as-Code (IaC) cloud templates. Thus, architects can leverage the network constructs and security features of NSX such as logical segments, logical routers, load balancing, and security groups. Cloud templates can then be automatically provisioned on demand by tenants’ users from a self-service catalog.
- Provides full-stack networking and security for containerized applications and microservices, and leverages native container networking, micro-segmentation, and observability for Kubernetes.
- Assists with moving workloads across all sites and clouds with ease, and simplifies data center extension or consolidation. Facilitates multi-datacenter pooling, and ensures continuity with streamlined disaster recovery strategies.
- Enables visibility across virtual and physical networks and provides operational views to manage and scale NSX deployments. Examines and troubleshoots traffic flows for applications deployed on multiple clouds.
Summary
Within this module, in Part 1, we have discussed the core concepts of network virtualization. We have compared the limitations of traditional networks with the benefits provided by logical networks, understanding the roles of underlay and overlay networking. We have also navigated through the history of network virtualization.
In Part 2, we have examined the evolution of encapsulation protocols from VXLAN to GENEVE. By now, we should be able to enumerate – and possibly explain to our peers – why NSX is the ideal solution in a virtualized environment to build a streamlined, resilient, scaled-out, secure network infrastructure for our applications.
