< Home

Packet Encapsulation Format

During VXLAN encapsulation, a VXLAN header, UDP header, IP header, and Ethernet header are added in sequence to an original packet.

Figure 1 shows the packet encapsulation format.

Figure 1 VXLAN packet format

Table 1 describes headers added to an original packet during VXLAN encapsulation.

Table 1 Description of headers added to an original packet

Field

Description

VXLAN header

  • VXLAN Flags: specifies flags (16 bits).
  • Group ID: indicates the user group ID (16 bits). When the first bit of VXLAN Flags is 1, the value is the group ID. When the first bit of VXLAN Flags is 0, the value is 16 zeros.
  • VNI: specifies an identifier (24 bits) used to identify a VXLAN segment, with up to 16M tenants. Users in different VXLAN segments cannot directly communicate at Layer 2.
  • Reserved: The 8-bit field is reserved and set to 0.

Outer UDP header

  • DestPort: specifies the destination UDP port number. The value is 4789.
  • Source Port: specifies the source UDP port number. For Ethernet packets that contain IP headers, the source UDP port number is calculated using the hash algorithm based on the factors configured using the ecmp load-balance command. For Ethernet packets that do not contain IP headers, the source UDP port number is not calculated using the hash algorithm. The source UDP port numbers in VXLAN headers encapsulated into packets entering the same interface card are the same.

Outer IP header

  • IP SA: specifies the source IP address, which is the IP address of the source VTEP.
  • IP DA: specifies the destination IP address, which is the IP address of the destination VTEP.

Outer Ethernet header

  • MAC DA: specifies the destination MAC address, which is the MAC address of the next-hop device on the route to the destination VTEP.
  • MAC SA: specifies the source MAC address, which is the MAC address of the source VTEP that sends the packet.
  • 802.1Q Tag (optional): specifies the VLAN tag in the packet.
  • Ethernet Type: specifies the type of the Ethernet frame. The value of this field is 0x0800 when an IP packet is transmitted.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >