Configure QinQ


QinQ (802.1Q-in-802.1Q) expands VLAN space by adding an additional 802.1Q tag to 802.1Q tag packets. It allows services in a private network to be transparently transmitted over a public network. A packet transmitted on the backbone network carries two 802.1Q tags: a public VLAN tag and a private VLAN tag.
QinQ implementation falls into two types: basic QinQ and flexible QinQ. Basic QinQ is implemented based on an interface. After this feature is configured on an interface, the interface will attach a default local tag to packets it receives, regardless of whether the packets carry a VLAN tag. For details about the configuration procedure, choose Configuration > CLI-based Configuration > Ethernet Switching Configuration Guide > QinQ Configuration > Configuration Examples > Example for Confituring Basic QinQ through the URL: Product Documentation. Flexible QinQ is implemented based on a combination of interfaces and VLANs. After receiving packets, an interface may forward packets based on one tag or two taggs. For details about the configuration procedure, choose Configuration > CLI-based Configuration > Ethernet Switching Configuration Guide > QinQ Configuration > Configuration Examples > Example for Confituring Selective QinQ through the URL: Product Documentation.

Other related questions:
What are QinQ and selective QinQ
Switch QinQ is also called port QinQ or Dot1q-tunnel. The port adds the default VLAN tag to packets no matter whether the packets carry VLAN tags. Selective QinQ indicates VLAN stacking. Different from port QinQ, selective QinQ encapsulates outer VLAN tags according to different VLANs.

How can I configure selective QinQ on CE switches
Selective QinQ is also called VLAN stacking. It adds different outer tags to the frames received on a Layer 2 QinQ interface according to different inner tags or the frames matching traffic classification rules. This function enables refined management of users and services. # Configure selective QinQ on 10GE1/0/1 and add VLAN 100 in the outer tag to the tagged frames with the VLAN range of 10 to 13. 
[~HUAWEI] vlan batch 10 to 13 100
[*HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] port link-type hybrid
[*HUAWEI-10GE1/0/1] port hybrid untagged vlan 100 [*HUAWEI-10GE1/0/1] port vlan-stacking vlan 10 to 13 stack-vlan 100
[*HUAWEI-10GE1/0/1] commit
Description: - Selective QinQ can be enabled only on hybrid and trunk interfaces and applied to incoming packets. - The outer VLAN ID must exist and the interface must be added to the stack VLAN in untagged mode. - If the port vlan-stacking command with VLAN ranges specified has been executed for three or more times and VLAN ranges are combined twice at least, the configuration of each command must be committed. Otherwise, packets may be lost. For example, when port vlan-stacking vlan 30 to 60 stack-vlan 100, port vlan-stacking vlan 20 to 30 stack-vlan 100, and port vlan-stacking vlan 60 to 70 stack-vlan 100 commands are executed, VLAN ranges 20 to 60 and 20 to 70 are combined twice. Therefore, commit each command configuration.

The QinQ technology allows services from the user side to be carried by the QinQ link on the network side. Multiple VLANs of the user network are encapsulated in QinQ mode into one VLAN in the transport network. In this manner, the VLAN resources in the transport network are saved. The QinQ technology is a VLAN stacking and nesting technology. Using the QinQ technology, data packets carry two layers of VLAN tags for the identification purpose. It removes the limit of the original solution in which only one layer of VLAN tag is used, extending the VLAN IDs.

QinQ protocol
QinQ is a visual name of the tunnel protocol based on 802.1Q encapsulation. The QinQ protocol aims at encapsulating the VLAN tags of user private networks into VLAN tags of a public network. Packets carrying two tags traverse the backbone networks of service providers, therefore providing simple Layer 2 VPN tunnels for users. The QinQ protocol is simple and easy to manage. It does not require signaling support and can be implemented only through static configurations. It is especially applicable to small-scale enterprise networks that use Layer 3 switches at the backbone or small-scale metro networks. The QinQ protocol provides each user with a unique public VLAN ID and encapsulates the private network VLAN tag of the user into the public VLAN ID. The user private network VLAN tag is shielded on the public network during transmission, therefore greatly saving VLAN ID resources for service providers.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top