Adding and Removing VLAN Tags
Ethernet data frames are tagged or untagged based on the interface type and default VLAN. The following describes how access, trunk, and hybrid interfaces process data frames.
A QinQ interface adds an additional tag to a tagged frame. For details, see QinQ Configuration.
Access Interface
Figure 1 and Figure 2 show how an access interface adds and removes VLAN tags.
Figure 1 Adding VLAN tags on an access interface

Figure 2 Removing VLAN tags on an access interface

Trunk Interface
Figure 3 and Figure 4 show how a trunk interface adds and removes VLAN tags.
Figure 3 Adding VLAN tags on a trunk interface

Figure 4 Removing VLAN tags on a trunk interface

Hybrid Interface
Figure 5 and Figure 6 show how a hybrid interface adds and removes VLAN tags.
Figure 5 Adding VLAN tags on a hybrid interface

Figure 6 Removing VLAN tags on a hybrid interface

Frame Processing Comparison
Table 1 Frame processing comparison
Interface Type
|
Untagged Frame Processing
|
Tagged Frame Processing
|
Frame Transmission
|
Access
|
Receives an untagged frame and adds a tag with the default VLAN ID to the frame.
|
- Accepts the tagged frame if the frame's VLAN ID matches the default VLAN ID.
- Discards the tagged frame if the frame's VLAN ID differs from the default VLAN ID.
|
After the PVID tag is removed, the frame is transmitted.
|
Trunk
|
|
- Accepts a tagged frame if the VLAN ID carried in the frame is permitted by the interface.
- Discards a tagged frame if the VLAN ID carried in the frame is denied by the interface.
|
- If the frame's VLAN ID matches the default VLAN ID and the VLAN ID is permitted by the interface, the device removes the tag and transmits the frame.
- If the frame's VLAN ID differs from the default VLAN ID, but the VLAN ID is still permitted by the interface, the device will directly transmit the frame.
|
Hybrid
|
|
- Accepts a tagged frame if the VLAN ID carried in the frame is permitted by the interface.
- Discards a tagged frame if the VLAN ID carried in the frame is denied by the interface.
|
If the frame's VLAN ID is permitted by the interface, the frame is transmitted. The interface can be configured whether to transmit frames with tags.
|
Based on the preceding table, an access interface can send only untagged frames; a trunk interface can send untagged frames of only one VLAN and send tagged frames of other VLANs; a hybrid interface sends tagged or untagged frames, depending on the VLAN configuration.