Sei sulla pagina 1di 8

How to Configure QinQ?

The QinQ technology is called VLAN dot1q tunnel, 802.1Q tunnel, VLAN Stacking
technology. The standard comes from IEEE 802.1ad and it is the expansion of the
802.1Q protocol. QinQ adds one layer of 802.1Q tag (VLAN tag) based on the
original 802.1Q packet head. With the double layers of tags, the VLAN quantity is
increased to 802.1Q.
How to configure the QinQ? Here we will list two occasions and they can be applied
to Huawei switches higher level than Quidway S2700 and with EI version, Huawei
S3700 switches and Quidway S5700, etc.

Example for Configuring basic QinQ


Networking Requirements
As shown in Figure 1, there are two enterprises on the network, Enterprise 1 and
Enterprise 2. Enterprise 1 has two office locations, and Enterprise 2 has 2 office
locations. The office locations of the two enterprises access SwitchA and SwitchB of
the ISP network. A non-Huawei device with the TPID value 0x9100 exists on the
public network. The requirements are as follows:
Enterprise 1 and Enterprise 2 plans their VLANs independently.
Traffic of the two branches is transparently transmitted on the public network.
Users using the same services in the two branches are allowed to communicate
and users using different services are isolated.
You can configure QinQ to meet the preceding requirements. VLAN 100 provided by
the public network can be used to implement communication of Enterprise 1 in the
two branches and VLAN 200 is used for Enterprise 2. You can set the TPID value in
the outer VLAN on the interface that connects the non-Huawei device to implement
communication between devices.
Figure 1Configuring basic QinQ

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure VLAN 100 and VLAN 200 on both SwitchA and SwitchB. Set the link
type of the interface to QinQ and add the interfaces to VLAN. In this way, different
outer VLAN tags are added to different services.
2. Add interfaces connecting to the public network on SwitchA and SwitchB to VLAN
100 and VLAN 200 to permit packets from these VLANs to pass through.
3. Set the TPID values in the outer VLAN tag on interfaces connecting to the public
network on SwitchA and SwitchB to implement communication between the device
with devices from other vendors.

Procedure
Step 1 Create VLANs.
# Create VLAN 100 and VLAN 200 on SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 100 200
# Create VLAN 100 and VLAN 200 on SwitchB.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 100 200
2

Step 2 Set the link type of the interface to QinQ.


# Configure GE0/0/1 and GE0/0/2 of SwitchA as QinQ interfaces. Set the VLAN of
GE0/0/1 to VLAN 100 and the VLAN of GE0/0/2 to VLAN 200.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type dot1q-tunnel
[SwitchA-GigabitEthernet0/0/1] port default vlan 100
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type dot1q-tunnel
[SwitchA-GigabitEthernet0/0/2] port default vlan 200
[SwitchA-GigabitEthernet0/0/2] quit
# Configure GE0/0/1 and GE0/0/2 of SwitchB as QinQ interfaces. Set the VLAN of
GE0/0/1 to
VLAN 100 and the VLAN of GE0/0/2 to VLAN 200. The configuration procedure of
SwitchB is the same as that of SwitchA.
Step 3 Configure the interface connecting to the public network on the switch.

# Add GE0/0/3 of SwitchA to VLAN 100 and VLAN 200.


[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] port link-type trunk
[SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 200
[SwitchA-GigabitEthernet0/0/3] quit
# Add GE0/0/3 of SwitchB to VLAN 100 and VLAN 200. The configuration
procedure of
SwitchB is the same as that of SwitchA.
Step 4 Configure the TPID value for an outer VLAN tag
# Set the TPID value of an outer VLAN tag to 0x9100 on SwitchA.
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] qinq protocol 9100
# Set the TPID value of an outer VLAN tag to 0x9100 on SwitchB.
[SwitchB] interface gigabitethernet 0/0/3
[SwitchB-GigabitEthernet0/0/3] qinq protocol 9100
Step 5 Verify the configuration.
In Enterprise 1, ping a PC of a VLAN in a branch from a PC of the same VLAN in
another branch. If the two PCs can ping each other, internal users of Enterprise 1 can
communicate.
In Enterprise 2, ping a PC of a VLAN in a branch from a PC of the same VLAN in
3

another branch. If the two PCs can ping each other, internal users of Enterprise 2 can
communicate.
Ping a PC in a VLAN of Enterprise 2 in a branch from a PC in the same VLAN of
Enterprise 1 in either branch. If the two PCs cannot ping each other, users in
Enterprise 1 and Enterprise 2 are isolated.
----End

Configuration Files
Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 100 200
#
interface GigabitEthernet0/0/1
port link-type dot1q-tunnel
port default vlan 100
#
interface GigabitEthernet0/0/2
port link-type dot1q-tunnel
port default vlan 200
#
interface GigabitEthernet0/0/3
qinq protocol 9100
port link-type trunk
port trunk allow-pass vlan 100 200
#
return
Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 100 200
#
interface GigabitEthernet0/0/1
port link-type dot1q-tunnel
port default vlan 100
#
interface GigabitEthernet0/0/2
port link-type dot1q-tunnel
port default vlan 200
#
interface GigabitEthernet0/0/3
4

qinq protocol 9100


port link-type trunk
port trunk allow-pass vlan 100 200
#
return

Example for Configuring Selective QinQ


Networking Requirements
As shown in Figure 2, Internet access users (using PCs) and VoIP users (using VoIP
terminals) connect to the ISP network through SwitchA and SwitchB and
communicate with each other through the ISP network.
It is required that packets of PCs and VoIP terminals be tagged VLAN 2 and VLAN 3
when the packets are transmitted through the ISP network.
Figure 2 Networking diagram for configuring selective QinQ

Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on SwitchA and SwitchB.
2. Configure link types of interfaces on SwitchA and SwitchB and add interfaces to
VLANs.
3. Configure selective QinQ on the interfaces of SwitchA and SwitchB.
Procedure
Step 1 Create VLANs.
# On SwitchA, create VLAN 2 and VLAN 3, that is, VLAN IDs of the outer VLAN
tag to be added.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 2 3
5

# On SwitchB, create VLAN 2 and VLAN 3, that is, VLAN IDs of the outer VLAN
tag to be added.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 2 3
Step 2 Configure selective QinQ on interfaces.
# Configure GE0/0/1 on SwitchA.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type hybrid
[SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 2 3
[SwitchA-GigabitEthernet0/0/1] qinq vlan-translation enable
[SwitchA-GigabitEthernet0/0/1] port vlan-stacking vlan 100 stack-vlan 2
[SwitchA-GigabitEthernet0/0/1] port vlan-stacking vlan 300 stack-vlan 3
[SwitchA-GigabitEthernet0/0/1] quit
# Configure GE0/0/1 on SwitchB.
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type hybrid
[SwitchB-GigabitEthernet0/0/1] port hybrid untagged vlan 2 3
[SwitchB-GigabitEthernet0/0/1] qinq vlan-translation enable
[SwitchB-GigabitEthernet0/0/1] port vlan-stacking vlan 100 stack-vlan 2
[SwitchB-GigabitEthernet0/0/1] port vlan-stacking vlan 300 stack-vlan 3
[SwitchB-GigabitEthernet0/0/1] quit
Step 3 Configure other interfaces.
# Add GE0/0/2 to VLAN 2 and VLAN 3 on SwitchA.
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 3
[SwitchA-GigabitEthernet0/0/2] quit
# Add GE0/0/2 to VLAN 2 and VLAN 3 on SwitchB.
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 3
[SwitchB-GigabitEthernet0/0/2] quit
Step 4 Verify the configuration.
If the configurations on SwitchA and SwitchB are correct:
PCs can communicate with each other through the ISP network.
VoIP terminals can communicate with each other through the ISP network.
----End
6

Configuration Files
Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
qinq vlan-translation enable
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 stack-vlan 2
port vlan-stacking vlan 300 stack-vlan 3
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
qinq vlan-translation enable
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 stack-vlan 2
port vlan-stacking vlan 300 stack-vlan 3
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
The more information about technical support you can consult with our engineer the
e-mail address is as below:
support@huanetwork.com
More related topics
7

How to Configure the QinQ VLAN?


The Difference between Layer2/Layer3 Switches
How to Replace a Power Module or Fan Module for Huawei Switches?
How to Configure the QinQ VLAN Private Line Service for Huawei MA5616?
More Huawei products and Reviews you can visit: http://www.huanetwork.com/blog

Huanetwork.com is a world leading Huawei networking products supplier, we supply original new
Huawei networking equipments, including Huawei switches, Huawei routers, Huaweisymantec
security products, Huawei IAD, Huawei SFP and other Huawei networking products. Our
customers include telecom operators, Huawei resellers, ISP and system integrators. Right now
most of our sales are contributed by regular customers.
In Huanetwork Lab, also we have Huawei OLT, MDU, DSLAM and switch for customer do
remote testing, any potential customer are welcome to login to our lab. If you need a total Huawei
FTTx solution or Huawei ADSL solution for your network, also you may feel free to contact us.
Our website: http://www.huanetwork.com
Telephone: +852-30501940
Email: sales@huanetwork.com
Address: 23/F Lucky Plaza, 315-321 Lockhart Road, Wanchai, Hongkong

Potrebbero piacerti anche