Basic QinQ enables the device to add a public tag to incoming packets so that user packets can be forwarded on the public network.
Background
To separate private networks from public networks and conserve VLAN resources, configure double 802.1Q tags on QinQ interfaces of the device. Inner VLAN tags are used on internal networks and outer VLAN tags are used on external networks. QinQ expands VLAN space to 4094x4094 VLANs and allows packets on different private networks with the same VLAN IDs to be transparently transmitted.
Procedure
Run:
system-view
The system view is displayed.
Run:
vlanvlan-id
A VLAN used on the public network is created.
Run:
quit
Exit from the VLAN view.
Run:
interfaceinterface-typeinterface-number
The interface view is displayed.
The interface can be a physical interface or an Eth-Trunk interface.
Run:
port link-typedot1q-tunnel
The link type of the interface is set to Dot1q-tunnel.
By default, the link type of an interface is access. Dot1q-tunnel interfaces do not support Layer 2 multicast.
The device cannot use a Dot1q-tunnel interface to connect to a TRILL network.
Run:
port default vlanvlan-id
The VLAN ID of the public VLAN tag, that is, the default VLAN of the interface, is configured.
By default, VLAN 1 is the default VLAN of all interfaces.
Run:
commit
The configuration is committed.
Checking the Configuration
Run the display current-configurationinterfaceinterface-typeinterface-number command to check the QinQ configuration on the interface.
5.5.2 Configuring Selective QinQ
Context
Selective QinQ enables the device to add different outer VLAN tags to received data frames according to VLAN IDs in the frames.
NOTE:
Selective QinQ can be only enabled on hybrid or trunk interfaces in the inbound direction.
The outer VLAN ID must exist and the interface must be added to the outer VLAN in untagged mode.
The interface learns the MAC address in the VLAN specified by the outer VLAN tag of packets.
The MUX VLAN and selective QinQ cannot be configured on the same interface.
Procedure
Run:
system-view
The system view is displayed.
Run:
interfaceinterface-typeinterface-number
The interface view is displayed.
Run:
port link-typehybrid
The link type of the interface is configured as hybrid.
By default, the link type of an interface is access.
Run:
port hybrid untagged vlanvlan-id
The interface is added to the VLAN in untagged mode.
The VLAN ID specified by vlan-id must already exist on the device. The original VLAN can be not created.
Run:
port vlan-stackingvlanvlan-id1 [ tovlan-id2 ] stack-vlanvlan-id3
Selective QinQ is configured.
NOTICE:
If the port vlan-stacking command has been executed at least three times with specified VLAN ranges 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 used, VLAN ranges 20 to 60 and 20 to 70 are combined twice. Therefore, commit the configuration of each command.
Run:
commit
The configuration is committed.
Checking the Configuration
Run the display current-configurationinterfaceinterface-typeinterface-number command to check the configuration of selective QinQ on the interface.
Basic QinQ enables the device to add a public tag to incoming packets so that user packets can be forwarded on the public network.
Background
To separate private networks from public networks and conserve VLAN resources, configure double 802.1Q tags on QinQ interfaces of the device. Inner VLAN tags are used on internal networks and outer VLAN tags are used on external networks. QinQ expands VLAN space to 4094x4094 VLANs and allows packets on different private networks with the same VLAN IDs to be transparently transmitted.
Procedure
Run:
system-view
The system view is displayed.
Run:
vlanvlan-id
A VLAN used on the public network is created.
Run:
quit
Exit from the VLAN view.
Run:
interfaceinterface-typeinterface-number
The interface view is displayed.
The interface can be a physical interface or an Eth-Trunk interface.
Run:
port link-typedot1q-tunnel
The link type of the interface is set to Dot1q-tunnel.
By default, the link type of an interface is access. Dot1q-tunnel interfaces do not support Layer 2 multicast.
The device cannot use a Dot1q-tunnel interface to connect to a TRILL network.
Run:
port default vlanvlan-id
The VLAN ID of the public VLAN tag, that is, the default VLAN of the interface, is configured.
By default, VLAN 1 is the default VLAN of all interfaces.
Run:
commit
The configuration is committed.
Checking the Configuration
Run the display current-configurationinterfaceinterface-typeinterface-number command to check the QinQ configuration on the interface.
5.5.2 Configuring Selective QinQ
Context
Selective QinQ enables the device to add different outer VLAN tags to received data frames according to VLAN IDs in the frames.
NOTE:
Selective QinQ can be only enabled on hybrid or trunk interfaces in the inbound direction.
The outer VLAN ID must exist and the interface must be added to the outer VLAN in untagged mode.
The interface learns the MAC address in the VLAN specified by the outer VLAN tag of packets.
The MUX VLAN and selective QinQ cannot be configured on the same interface.
Procedure
Run:
system-view
The system view is displayed.
Run:
interfaceinterface-typeinterface-number
The interface view is displayed.
Run:
port link-typehybrid
The link type of the interface is configured as hybrid.
By default, the link type of an interface is access.
Run:
port hybrid untagged vlanvlan-id
The interface is added to the VLAN in untagged mode.
The VLAN ID specified by vlan-id must already exist on the device. The original VLAN can be not created.
Run:
port vlan-stackingvlanvlan-id1 [ tovlan-id2 ] stack-vlanvlan-id3
Selective QinQ is configured.
NOTICE:
If the port vlan-stacking command has been executed at least three times with specified VLAN ranges 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 used, VLAN ranges 20 to 60 and 20 to 70 are combined twice. Therefore, commit the configuration of each command.
Run:
commit
The configuration is committed.
Checking the Configuration
Run the display current-configurationinterfaceinterface-typeinterface-number command to check the configuration of selective QinQ on the interface.
Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
Politically sensitive content
Content concerning pornography, gambling, and drug abuse
Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."