NVGRE vs VXLAN: What's the Difference?

Posted on January 15, 2020
July 6, 2020
1577

Both NVGRE (network virtualization using generic routing encapsulation)and VXLAN (virtual extensible LAN) are networking virtualization technologies, which aim to extend VLAN to solve problems of scanty virtual networking in large cloud computing deployments. As a part of the virtual network, NVGRE and VXLAN don’t provide substantive functions. They just define how to encapsulate and forward packets between different VMs (virtual machines). Then, NVGRE vs VXLAN: What's the Difference? Continue reading to find the answer.

What Is NVGRE?

NVGRE is a network virtualization method that uses encapsulation and tunneling to provide subnets with large numbers of virtual LANs (VLANs). Considering that VLANs can extend across dispersed data centers as well as layer 2 (the data link layer) and layer 3 (the network layer), so providing subnets with VLANs can enable multi-tenant and load-balanced networks to be shared across on-premises and cloud environments. NVGRE aims to solve the problems caused by a limited number of VLANs which fail to work in complex virtualized environments and stretch network segments over the long distances required for dispersed data centers. NVGRE standard is proposed by Microsoft, Intel, HP and Dell. It competes with another encapsulation method VXLAN.

What Is VXLAN?

As its name implies, VXLAN is a network virtual technology to expand VLAN. It is designed to solve the problem of insufficient virtual networking in large-scale cloud computing data center at present. In fact, network engineers used to leverage VLANs to separate cloud applications and tenants in a cloud computing environment. However, VLAN only allows up to 4096 network IDs to be assigned at a specific time, which is not enough for a large cloud computing environment. So VXLAN is designed to extend the VLAN address space by adding a 24-bit segment ID to increase the number of available IDs to 16 million while logically secluding cloud applications and tenants. And the VXLAN segment ID in each frame can tell apart individual logical networks and network IDs of the tenants. Therefore, millions of independent layer 2 VXLAN networks can coexist on a common layer 3 infrastructure. The VXLAN specification was originally created by Cisco, VMware, and Arista Networks. Know more information about VXLAN here: QinQ vs VLAN vs VXLAN

NVGRE vs VXLAN: What’s the Difference?

NVGRE and VXLAN are almost identical in terms of practical use. The main differences between them lie in backers, transport protocols, and packet format, etc.

Backers and Transport Protocol

NVGRE is mainly supported by Microsoft while VXLAN is mainly driven by Cisco. Different from VXLAN which makes use of a standard transport protocol (TCP/UDP), NVGRE protocol is GRE (generic routing encapsulation).

Packet Format

Packet format is the most remarkable difference between NVGRE and VXLAN. The VXLAN packet header includes a 24-bit ID segment, which stands for 16 million unique virtual segments. This ID is usually generated by pseudo-random algorithm on UDP ports. This helps to keep load balancing based on 5-tuple and preserve the order of packets between VMs by mapping the MAC group within packets to a unique UDP port group. VXLAN encapsulation expands the packet size to 50 bytes, which is shown as below.

Figure 1 Packet Format of VXLAN.png

NVGRE uses the lower 24 bits of the GRE header as the TNI (tenant network identifier), which, like the VXLAN, can support 16 million virtual networks. In order to provide a flow-level granularity describing the bandwidth utilization, the transmission network needs to use the GRE header. But this results in NVGRE not being compatible with traditional load balancing, which is the main shortcoming of NVGRE and the biggest difference from NVGRE.

Figure 2 Packet Format of NVGRE.png


Transmission Method

VXLAN utilizes multicast in the transport network in order to simulate flooding behavior for broadcast, unknown unicast, and multicast in the layer 2 segments, which is important for MAC address learning as well as protocols like ARP and Neighbour Discovery in the whole VXLAN working process. As for NVGRE, in order to enhance load-balancing capabilities, it is recommended that multiple IP addresses be used in each NVGRE host to ensure that more traffic can be load balanced. Instead of relying on flooding and IP multicast, NVGRE broadcasts in a more flexible way.

Sharding

NVGRE supports sharding the packet maximum transmission unit to further decrease the packet scale of the internal virtual networks. It doesn’t require the transmission network to support large frames. However, VXLAN needs a transmission network that supports large frames to bear the expansion of packet scale. That is to say, VXLAN doesn’t support sharding.

Conclusion

VXLAN and NVGRE are advanced network virtualization implement tunneling technologies in comparison with VLAN. They expand virtual networks size from 4096 to 16 million and allow layer 2 packets to transmit across layer 3 networks. So network devices are often added NVGRE and VXLAN to expand network scalability. Therefore, switches supporting VXLAN and NVGRE are often used to overcome limits of VLAN in large cloud computing and enable an agile VM networking environment.