< Home

Packet Identification

On a VXLAN network, VNIs are mapped to BDs in 1:1 mode. After a packet reaches a VTEP, the VTEP can identify the BD to which the packet belongs, then select a correct tunnel to forward the packet. Two methods are available for a VTEP to identify the VXLAN to which a packet belongs.

VXLAN Identification by VLAN

The 1:1 or N:1 mapping between VLANs and BDs is configured on VTEPs based on network planning. After a VTEP receives a service packet, it correctly selects a VXLAN tunnel to forward the packet based on the mapping between VLANs and BDs and the mapping between BDs and VNIs.

In Figure 1, VLAN 10 and VLAN 20 belong to BD 10. The mapping between VLANs 10 and 20 and BD 10, as well as the mapping between BD 10 and VNI 1000 are configured on the VTEP. After the VTEP receives a packet from PC_1 or PC_2, the VTEP forwards the packet over the VXLAN tunnel for VNI 1000.

Figure 1 VXLAN identification by VLAN

VXLAN Identification by Encapsulation Mode

An encapsulation mode defines packet processing based on whether a packet contains VLAN tags. To implement VXLAN identification by encapsulation mode, Layer 2 sub-interfaces need to be configured on a downlink physical interface of a VTEP, and different encapsulation modes need to be configured for these sub-interfaces. The 1:1 mapping between Layer 2 sub-interfaces and BDs should also be defined. Then service packets are sent to specific Layer 2 sub-interfaces after reaching the VTEP. The VTEP selects a correct VXLAN tunnel to forward packets based on the mapping between Layer 2 sub-interfaces and BDs and the mapping between BDs and VNIs.

Table 1 lists four default packet processing methods of Layer 2 sub-interfaces that use different encapsulation modes.

Table 1 Packet processing in different encapsulation modes by default

Encapsulation Mode

Allowed Packet Type

Packet Encapsulation

Packet Decapsulation

dot1q

With specified VLAN tag

Removes the VLAN tag from original packets.

Adds a VLAN tag to packets based on the VLAN ID for Dot1q termination on the sub-interface after VXLAN decapsulation and then forwards them.

untag

Without VLAN tags

Does not perform any operation on the original packets.

Does not perform any operation, including adding, replacing, or removing the VLAN tag, on packets after VXLAN decapsulation is implemented.

default

All packets regardless of whether they contain VLAN tags

Does not perform any operation on the original packets.

Does not perform any operation, including adding, replacing, or removing the VLAN tag, on packets after VXLAN decapsulation is implemented.

qinq

With specified double VLAN tags

Removes all the VLAN tags from original packets.

After implementing VXLAN decapsulation:
  • S6730-S, S6730S-S, S5732-H, S5731-S, S5731S-S, S5731S-H, S6730-H, S6730S-H, S5731-H, S5730-HI, S6720-HI, and S5720-HI: Add double VLAN tags to packets based on the outer and inner VLAN IDs for QinQ termination on the sub-interface configured using the qinq termination pe-vid ce-vid command before forwarding them.
  • Other models: If received packets do not carry any VLAN tag, add double VLAN tags to packets based on the outer and inner VLAN IDs for QinQ termination on the sub-interface configured using the qinq termination pe-vid ce-vid command before forwarding them. If received packets carry VLAN tags, remove the outer VLAN tag and add double VLAN tags to packets based on the outer and inner VLAN IDs for QinQ termination on the sub-interface configured using the qinq termination pe-vid ce-vid command before forwarding them.
In Figure 2, the physical interface GE0/0/1.1 on the VTEP has two Layer 2 sub-interfaces, which are configured with different encapsulation modes and associated with different BDs. PC_1 and PC_2 belong to VLAN 10 and VLAN 30, respectively. An uplink interface on the Layer 2 switch connecting to the VTEP is configured as a trunk interface with the PVID 30 and is configured to allow packets from VLANs 10 and 30 to pass through. When a packet from PC_1 reaches this interface, the interface transparently transmits the packet to the VTEP because the VLAN ID of the packet is different from the default VLAN ID of the interface. When a packet from PC_2 reaches this interface, the interface removes the VLAN tag 30 from the packet before forwarding it to the VTEP because the VLAN ID of the packet is the same as the default VLAN ID of the interface. As a result, when the packets reach GE0/0/1.1 on the VTEP, the packet from PC_1 contains VLAN tag 10, while the packet from PC_2 does not contain a VLAN tag. To distinguish the two types of packets, Layer 2 sub-interfaces of the dot1q and untag types need to be configured on GE0/0/1.1:
  • The encapsulation mode of the Layer 2 sub-interface GE0/0/1.1 is dot1q, allowing packets with VLAN tag 10 to enter the VXLAN tunnel.

  • The encapsulation mode of the Layer 2 sub-interface GE0/0/1.1 is untag, allowing packets without a VLAN tag to enter the VXLAN tunnel.

After packets from PC_1 or PC_2 reach the VTEP, the VTEP sends the packets to different Layer 2 sub-interfaces based VLAN tags in the packets. Then, the VTEP chooses a correct VXLAN tunnel to forward the packets based on the mapping between sub-interface and BD, as well as the mapping between BD and VNI.

Figure 2 VXLAN identification by encapsulation mode

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >