Layer 2 sub-interfaces are used for service access on VXLANs. These Layer 2 sub-interfaces can have different encapsulation types configured to transmit various types of data packets. A bridge domain (BD) is a broadcast domain. After a Layer 2 sub-interface is associated with a BD, the sub-interface can transmit data packets through this BD.
Traffic Encapsulation Type |
Description |
---|---|
dot1q |
This type of sub-interface accepts only packets with a specified tag. The dot1q traffic encapsulation type has the following restrictions:
|
untag |
This type of sub-interface accepts only untagged packets. The untag traffic encapsulation type has the following restrictions:
|
default |
This type of sub-interface accepts all packets, irrespective of whether the packets carry VLAN tags. The default traffic encapsulation type has the following restrictions:
|
qinq |
Packets received by this type of sub-interface carry two or more VLAN tags. The sub-interface determines whether to accept the packets based on the innermost two VLAN tags. |
Configure a service access point on a Layer 2 gateway:
The system view is displayed.
A BD is created, and the BD view is displayed.
A description is configured for the BD.
Return to the system view.
A Layer 2 sub-interface is created, and the sub-interface view is displayed.
Before running this command, ensure that the Layer 2 main interface does not have the port link-type dot1q-tunnel command configuration. If the configuration has existed, run the undo port link-type command to delete it.
A traffic encapsulation type is specified for the Layer 2 sub-interface.
The sub-interface is enabled to remove single or double VLAN tags from received packets.
If the received packets each carry a single VLAN tag, specify single.
If the traffic encapsulation type is specified as qinq in the preceding step using the encapsulation qinq vid pe-vid ce-vid { low-ce-vid [ to high-ce-vid ] | default } command, specify double.
The Layer 2 sub-interface is added to the BD so that the sub-interface can transmit data packets through this BD.
The configuration is committed.