A virtual local area network (VLAN) tag termination sub-interface can be a dot1q VLAN tag termination sub-interface or a QinQ VLAN tag termination sub-interface. In dot1q/QinQ termination, a device identifies whether a packet has one tag or two tags. The device then forwards the packet after stripping one or both tags or discards the packet.
Layer 3 Ethernet interfaces on routers
Conventional Layer 3 Ethernet interfaces do not identify VLAN packets. After receiving VLAN packets, they consider the packets invalid and discard them. To implement inter-VLAN communication, create Ethernet sub-interfaces on an Ethernet interface and configure the sub-interfaces to remove tags from VLAN packets.
Communication between devices in the LAN and WAN
Most LAN packets carry VLAN tags. Certain wide area network (WAN) protocols, such as Point-to-Point Protocol (PPP), cannot identify VLAN packets. Before forwarding VLAN packets from a LAN to a WAN, a device needs to record the VLAN information carried in the VLAN packets and then remove the VLAN tags.
When a device receives packets, it adds the locally stored VLAN information to the packets and forwards them to VLAN users.
Run system-view
The system view is displayed.
Run interface interface-type interface-number.subinterface-number
The view of an Ethernet sub-interface on the user side of a PE is displayed
(Optional) Create a user VLAN group.
Run vlan-group group-id
A user VLAN group is created.
Run group mode { single | multiple }
The working mode of the VLAN group is configured.
Run quit
Return to the view of the Ethernet sub-interface on the user side of the PE.
Configuring a VLAN group allows you to achieve the following purposes:
Run control-vid vid dot1q-termination [ rt-protocol ] or encapsulation dot1q-termination [ rt-protocol ]
The encapsulation type for a VLAN tag termination sub-interface is configured to be dot1q.
Specify rt-protocol so that the dot1q VLAN tag termination sub-interface supports routing protocols.
To configure a dot1q VLAN tag termination sub-interface and a matching policy for the sub-interface, run the dot1q termination vid low-pe-vid [ to high-pe-vid ] { 8021p { 8021p-value1 [ to val8021p2 ] } &<1-8> | dscp { valdscp1 [ to valdscp2 ] } &<1-10> | eth-type pppoe | default } [ vlan-group group-id ] command.
If you do not configure a matching policy, the dot1q VLAN tag termination sub-interface terminates the VLAN tags of packets carrying the specified VLAN ID. If you configure a matching policy, the sub-dot1q VLAN tag termination sub-interface terminates the VLAN tags of packets carrying the specified VLAN ID+802.1p value/DSCP value/EthType.
After the dot1q termination vid low-pe-vid [ to high-pe-vid ] [ vlan-group group-id ] command is run in the Ethernet sub-interface view, the specified VLAN range belongs to the sub-interface, and any VLAN ID in the VLAN range cannot be configured together with the 802.1p value/DSCP value/EthType on other sub-interfaces.
Run commit
The configuration is committed.
The recent version of the NetEngine 8000 F only supports a VLAN group works in single mode on the QinQ VLAN tag termination sub-interface.
Run system-view
The system view is displayed.
Run interface interface-type interface-number.subinterface-number
The view of an Ethernet sub-interface on the user side of a PE is displayed
(Optional) Create a user VLAN group.
Run vlan-group group-id
A user VLAN group is created.
Run group mode { single | multiple }
The working mode of the VLAN group is configured.
Run quit
Return to the view of the Ethernet sub-interface on the user side of the PE.
Configuring a VLAN group allows you to achieve the following purposes:
Run control-vid vid qinq-termination [ local-switch | rt-protocol ] or encapsulation qinq-termination [ local-switch | rt-protocol ]
The encapsulation type for a VLAN tag termination sub-interface is configured to be QinQ.
Run encapsulation qinq-termination [ local-switch | rt-protocol ]
The encapsulation type for a VLAN tag termination sub-interface is configured to be QinQ.
Run qinq termination pe-vid pe-vid [ to high-pe-vid ] ce-vid ce-vid [ to high-ce-vid ] [ vlan-group group-id ]
The VLAN tag termination function is configured for the QinQ VLAN tag termination sub-interface.
After you specify rt-protocol, the sub-interface terminates double-tagged packets, and both inner and outer tags must be specific VLAN IDs.
Run commit
The configuration is committed.