Introduction to VLAN Termination
Definition
VLAN termination is a VLAN tag processing mechanism. After VLAN termination is enabled on a device, the device identifies VLAN tags in received packets, removes single or double tags from the packets, and then forwards packets at Layer 3 or takes other actions. These VLAN tags are only useful before termination, and are not used in Layer 3 forwarding or other processing.
- Removes VLAN tags from the packets received on interfaces, and then forwards the packets at Layer 3 or takes other actions.
- Adds VLAN tags to the packets that will be sent out through interfaces.
Classification
Depending on the modes in which VLAN tagged packets are processed, VLAN termination has the following sub-functions:
- Dot1q termination: removes the outer VLAN tag from the received single-tagged or double-tagged packets, and adds a VLAN tag to the packets to be sent by an interface.
- QinQ termination: removes double VLAN tags from the received double-tagged packets, and adds double VLAN tags to the packets to be sent by an interface.
Generally, VLAN termination is configured on sub-interfaces. A sub-interface that terminates single tags in packets is called a Dot1q termination sub-interface, and a sub-interface that terminates double tags in packets is called a QinQ termination sub-interface.
Purpose
After VLANs are assigned on a network, hosts in the same VLAN can communicate with each other at Layer 2, whereas hosts in different VLANs cannot. You can use VLANIF interfaces on a Layer 3 switch to implement inter-VLAN Layer 3 connectivity. As shown in Figure 8-1, when a Layer 3 switch uses only one Layer 3 Ethernet interface to connect to users or a network, this interface needs to transmit packets from multiple VLANs. A VLANIF interface cannot provide this function. You can virtualize a Layer 3 Ethernet interface into multiple logical sub-interfaces. The Layer 3 Ethernet interface is the main interface for the logical sub-interfaces.
By default, a Layer 3 Ethernet sub-interface treats received VLAN packets as invalid packets and discards them; therefore, VLAN termination needs to be configured on the Layer 3 Ethernet sub-interface so that the sub-interface can remove VLAN tags from packets.