VXLAN Packet Format

VXLAN is a network virtualization technique that uses MAC-in-UDP encapsulation by adding a UDP header and a VXLAN header before a raw Ethernet packet.

Figure 1 shows VXLAN packet formats for different combinations of underlay and overlay networks.
Figure 1 Brief VXLAN packet formats

Figure 2 shows VXLAN packet format details.

Figure 2 VXLAN packet format details
Table 1 Description of VXLAN packet formats

Field

Description

VXLAN header

  • VXLAN Flags (8 bits): The value is 00001000.
  • VNI (24 bits): VXLAN network identifier used to identify a VXLAN segment.
  • Reserved fields (24 bits and 8 bits): must be set to 0.

Outer UDP header

  • DestPort: destination port number, which is 4789 for UDP.
  • Source Port: source port number, which is calculated by performing the hash operation on inner Ethernet frame headers.
    NOTE:

    In the case of intra-subnet communication (Layer 2 forwarding), the default hash factor used for calculating the source port number is L2VNI+MAC address. You can change the hash factor to L2VNI through configuration. If the L2VNI+MAC address or L2VNI value is unique, traffic fails to be hashed. In this case, you can configure Layer 2 deep hash to calculate the source port number based on the source IP address, destination IP address, source port number, destination port number, and protocol type.

    In the case of inter-subnet communication (Layer 3 forwarding), the default hash factor used for calculating the source port number is L3VNI+IP address. You can change the hash factor to L3VNI through configuration.

Outer IP header

  • IP SA: source IP address, which is the IP address of the local VTEP of a VXLAN tunnel.
  • IP DA: destination IP address, which is the IP address of the remote VTEP of a VXLAN tunnel.

Outer Ethernet header

  • MAC DA: destination MAC address, which is the MAC address mapped to the next hop IP address based on the destination VTEP address in the routing table of the VTEP on which the VM that sends packets resides.
  • MAC SA: source MAC address, which is the MAC address of the VTEP on which the VM that sends packet resides.
  • 802.1Q Tag: VLAN tag carried in packets. This field is optional.
  • Ethernet Type: Ethernet frame type.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >