October 30, 2024

Configure Selective QinQ in Huawei Switch

How to Configure Selective QinQ in Huawei Switch:

Networking Requirements:
As shown in Figure, common Internet access users (using PCs) and IPTV users (using IPTV terminals) connect to the carrier network through Switch A and Switch B and communicate with each other through the carrier network. [boxads]

It is required that packets of PCs and IPTV terminals are tagged VLAN 2 and VLAN 3 when the packets are transmitted through the carrier network.

selective QinQ
selective QinQ

Configuration Roadmap:

The configuration roadmap is as follows:

1. Create VLANs on Switch A and Switch B.
2. Configure types of interfaces on Switch A and Switch B, and add the interfaces to corresponding VLANs.
3. Configure selective QinQ on interfaces of Switch A and Switch B.
[adsense]

Data Preparation:

To complete the configuration, you need the following data:

1. VLANs that PCs belong to: VLAN 100 to VLAN 200
2. VLANs that IPTV terminals belong to: VLAN 300 to VLAN 400
3. VLAN tag that packets of PCs carry on the carrier network: VLAN 2
4. VLAN tag that packets of IPTV terminals carry on the carrier network: VLAN 3

Configuration Procedure:

Step-1: Create VLANs.

# On Switch A, create VLAN 2 and VLAN 3, that is, the outer VLAN IDs added to packets on the carrier network.

<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 2 3

# On Switch B, create VLAN 2 and VLAN 3, that is, the outer VLAN IDs added to packets on the carrier network.

<Quidway> system-view
[Quidway] sysname SwitchB
[SwitchB] vlan batch 2 3

Step-2: Configure selective QinQ on interfaces of Switch A and Switch B.

# Configure GE 1/0/1 of Switch A.

[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type hybrid
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 2 3
[SwitchA-GigabitEthernet1/0/1] port vlan-stacking vlan 100 to 200 stack-vlan 2
[SwitchA-GigabitEthernet1/0/1] port vlan-stacking vlan 300 to 400 stack-vlan 3
[SwitchA-GigabitEthernet1/0/1] quit

[bodyads]

# Configure GE 1/0/1 of Switch B.

[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] port link-type hybrid
[SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 2 3
[SwitchB-GigabitEthernet1/0/1] port vlan-stacking vlan 100 to 200 stack-vlan 2
[SwitchB-GigabitEthernet1/0/1] port vlan-stacking vlan 300 to 400 stack-vlan 3
[SwitchB-GigabitEthernet1/0/1] quit

Step-3: Configure other interfaces.

# Add GE 1/0/2 of Switch A to VLAN 2 and VLAN 3.

[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 2 3
[SwitchA-GigabitEthernet1/0/2] quit

# Add GE 1/0/2 of Switch B to VLAN 2 and VLAN 3.

[SwitchB] interface gigabitethernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] port link-type trunk
[SwitchB-GigabitEthernet1/0/2] port trunk allow-pass vlan 2 3
[SwitchB-GigabitEthernet1/0/2] quit

Step-4: Verify the configuration.

# View the configuration of each interface on Switch A.

<SwitchA> display current-configuration interface gigabitethernet 1/0/1
#
interface GigabitEthernet1/0/1
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 to 200 stack-vlan 2
port vlan-stacking vlan 300 to 400 stack-vlan 3
#
return

<SwitchA> display current-configuration interface gigabitethernet 1/0/2
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return

#View the configuration of each interface on Switch B.

<SwitchB> display current-configuration interface gigabitethernet 1/0/1
#
interface GigabitEthernet1/0/1
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 to 200 stack-vlan 2
port vlan-stacking vlan 300 to 400 stack-vlan 3
#
return

<SwitchB> display current-configuration interface gigabitethernet 1/0/2
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return

If Switch A and Switch B are configured correctly:

* PCs can communicate with each other through the carrier network.
* IPTV terminals can communicate with each other through the carrier network.

Configuration Files:

Only the configuration files of the Switches are provided:

#Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 2 to 3
#
interface GigabitEthernet1/0/1
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 to 200 stack-vlan 2
port vlan-stacking vlan 300 to 400 stack-vlan 3
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return

# Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 2 to 3
#
interface GigabitEthernet1/0/1
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 to 200 stack-vlan 2
port vlan-stacking vlan 300 to 400 stack-vlan 3
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return

Shahed

Hi! I am Shahed Israr. I try to help GPON Technology users with their queries and provide them with relevant and accurate information to the best of my ability. My main goal is to assist and enhance GPON Technology user and help people find the answers they're looking for quickly and easily.

Follow Me:
TwitterFacebookLinkedInPinterestGoogle PlusDiggYouTubeRedditDelicious

Visited 347 times, 1 visit(s) today

Comments

comments

Shahed

Hi! I am Shahed Israr. I try to help GPON Technology users with their queries and provide them with relevant and accurate information to the best of my ability. My main goal is to assist and enhance GPON Technology user and help people find the answers they're looking for quickly and easily.

View all posts by Shahed →

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

error: Content is protected !!