AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R010 CLI-based Configuration Guide - Ethernet Switching
This document describes how to configure the components for LAN services, including link aggregation groups, VLANs, voice VLANs, MAC address tables, transparent bridging, as well as GVRP, STP/RSTP, and MSTP protocols.
Configuring Selective QinQ
Context
You can configure either of the following selective QinQ modes:
- VLAN ID-based selective QinQ
When private networks connect to a carrier network through CEs and PEs, run the vlan stacking command on CE interfaces connected to PEs so that the CE interfaces add the outer VLAN tag allocated by the carrier to user packets. This implementation saves VLAN IDs and allows user packets to be transparently transmitted on the carrier network.
- 802.1p priority-based selective QinQ
An 802.1p priority indicates a packet priority. Generally, different services of a user use different priorities. A carrier can establish different data transmission networks for different services based on 802.1p priorities so that services on the carrier network can be differentiated.
Procedure
- Configure VLAN ID-based
VLAN stacking.
Configure VLAN ID-based VLAN stacking on a Layer 3 sub-interface.
Run system-view
The system view is displayed.
Run bridge bridge-id
A bridge group is created and the bridge group view is displayed.
Run quit
Exit from the bridge group view.
Run interface { ethernet | gigabitethernet } interface-number.subinterface-number
The Ethernet sub-interface view is displayed.
Sub-interfaces can only be created on Layer 3 Ethernet interfaces. If an interface works in Layer 2 mode and supports switching between Layer 2 and Layer 3 modes, run the undo portswitch command to switch the interface in Layer 3 mode before creating a sub-interface on the interface.
Run bridge bridge-id
The Ethernet sub-interface is added to the bridge group.
Run bridge vlan-transmit enable
The Ethernet sub-interface is enabled to transparently transmit VLAN IDs.
Run vlan stacking { default | vid low-ce-vid [ to high-ce-vid ] } pe-vid pe-vid [ remark-8021p 8021p-value2 ]
VLAN ID-based VLAN stacking is configured.
The VLANs allowed by all sub-interfaces of the same main interface cannot overlap.
The vlan stacking default command can be executed on only one sub-interface of each main interface. Packets are forwarded through the default sub-interface when the packets do not match VLAN stacking entries on other sub-interfaces.
Configure VLAN ID-based VLAN stacking on a Layer 2 VE interface.
Run system-view
The system view is displayed.
Run interface virtual-ethernet ve-number
A VE interface is created and the VE interface view is displayed.
Run portswitch
The VE interface is switched from Layer 3 to Layer 2.
Run port link-type hybrid
The link type of the interface is set to hybrid.
By default, the link type of an interface is hybrid.
Run vlan stacking vid low-ce-vid [ to high-ce-vid ] pe-vid pe-vid-value[ remark-8021p 8021p-val ]
VLAN ID-based VLAN stacking is configured on the Layer 2 VE interface.
- VLAN stacking and VLAN mapping can take effect, but VLAN IDs of multiple CEs must be unique, VLAN IDs in the original and mapped tags must be different, and VLAN IDs of multiple PEs must be unique.
- Layer 2 Ethernet interfaces support only VLAN ID-based VLAN stacking, and do not support VLAN stacking based on 802.1p priorities or VLAN IDs and 802.1p priorities.
- When VLAN stacking is canceled on a Layer 2 Ethernet interface, the VLAN ID range allowed must be the same as the configured VLAN ID range.
- This command can be configured on an interface multiple times, and a maximum of 128 VLAN stacking entries can be configured on all interfaces.
- Configure 802.1p priority-based selective QinQ.