0% found this document useful (0 votes)
9 views

01-11 VLAN Mapping Configuration

This document is a configuration guide for VLAN mapping on S1720, S2700, S5700, and S6720 Series Ethernet switches, detailing how to isolate private network VLANs from service VLANs. It explains the purpose, working mechanisms, and application scenarios of VLAN mapping, including various mapping modes such as 1:1, 2:1, and 2:2. Additionally, it outlines licensing requirements and limitations for VLAN mapping configuration on specific switch models.

Uploaded by

Bacof16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

01-11 VLAN Mapping Configuration

This document is a configuration guide for VLAN mapping on S1720, S2700, S5700, and S6720 Series Ethernet switches, detailing how to isolate private network VLANs from service VLANs. It explains the purpose, working mechanisms, and application scenarios of VLAN mapping, including various mapping modes such as 1:1, 2:1, and 2:2. Additionally, it outlines licensing requirements and limitations for VLAN mapping configuration on specific switch models.

Uploaded by

Bacof16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

S1720, S2700, S5700, and S6720 Series Ethernet

Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

11 VLAN Mapping Configuration

About This Chapter

This chapter describes how to configure VLAN mapping. VLAN mapping is


configured on the edge device of the public network so that the VLANs of private
networks are isolated from S-VLANs. This saves S-VLAN resources.

11.1 Overview of VLAN Mapping


11.2 Understanding VLAN Mapping
11.3 Application Scenarios for VLAN Mapping
11.4 Licensing Requirements and Limitations for VLAN Mapping
11.5 Configuring VLAN ID-based VLAN Mapping
11.6 Configuring MQC-based VLAN Mapping
11.7 Displaying VLAN Translation Resource Usage
11.8 Configuration Examples for VLAN Mapping
11.9 Troubleshooting VLAN Mapping

11.1 Overview of VLAN Mapping

Definition
VLAN mapping technology changes VLAN tags in packets to map different VLANs.

Purpose
Two Layer 2 user networks in the same VLAN can be connected through a
backbone network. To ensure Layer 2 connectivity between users, and to
uniformly deploy Layer 2 protocols, the two user networks need to interwork
seamlessly. However, the backbone network cannot directly transmit VLAN packets

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 572


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

from the user networks, because the VLAN plans on the backbone and user
networks are different.

To solve this problem, configure VLAN mapping. When VLAN packets from a user
network enter the backbone network, an edge device on the backbone network
changes the customer VLAN (C-VLAN) ID to the service VLAN (S-VLAN ID). After
the packets are transmitted, the edge device reverts the VLAN ID change. This
ensures seamless interworking between the two user networks. The other method
is to configure a Layer 2 tunneling technology such as QinQ or VPLS to
encapsulate VLAN packets into packets on the backbone network so that VLAN
packets are transparently transmitted. However, this method increases extra cost
because packets are encapsulated. In addition, Layer 2 tunneling technology may
not support transparent transmission of packets of some protocol packets. The
other method is to configure VLAN mapping. When VLAN packets from a user
network enter the backbone network, an edge device on the backbone network
changes the C-VLAN ID to the S-VLAN ID. After the packets are transmitted to the
other side, the edge device changes the S-VLAN ID to the C-VLAN ID. This method
implements seamless interworking between two user networks.

Configuring VLAN mapping on the switch connecting the two user networks
allows a user to manage the two networks as a single Layer 2 network, despite
the differing VLAN plans of the user networks.

11.2 Understanding VLAN Mapping

Working Mechanism
Depending on whether a packet is tagged or untagged, the switch processes a
received packet as follows:
● Tagged packed: Based on the VLAN mapping mode, the switch determines
whether a single tag, double tags, or the outer tag is to be replaced. The
switch then learns the MAC addresses in the packet. The switch updates the
MAC address entries in the VLAN mapping table based on the source MAC
address and mapped VLAN ID. It then searches for the MAC address entries
based on the destination MAC address and the mapped VLAN ID. If the
destination MAC address matches an entry, the switch forwards the packet
through the corresponding outbound interface. If not, the switch broadcasts
the packet in the specified VLAN.
● Untagged packet: Based on the VLAN creation mode, the switch determines
whether to add a VLAN tag. If the packet can be added to a VLAN, the switch
adds a VLAN tag to it and learns the MAC addresses. The switch then
performs Layer 2 forwarding based on the destination MAC address. If the
packet cannot be added to a VLAN, the switch either delivers the packet to
the CPU or discards it.

Figure 11-1 shows VLAN mapping between VLAN 2 and VLAN 3 configured on
PORT 1. Before sending packets from VLAN 2 to VLAN 3, PORT 1 replaces the
VLAN tags with VLAN 3 tags. When receiving packets from VLAN 3 to VLAN 2,
PORT 1 replaces the VLAN tags with VLAN 2 tags. This implements
communication between devices in VLAN 2 and VLAN 3.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 573


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Figure 11-1 VLAN mapping

VLAN 2 VLAN 3
2 3

PORT1
3
Switch Switch
A B

3
2

3
172.16.0.1/16 172.16.0.7/16

If devices in two VLANs need to communicate based on VLAN mapping, the IP


addresses of these devices must be on the same network segment. If their IP
addresses are on different network segments, communication between these
devices must be implemented using Layer 3 routes, which makes VLAN mapping
invalid.

VLAN Mapping Mode


The switch supports VLAN-based and MQC-based VLAN mapping:
● VLAN mapping
When the interface on a device configured with VLAN mapping receives a
single-tagged packet, the interface maps the VLAN tag in the packet to an S-
VLAN tag. 1:1 VLAN mapping maps a C-VLAN tag to an S-VLAN tag, whereas
N:1 VLAN mapping maps multiple C-VLAN tags to an S-VLAN tag.
● 2:1 VLAN mapping
When the interface on a device configured with VLAN mapping receives a
double-tagged packet, the interface maps the outer VLAN tag to an S-VLAN
tag and transparently transmits the inner VLAN tag. The interface configured
with 1:1 VLAN mapping maps an outer VLAN tag to an S-VLAN tag and
transparently transmits the inner VLAN tag. The interface configured with N:1
VLAN mapping maps different outer VLAN tags of packets to the same S-
VLAN tag and transparently transmits the inner VLAN tag. Only one outer
VLAN tag can be mapped to an S-VLAN tag at a time; therefore, to achieve N:
1 VLAN mapping, perform this configuration for multiple times.
● 2:2 VLAN mapping
When the interface on a device configured with VLAN mapping receives a
double-tagged packet, the interface maps the double VLAN tags to the
double S-VLAN tags.
MQC-based VLAN mapping uses a traffic classifier to classify packets based on
VLAN IDs. It associates the traffic classifier with a traffic behavior defining VLAN
mapping so that the switch can re-mark the VLAN ID in packets matching the
traffic classifier. MQC-based VLAN mapping implements differentiated services.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 574


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

11.3 Application Scenarios for VLAN Mapping


● 1:1 VLAN mapping
When receiving a single-tagged packet, the interface maps the VLAN tag to a
specified single VLAN tag.
1:1 VLAN mapping applies to the network shown in Figure 11-2.

Figure 11-2 1:1 VLAN mapping


VLAN 2
HSI
Residential
VLAN 3 Gateway

IPTV

VLAN 2->VLAN 201


VLAN 3->VLAN 301
VoIP VLAN 4 VLAN 4->VLAN 401

VLAN 2 Corridor
Switch
HSI
VLAN 2->VLAN 202
Residential VLAN 3->VLAN 302
Gateway VLAN 4->VLAN 402
VLAN 3
IPTV

VLAN 201~VLAN 300->VLAN 501


VLAN 301~VLAN 400->VLAN 502
VoIP VLAN 401~VLAN 500->VLAN 503
VLAN 4 Aggregation
Switch
VLAN 2
VLAN 211~VLAN 310->VLAN 501 Communtity
HSI VLAN 311~VLAN 410->VLAN 502 Switch
VLAN 411~VLAN 510->VLAN 503
Residential
VLAN 3 Gateway
IPTV

VLAN 2->VLAN 211


VLAN 3->VLAN 311 Internet
VoIP Corridor
VLAN 4->VLAN 411
Switch
VLAN 4
VLAN 2
HSI
VLAN 2->VLAN 212
VLAN 3->VLAN 312
VLAN 3 VLAN 4->VLAN 412
IPTV

Residential
Gateway
VoIP
VLAN 4

In the networking diagram shown in Figure 11-2, services (HSI, IPTV, and
VoIP) of each user are transmitted on different VLANs. Same services are
transmitted on the same C-VLAN. To differentiate users, deploy Corridor
Switch to allow the same services used by different users to be transmitted on

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 575


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

different VLANs, which implements 1:1 VLAN mapping. 1:1 VLAN mapping
requires a large number of VLANs to isolate services of different users;
however, the VLAN quantity provided by the network access device at the
aggregation layer is limited. To resolve this problem, configure the VLAN
aggregation function to allow the same services to be transmitted on the
same VLAN (N:1 VLAN mapping).
● 2:1 VLAN mapping
When the interface receives a double-tagged packet, the interface maps the
outer VLAN tag in the packet to an S-VLAN tag and transparently transmits
the inner VLAN tag.
2:1 VLAN mapping applies to the network shown in Figure 11-3.

Figure 11-3 2:1 VLAN mapping

Internet
Aggregation Switch

Community
Switch IP 501 2~3
S5
IP 501 4

IP 201 2 ~3
S3 Corridor S4
Switch
IP 401 4

Residential
S1 Gateway S2

HSI VoIP IPTV HSI VoIP IPTV


VLAN 2 VLAN 3 VLAN 4 VLAN 2 VLAN 3 VLAN 4

In the networking diagram shown in Figure 11-3, Residential Gateway,


Corridor Switch, and Community Switch are connected to the aggregation
layer on the network. To differentiate users and services to facilitate network
management and charging, configure the QinQ function for Corridor Switch.
To save VLAN resources, configure VLAN mapping on Community Switch to
transmit the same services on the same VLAN.
● 2:2 VLAN mapping
2:2 VLAN mapping applies to the network shown in Figure 11-4.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 576


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Figure 11-4 2:2 VLAN mapping

Switch2 Switch3
Internet
outside tag:50
inner tag:60

Switch1 Switch4

outside tag:100 outside tag:200


inner tag:10 VLAN Mapping inner tag:20

In the networking diagram shown in Figure 11-4, QinQ is used to send


double-tagged packets, which prevents the conflict between C-VLAN IDs and
S-VLAN IDs and differentiates services and users. However, the interface will
discard the packets because C-VLAN IDs are different from S-VLAN IDs. To
ensure communication continuity, configure 2:2 VLAN mapping on the PE and
replace double C-VLAN tags with double S-VLAN tags.

11.4 Licensing Requirements and Limitations for VLAN


Mapping

Involved Network Elements


Other network elements are not required.

Licensing Requirements
VLAN mapping configuration commands are available only after the S1720GW,
S1720GWR, and S1720X have the license (WEB management to full management
Electronic RTU License) loaded and activated and the switches are restarted. VLAN
mapping configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 577


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Version Requirements of 1:1 mode and N:1 mode for 1 to 1VLAN Mapping

Table 11-1 Products and versions supporting VLAN mapping


Product Product Software Version
Model

S1700 S1720GFR V200R006C10, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S1720GW, V200R010C00, V200R011C00, V200R011C10


S1720GWR

S1720GW- V200R010C00, V200R011C00, V200R011C10


E,
S1720GWR
-E

S1720X, V200R011C00, V200R011C10


S1720X-E

Other Models that cannot be configured using commands.


S1700 For details about features and versions, see S1700
models Documentation Bookshelf.

S2700 S2700SI Not supported

S2700EI V100R005C01, V100R006(C00&C01&C03&C05)


NOTE
The S2752EI does not support N:1 VLAN mapping.

S2710SI V100R006(C03&C05)

S2720EI V200R006C10, V200R009C00, V200R010C00,


V200R011C10

S2750EI V200R003C00, V200R005C00SPC300, V200R006C00,


V200R007C00, V200R008C00, V200R009C00,
V200R010C00, V200R011C00, V200R011C10

S3700 S3700SI V100R005C01, V100R006(C00&C01&C03&C05)

S3700EI V100R005C01, V100R006(C00&C01&C03&C05)

S3700HI V100R006C01, V200R001C00

S5700 S5700LI V200R001C00, V200R002C00,


V200R003(C00&C02&C10), V200R005C00SPC300,
V200R006C00, V200R007C00, V200R008C00,
V200R009C00, V200R010C00, V200R011C00,
V200R011C10

S5700S-LI V200R001C00, V200R002C00, V200R003C00,


V200R005C00SPC300, V200R006C00, V200R007C00,
V200R008C00, V200R009C00, V200R010C00,
V200R011C00, V200R011C10

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 578


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Product Product Software Version


Model

S5710-C-LI V200R001C00

S5710-X-LI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S5700EI V100R005C01, V100R006(C00&C01),


V200R001(C00&C01), V200R002C00, V200R003C00,
V200R005(C00&C01&C02&C03)

S5700SI V100R005C01, V100R006C00, V200R001C00,


V200R002C00, V200R003C00, V200R005C00

S5710EI V200R001C00, V200R002C00, V200R003C00,


V200R005(C00&C02)

S5720EI V200R007C00, V200R008C00, V200R009C00,


V200R010C00, V200R011C00, V200R011C10

S5720LI, V200R010C00, V200R011C00, V200R011C10


S5720S-LI

S5720SI, V200R008C00, V200R009C00, V200R010C00,


S5720S-SI V200R011C00, V200R011C10

S5700HI V100R006C01, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00SPC500&C01&C02)

S5710HI V200R003C00, V200R005(C00&C02&C03)

S5720HI V200R006C00, V200R007(C00&C10), V200R008C00,


V200R009C00, V200R010C00, V200R011C00,
V200R011C10
NOTE
The S5720HI does not support N:1 VLAN mapping.

S5730SI V200R011C10

S5730S-EI V200R011C10

S6700 S6700EI V100R006C00, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00&C01&C02)

S6720EI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S6720S-EI V200R009C00, V200R010C00, V200R011C00,


V200R011C10

S6720LI, V200R011C00, V200R011C10


S6720S-LI

S6720SI, V200R011C00, V200R011C10


S6720S-SI

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 579


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

NOTE
To know details about software mappings, see Hardware Query Tool.

Version Requirements of 1:1 mode and N:1 mode for 2 to 1 VLAN Mapping

Table 11-2 Products and versions supporting VLAN mapping


Product Product Software Version
Model

S1700 S1720GFR Not supported

S1720GW, Not supported


S1720GWR

S1720GW- Not supported


E,
S1720GWR
-E

S1720X, V200R011C00, V200R011C10


S1720X-E NOTE
The S1720X, S1720X-E does not support N:1 VLAN
mapping.

Other Models that cannot be configured using commands.


S1700 For details about features and versions, see S1700
models Documentation Bookshelf.

S2700 S2700SI Not supported

S2700EI Not supported

S2710SI Not supported

S2720EI Not supported

S2750EI Not supported

S3700 S3700SI Not supported

S3700EI Not supported

S3700HI V100R006C01, V200R001C00

S5700 S5700LI, Not supported


S5700S-LI

S5720LI, Not supported


S5720S-LI

S5710-C-LI Not supported

S5710-X-LI Not supported

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 580


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Product Product Software Version


Model

S5700EI V100R005C01, V100R006(C00&C01),


V200R001(C00&C01), V200R002C00, V200R003C00,
V200R005(C00&C01&C02&C03)

S5700SI Not supported

S5710EI V200R001C00, V200R002C00, V200R003C00,


V200R005(C00&C02)

S5720EI V200R007C00, V200R008C00, V200R009C00,


V200R010C00, V200R011C00, V200R011C10

S5720SI, Not supported


S5720S-SI

S5700HI V100R006C01, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00SPC500&C01&C02)

S5710HI V200R003C00, V200R005(C00&C02&C03)

S5720HI V200R006C00, V200R007(C00&C10), V200R008C00,


V200R009C00, V200R010C00, V200R011C00,
V200R011C10
NOTE
The S5720HI does not support N:1 VLAN mapping.

S5730SI V200R011C10
NOTE
The S5730SI does not support N:1 VLAN mapping.

S5730S-EI V200R011C10
NOTE
The S5730S-EI does not support N:1 VLAN mapping.

S6700 S6700EI V100R006C00, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00&C01&C02)

S6720EI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S6720S-EI V200R009C00, V200R010C00, V200R011C00,


V200R011C10

S6720LI, V200R011C00, V200R011C10


S6720S-LI NOTE
The S6720LI, S6720S-LI does not support N:1 VLAN
mapping.

S6720SI, V200R011C00, V200R011C10


S6720S-SI NOTE
The S6720SI, S6720S-SI does not support N:1 VLAN
mapping.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 581


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Version Requirements of 2:2 VLAN Mapping

Table 11-3 Products and versions supporting 2:2 VLAN mapping


Product Product Software Version
Model

S1700 S1720GFR Not supported

S1720GW, Not supported


S1720GWR

S1720GW- Not supported


E,
S1720GWR
-E

S1720X, V200R011C00, V200R011C10


S1720X-E

Other Models that cannot be configured using commands.


S1700 For details about features and versions, see S1700
models Documentation Bookshelf.

S2700 S2700SI Not supported

S2700EI Not supported

S2710SI Not supported

S2720EI Not supported

S2750EI Not supported

S3700 S3700SI Not supported

S3700EI Not supported

S3700HI Not supported

S5700 S5700LI, Not supported


S5700S-LI

S5720LI, Not supported


S5720S-LI

S5710-C-LI Not supported

S5710-X-LI Not supported

S5700EI Not supported

S5700SI Not supported

S5710EI Not supported

S5720EI V200R009C00, V200R010C00, V200R011C00,


V200R011C10

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 582


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Product Product Software Version


Model

S5720SI, Not supported


S5720S-SI

S5700HI Not supported

S5710HI Not supported

S5720HI V200R009C00, V200R010C00, V200R011C00,


V200R011C10

S5730SI V200R011C10

S5730S-EI V200R011C10

S6700 S6700EI Not supported

S6720EI V200R009C00, V200R010C00, V200R011C00,


V200R011C10

S6720S-EI V200R009C00, V200R010C00, V200R011C00,


V200R011C10

S6720LI, V200R011C00, V200R011C10


S6720S-LI

S6720SI, V200R011C00, V200R011C10


S6720S-SI

Feature Limitations
● VLAN mapping can be configured only on a trunk or hybrid interface, and the
hybrid interface must be added to the translated VLAN in tagged mode.
● When N:1 VLAN mapping is configured, the interface needs to join the
original VLAN in tagged mode.
● When VLAN mapping is configured, it is not recommended that map-vlan be
configured for the VLAN corresponding to the VLANIF interface.
● If VLAN mapping and DHCP are configured on the same interface, it is
recommended to add the interface to the original VLANs (VLANs before
mapping) in tagged mode.
● N:1 VLAN mapping takes effect only when the packets with original VLANs
are sent first. In this case, if packets are sent from the S-VLAN first, the C-
VLAN to be mapped cannot be determined because no ACL entry is
generated. As a result, the packets are discarded.
● N:1 VLAN mapping is not supported in a stack scenario.
● N:1 VLAN mapping does not take effect for reverse BUM traffic.
● A VLAN bound to a BD cannot be specified as the value of map-vlan (the
outer VLAN ID in the mapped tag) in VLAN mapping commands. Similarly, a
VLAN specified as the value of map-vlan in VLAN mapping commands cannot
be bound to a BD.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 583


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

● Configuring MAC address limiting and N:1 VLAN mapping simultaneously


causes a high CPU usage on some low-end switches, so such configuration is
not recommended.

11.5 Configuring VLAN ID-based VLAN Mapping

Pre-configuration Tasks
Before configuring VLAN ID-based VLAN mapping, complete the following tasks:
● Create the specified VLAN.
● Add the primary interface to the mapped VLAN.

11.5.1 Configuring 1:1 VLAN Mapping


Context
When receiving a tagged packet, an interface maps the VLAN ID in the packet to
an S-VLAN ID.
After the port vlan-mapping vlan vlan-id1 [ to vlan-id2 ] map-vlan vlan-id3
[ remark-8021p 8021p-value ] command is used on an interface, vlan-id1 [ to
vlan-id2 ] is mapped to vlan-id3 in the inbound direction, and vlan-id3 is mapped
to vlan-id1 [ to vlan-id2 ] in the outbound direction.
On the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,
S1720X-E, S2750EI, S2720EI, S5700S-LI, S5700LI, S5720LI, S5720S-LI, S6720LI,
S6720S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI, outbound VLAN mapping cannot be used with a traffic policy. You can
run the port vlan-mapping ingress command to configure VLAN mapping in the
inbound direction. The interface configured with VLAN mapping maps vlan-id1
[ to vlan-id2 ] to vlan-id3 in the inbound direction, and does not map vlan-id3 to
vlan-id1 [ to vlan-id2 ] in the outbound direction.

NOTE
The port vlan-mapping ingress command is only supported by S1720GFR, S1720GW,
S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2750EI, S2720EI, S5700S-LI,
S5700LI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI,
S6720S-SI, S5720SI, and S5720S-SI.

Pre-configuration Tasks
Before configuring 1:1 VLAN mapping, complete the following tasks:
● Create the specified VLAN.
● Add the primary interface to the translated VLAN.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 584


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Step 2 Run interface interface-type interface-number


The interface view is displayed.
Step 3 Run port link-type { hybrid | trunk }
The port link-type is set.
Step 4 Run qinq vlan-translation enable
VLAN translation is enabled on the interface.
Step 5 (Optional) Run port vlan-mapping ingress
VLAN mapping is configured in the inbound direction.
By default, VLAN mapping is valid for both inbound and outbound directions.
Step 6 Run port vlan-mapping vlan vlan-id1 [ to vlan-id2 ] map-vlan vlan-id3
[ remark-8021p 8021p-value ]
Single-tagged VLAN mapping is configured on the interface.

NOTE

● VLAN mapping can be configured only on a trunk or hybrid interface, and the hybrid
interface must be added to the translated VLAN in tagged mode.
● When N:1 VLAN mapping is configured (VLAN IDs can be non-contiguous before
mapping), the interface needs to be added to these VLANs in tagged mode, and the
VLAN specified by map-vlan cannot be a VLAN corresponding to a VLANIF interface.
● If VLAN mapping and DHCP are configured on the same interface, it is recommended to
add the interface to the original VLANs (VLANs before mapping) in tagged mode.
● Configuring mac-limit and N:1 VLAN mapping simultaneously causes a high CPU usage
on some low-end switches. Therefore, such configuration is not recommended.
● N:1 VLAN mapping takes effect only when the packets with original VLANs are sent
first. In this case, if packets are sent from the S-VLAN first, the C-VLAN to be mapped
cannot be determined because no ACL entry is generated. As a result, the packets are
discarded.

----End

11.5.2 Configuring 2:1 VLAN Mapping

Context
When receiving a tagged packet, an interface maps the VLAN ID in the packet to
an S-VLAN ID.

NOTE

Only the S1720X, S1720X-E, S5720HI, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this configuration.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 585


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Step 3 Run port link-type { hybrid | trunk }

The port link-type is set.

Step 4 Run qinq vlan-translation enable

VLAN translation is enabled on the interface.

Step 5 Run port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 [ to vlan-id3 ] map-
vlan vlan-id4 [ remark-8021p 8021p-value ]

The outer VLAN tag is replaced.

----End

11.5.3 Configuring 2:2 VLAN Mapping

Context
QinQ is used to send double-tagged packets, which prevents the conflict between
C-VLAN IDs and S-VLAN IDs and differentiates services and users. However, the
interface will discard the packets because C-VLAN IDs are different from S-VLAN
IDs. To ensure communication continuity, configure 2:2 VLAN mapping on the PE
and replace double C-VLAN tags with double S-VLAN tags.

NOTE

Only the S1720X, S1720X-E, S5720HI, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this configuration.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The Ethernet interface view is displayed.

Step 3 Run port link-type { hybrid | trunk }

The port link-type is set.

Step 4 Run qinq vlan-translation enable

VLAN translation is enabled on the interface.

Step 5 Run port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 map-vlan vlan-id3
map-inner-vlan vlan-id4 [ remark-8021p 8021p-value ]

The outer and inner VLAN tags are replaced.

----End

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 586


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

11.5.4 Verifying the VLAN ID-based VLAN Mapping


Configuration

Procedure
● Run the display vlan vlan-id command to check whether the interface is
added to the translated S-VLAN.
● Run the display current-configuration command to check the VLAN
mapping configuration on the interface.
----End

11.6 Configuring MQC-based VLAN Mapping


Context
A traffic policy is a QoS policy configured by binding traffic classifiers to traffic
behaviors. A traffic policy is bound to a traffic classifier and traffic behavior to
implement VLAN mapping. The traffic classifier defines rules based on VLAN IDs.
VLAN mapping based on the traffic policy implements differentiated services.

Procedure
1. Configure a traffic classifier.
a. Run system-view
The system view is displayed.
b. Run traffic classifier classifier-name [ operator { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or
an existing traffic classifier view is displayed.
and is the logical operator between the rules in the traffic classifier,
which means that:

▪ If the traffic classifier contains ACL rules, packets match the traffic
classifier only when they match one ACL rule and all the non-ACL
rules.

▪ If the traffic classifier does not contain any ACL rules, packets match
the traffic classifier only when they match all the rules in the
classifier.
The logical operator or means that packets match the traffic classifier if
they match one of the rules in the classifier.
By default, the relationship between rules in a traffic classifier is OR.
c. Configure matching rules according to the following table.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 587


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

NOTE

Only the S5720EI, S6720EI, and S6720S-EI support traffic classifiers with
advanced ACLs containing the ttl-expired field.
When a traffic classifier contains if-match ipv6 acl { acl-number | acl-name },
the S5720HI does not support remark 8021p [ 8021p-value | inner-8021p ],
remark cvlan-id cvlan-id, remark vlan-id vlan-id, or mac-address learning
disable.

Matchin Command Remarks


g Rule

Outer if-match vlan-id start-vlan-id Only the S1720X, S1720X-


VLAN ID [ to end-vlan-id ] [ cvlan-id E, S5720EI, S5720HI,
or inner cvlan-id ] S5730SI, S5730S-EI,
and outer S6720LI, S6720S-LI,
VLAN IDs S6720SI, S6720S-SI,
of QinQ S6720EI, and S6720S-EI
packets support the cvlan-id
cvlan-id parameter.
Inner and if-match cvlan-id start-vlan-id -
outer [ to end-vlan-id ] [ vlan-id
VLAN IDs vlan-id ] (S1720X, S1720X-E,
in QinQ S5720EI, S5720HI, S5730SI,
packets S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI,
S6720S-EI)

802.1p if-match 8021p 8021p-value If you enter multiple


priority in &<1-8> 802.1p priority values in
VLAN one command, a packet
packets matches the traffic
classifier if it matches any
of the priorities,
regardless of whether the
relationship between
rules in the traffic
classifier is AND or OR.

Inner if-match cvlan-8021p 8021p- -


802.1p value &<1-8> (S5720EI,
priority in S5720HI, S6720EI, S6720S-EI)
QinQ
packets

Drop if-match discard (S5720EI, A traffic classifier


packet S5720HI, S6720EI, S6720S-EI) containing this matching
rule can only be bound to
traffic behaviors
containing traffic statistics
collection and flow
mirroring actions.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 588


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Matchin Command Remarks


g Rule

Double if-match double-tag -


tags in (S5720EI, S5720HI, S6720EI,
QinQ S6720S-EI)
packets

Destinati if-match destination-mac -


on MAC mac-address [ mac-address-
address mask ]
Source if-match source-mac mac- -
MAC address [ mac-address-mask ]
address

Protocol if-match l2-protocol { arp | ip -


type field | mpls | rarp | protocol-value }
in the
Ethernet
frame
header

All if-match any After the if-match any


packets command is run, only the
matching rule configured
using this command takes
effect, and the other
matching rules in the
same traffic classifier will
become ineffective.

DSCP if-match dscp dscp-value ● If you enter multiple


priority in &<1-8> DSCP values in one
IP command, a packet
packets matches the traffic
classifier if it matches
any of the DSCP
values, regardless of
whether the
relationship between
rules in the traffic
classifier is AND or OR.
● If the relationship
between rules in a
traffic classifier is AND,
the if-match dscp and
if-match ip-
precedence
commands cannot be
used in the traffic
classifier
simultaneously.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 589


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Matchin Command Remarks


g Rule

IP if-match ip-precedence ip- ● The if-match dscp and


preceden precedence-value &<1-8> if-match ip-
ce in IP precedence
packets commands cannot be
configured in a traffic
classifier in which the
relationship between
rules is AND.
● If you enter multiple IP
precedence values in
one command, a
packet matches the
traffic classifier if it
matches any of the IP
precedence values,
regardless of whether
the relationship
between rules in the
traffic classifier is AND
or OR.

Layer 3 if-match protocol { ip | ipv6 } -


protocol
type

SYN Flag if-match tcp syn-flag { syn- -


in the flag-value | ack | fin | psh | rst
TCP | syn | urg }
packet

Inbound if-match inbound-interface A traffic policy containing


interface interface-type interface- this matching rule cannot
number be applied to the
outbound direction or in
the interface view.

Outboun if-match outbound-interface A traffic policy containing


d interface-type interface- this matching rule cannot
interface number (S5720EI, S5720HI, be applied to the inbound
S6720EI, S6720S-EI) direction on the S5720HI.
The traffic policy
containing this matching
rule cannot be applied in
the interface view.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 590


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Matchin Command Remarks


g Rule

ACL rule if-match acl { acl-number | ● When an ACL is used


acl-name } to define a traffic
classification rule, it is
recommended that the
ACL be configured first.
● If an ACL in a traffic
classifier defines
multiple rules, a packet
matches the ACL as
long as it matches one
of rules, regardless of
whether the
relationship between
rules in the traffic
classifier is AND or OR.

ACL6 rule if-match ipv6 acl { acl- Before specifying an ACL6


number | acl-name } in a matching rule,
configure the ACL6.

Flow ID if-match flow-id flow-id The traffic classifier


(S5720EI, S6720EI, S6720S-EI) containing if-match
flow-id and the traffic
behavior containing
remark flow-id must be
bound to different traffic
policies.
The traffic policy
containing if-match
flow-id can only be
applied to an interface, a
VLAN, or the system in
the inbound direction.

d. Run quit
Exit from the traffic classifier view.
2. Configure a traffic behavior.
a. Run traffic behavior behavior-name
A traffic behavior is created and the traffic behavior view is displayed.
b. Run remark vlan-id vlan-id
The traffic behavior is configured. The outer VLAN ID of the packet is re-
marked.
c. (Optional) Run remark cvlan-id vlan-id
The traffic behavior is configured. The inner VLAN ID of the packet is re-
marked.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 591


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

NOTE

Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this configuration.
d. Run quit
Exit from the traffic behavior view.
e. Run quit
Exit from the system view.
3. Configure a traffic policy.
a. Run traffic policy policy-name [ match-order { auto | config } ]
A traffic policy is created and the traffic policy view is displayed, or the
view of an existing traffic policy is displayed. If you do not specify a
matching order for traffic classifiers in the traffic policy, the default
matching order config is used.
After a traffic policy is applied, you cannot use the traffic policy
command to modify the matching order of traffic classifiers in the traffic
policy. To modify the matching order, delete the traffic policy, create a
traffic policy, and specify the matching order.
When creating a traffic policy, you can specify the matching order of its
matching rules. The matching order can be either automatic order or
configuration order:

▪ Automatic order: Traffic classifiers are matched based on the


priorities of their types. Traffic classifiers based on the following
information are in descending order of priority: Layer 2 and IPv4
Layer 3 information, advanced ACL6 information, basic ACL6
information, Layer 2 information, IPv4 Layer 3 information, and user-
defined ACL information. If data traffic matches multiple traffic
classifiers, and the traffic behaviors conflict with each other, the
traffic behavior corresponding to the highest priority rule takes
effect.

▪ Configuration order: Traffic classifiers are matched based on the


sequence in which traffic classifiers were bound to traffic behaviors.
NOTE

If more than 128 ACL rules defining CAR are configured, a traffic policy must be
applied to an interface, a VLAN, and the system in sequence in the outbound
direction. In the preceding situation, if you need to update ACL rules, delete the
traffic policy from the interface, VLAN, and system and reconfigure it in
sequence.
b. Run classifier classifier-name behavior behavior-name
A traffic behavior is bound to a traffic classifier in the traffic policy.
c. Run quit
Exit from the traffic policy view.
d. Run quit
Exit from the system view.
4. Apply the traffic policy.
– Applying a traffic policy to an interface

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 592


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

i. Run system-view
The system view is displayed.
ii. Run interface interface-type interface-number
The interface view is displayed.
iii. Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the interface.
A traffic policy can be applied to only one direction on an interface,
but a traffic policy can be applied to different directions on different
interfaces. After a traffic policy is applied to an interface, the system
performs traffic policing for all the incoming or outgoing packets
that match traffic classification rules on the interface.
– Applying a traffic policy to a VLAN
i. Run system-view
The system view is displayed.
ii. Run vlan vlan-id
The VLAN view is displayed.
iii. Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the VLAN.
Only one traffic policy can be applied to a VLAN in the inbound or
outbound direction.
After a traffic policy is applied, the system performs traffic policing
for the packets that belong to a VLAN and match traffic classification
rules in the inbound or outbound direction.
– Applying a traffic policy to the system
i. Run system-view
The system view is displayed.
ii. Run traffic-policy policy-name global { inbound | outbound } [ slot
slot-id ]
A traffic policy is applied to the system.
Only one traffic policy can be applied to the system or slot in one
direction. A traffic policy cannot be applied to the same direction in
the system and slot simultaneously.
○ In a stack, a traffic policy that is applied to the system takes
effect on all the interfaces and VLANs of all the member
switches in the stack. The system then performs traffic policing
for all the incoming and outgoing packets that match traffic
classification rules on all the member switches. A traffic policy
that is applied to a specified slot takes effect on all the
interfaces and VLANs of the member switch with the specified
stack ID. The system then performs traffic policing for all the
incoming and outgoing packets that match traffic classification
rules on this member switch.
○ On a standalone switch, a traffic policy that is applied to the
system takes effect on all the interfaces and VLANs of the local
switch. The system then performs traffic policing for all the
incoming and outgoing packets that match traffic classification

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 593


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

rules on the local switch. Traffic policies applied to the slot and
system have the same functions.

Verifying the Configuration


● Run the display traffic classifier user-defined [ classifier-name ] command
to check the traffic classifier configuration.
● Run the display traffic behavior user-defined [ behavior-name ] command
to check the traffic behavior configuration.
● Run the display traffic policy user-defined [ policy-name [ classifier
classifier-name ] ] command to check the user-defined traffic policy
configuration.
● Run the display traffic-applied [ interface [ interface-type interface-
number ] | vlan [ vlan-id ] ] { inbound | outbound } [ verbose ] command to
check information about ACL-based simplified and MQC-based traffic policies
applied to the system, a VLAN, or an interface.
NOTE

Traffic policies can be applied to a sub-interface, but the display traffic-applied


command cannot be used to check information about ACL-based simplified and MQC-
based traffic policies applied to the sub-interface.
● Run the display traffic policy { interface [ interface-type interface-number
[.subinterface-number ] ] | vlan [ vlan-id ] | ssid-profile [ ssid-profile-name ]
| global } [ inbound | outbound ] command to check the traffic policy
configuration.
NOTE

Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support sub-interfaces.


Only the S5720HI supports ssid-profile [ ssid-profile-name ].
● Run the display traffic-policy applied-record [ policy-name ] command to
check the application record of a specified traffic policy.

11.7 Displaying VLAN Translation Resource Usage

Context
During VLAN Mapping configuration, VLAN translation resources may be
insufficient. You can run commands to view the total number of inbound/
outbound VLAN translation resources, the number of used VLAN translation
resources, and the number of remaining VLAN translation resources. The
command output helps you locate faults.

Procedure
Step 1 Run the display vlan-translation resource [ slot slot-number ] command in any
view to view VLAN translation resource usage.
NOTE

Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this command.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 594


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Step 2 Run the display spare-bucket resource [ slot slot-number ] command in any
view to view the usage of backup resources when VLAN translation resources
conflict.
NOTE
Only the S5720HI supports this command.

----End

11.8 Configuration Examples for VLAN Mapping

11.8.1 Example for Configuring VLAN ID-based 1:1 VLAN


Mapping
Networking Requirements
Users in different communities use the same services, such as the web, IPTV, and
VoIP services. To facilitate management, the network administrator of each
community adds different services to different VLANs. For communities in
different VLANs to use the same services, communication between VLANs must be
implemented.
In Figure 11-5, community 1 and community 2 have the same services, but
belong to different VLANs. Communication between them needs to be
implemented with low costs.

Figure 11-5 Networking diagram for configuring 1:1 VLAN mapping


PE1 PE2
GE0/0/1 ISP GE0/0/1
VLAN10

CE1 GE0/0/3 GE0/0/3 CE2


GE0/0/1 GE0/0/2 GE0/0/1 GE0/0/2

Community1 Community2
VLAN6 VLAN5

172.16.0.2/16 172.16.0.6/16
172.16.0.1/16 172.16.0.3/16 172.16.0.5/16 172.16.0.7/16

Configuration Roadmap
The configuration roadmap is as follows:

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 595


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

1. Add the switch port connecting to community 1 to VLAN6 and add the switch
port connecting to community 2 to VLAN5.
2. Configure VLAN mapping on GE0/0/1 of PE1 and PE2 and map C-VLAN IDs to
S-VLAN IDs so that users in different VLANs can communicate with each
other.

Procedure
Step 1 Add downlink interfaces on switches to specified VLANs.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan 6
[CE1-vlan6] quit
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type access
[CE1-GigabitEthernet0/0/1] port default vlan 6
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface gigabitethernet 0/0/2
[CE1-GigabitEthernet0/0/2] port link-type access
[CE1-GigabitEthernet0/0/2] port default vlan 6
[CE1-GigabitEthernet0/0/2] quit
[CE1] interface gigabitethernet 0/0/3
[CE1-GigabitEthernet0/0/3] port link-type trunk
[CE1-GigabitEthernet0/0/3] port trunk allow-pass vlan 6
[CE1-GigabitEthernet0/0/3] quit

# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan 5
[CE2-vlan5] quit
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type access
[CE2-GigabitEthernet0/0/1] port default vlan 5
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface gigabitethernet 0/0/2
[CE2-GigabitEthernet0/0/2] port link-type access
[CE2-GigabitEthernet0/0/2] port default vlan 5
[CE2-GigabitEthernet0/0/2] quit
[CE2] interface gigabitethernet 0/0/3
[CE2-GigabitEthernet0/0/3] port link-type trunk
[CE2-GigabitEthernet0/0/3] port trunk allow-pass vlan 5
[CE2-GigabitEthernet0/0/3] quit

Step 2 Configure VLAN mapping on the GE0/0/1 of PE1 and PE2.


# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan 10
[PE1-vlan10] quit
[PE1] interface gigabitethernet 0/0/1
[PE1-GigabitEthernet0/0/1] port link-type trunk
[PE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[PE1-GigabitEthernet0/0/1] qinq vlan-translation enable
[PE1-GigabitEthernet0/0/1] port vlan-mapping vlan 6 map-vlan 10
[PE1-GigabitEthernet0/0/1] quit

# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 596


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

[PE2] vlan 10
[PE2-vlan10] quit
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type trunk
[PE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[PE2-GigabitEthernet0/0/1] qinq vlan-translation enable
[PE2-GigabitEthernet0/0/1] port vlan-mapping vlan 5 map-vlan 10
[PE2-GigabitEthernet0/0/1] quit

Step 3 Verify the configuration.


Verify that users in community 1 and community 2 can communicate with each
other.
----End

Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 6
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 6
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 6
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 6
#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 5
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 5
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 5
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 5
#
return
● PE1 configuration file
#
sysname PE1
#
vlan batch 10
#
interface GigabitEthernet0/0/1
port link-type trunk
qinq vlan-translation enable
port trunk allow-pass vlan 10

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 597


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

port vlan-mapping vlan 6 map-vlan 10


#
return

● PE2 configuration file


#
sysname PE2
#
vlan batch 10
#
interface GigabitEthernet0/0/1
port link-type trunk
qinq vlan-translation enable
port trunk allow-pass vlan 10
port vlan-mapping vlan 5 map-vlan 10
#
return

11.8.2 Example for Configuring VLAN ID-based N:1 VLAN


Mapping

Networking Requirements
In Figure 11-6, a large number of switches need to be deployed at the corridor so
that the same service used by different users can be sent on different VLANs. To
save VLAN resources, configure the VLAN aggregation function (N:1) on the
switches so that same services are sent on the same VLAN.

Figure 11-6 Networking diagram for configuring N:1 VLAN mapping

Internet

Switch GE0/0/1

VLAN100~109
SwitchA

…… …… ……

SwitchB SwitchC SwitchD SwitchE

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 598


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Configuration Roadmap
The configuration roadmap is as follows:
1. Create the original VLAN and the translated VLAN on the Switch and add
GE0/0/1 to the VLANs in tagged mode.
2. Configure VLAN mapping on GE0/0/1 on the Switch.

Procedure
Step 1 Configure the Switch.
# Create a VLAN.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10 100 to 109

# Add GE0/0/1 to the VLAN.


[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type hybrid
[Switch-GigabitEthernet0/0/1] port hybrid tagged vlan 10 100 to 109

# Configure VLAN mapping on GE0/0/1.


[Switch-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch-GigabitEthernet0/0/1] port vlan-mapping vlan 100 to 109 map-vlan 10

Step 2 Verify the configuration.


Verify that users in VLAN 100 to VLAN 109 can connect to the Internet through
the Switch.

----End

Configuration Files
● Switch configuration file
#
sysname Switch
#
vlan batch 10 100 to 109
#
interface gigabitethernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid tagged vlan 10 100 to 109
port vlan-mapping vlan 100 to 109 map-vlan 10
#
return

11.8.3 Example for Configuring VLAN ID-based 2 to 1 VLAN


Mapping
Networking Requirements
NOTE

Only the S1720X, S1720X-E, S5720HI, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this example.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 599


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

As shown in Figure 11-7, Residential Gateway, Corridor Switch, and Community


Switch allow users to connect to the aggregation layer. To save VLAN resources
and isolate same services used by different users, configure the QinQ function on
the Corridor Switch and configure VLAN mapping on the Community Switch.

Figure 11-7 Networking diagram for configuring 2 to 1 VLAN mapping

Internet

Aggregate switch of carrier

Community GE0/0/3
Switch IP 2 ~3 501
S5
GE0/0/2 GE0/0/1 IP 4 501

S3 GE0/0/2 GE0/0/2 IP 2 ~3 201


Corridor S4
GE0/0/1 Switch GE0/0/1 IP 4 401

S1 GE0/0/4 GE0/0/4 S2
Residential
Gateway
GE

1
1

GE
/0/
GE0/0/2

GE0/0/2
/0/

0/0

0/0
0
0

GE
GE

/3

/3

PC VoIP IPTV PC VoIP IPTV


VLAN 2 VLAN 3 VLAN 4 VLAN 2 VLAN 3 VLAN 4

Configuration Roadmap
The configuration roadmap is as follows:
1. Add switch ports connecting to users to specified VLANs to distinguish
different services.
2. Configure the QinQ function on the Corridor Switch to distinguish users and
services.
3. Configure VLAN mapping on the Community Switch to save VLAN resources.

Procedure
Step 1 Add downlink interfaces of S1 and S2 to specified VLANs.
# Configure S1.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 600


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

<HUAWEI> system-view
[HUAWEI] sysname S1
[S1] vlan batch 2 to 4
[S1] interface gigabitethernet 0/0/1
[S1-GigabitEthernet0/0/1] port link-type access
[S1-GigabitEthernet0/0/1] port default vlan 2
[S1-GigabitEthernet0/0/1] quit
[S1] interface gigabitethernet 0/0/2
[S1-GigabitEthernet0/0/2] port link-type access
[S1-GigabitEthernet0/0/2] port default vlan 3
[S1-GigabitEthernet0/0/2] quit
[S1] interface gigabitethernet 0/0/3
[S1-GigabitEthernet0/0/3] port link-type access
[S1-GigabitEthernet0/0/3] port default vlan 4
[S1-GigabitEthernet0/0/3] quit
[S1] interface gigabitethernet 0/0/4
[S1-GigabitEthernet0/0/4] port link-type trunk
[S1-GigabitEthernet0/0/4] port trunk allow-pass vlan 2 to 4
[S1-GigabitEthernet0/0/4] quit

# Configure S2.
<HUAWEI> system-view
[HUAWEI] sysname S2
[S2] vlan batch 2 to 4
[S2] interface gigabitethernet 0/0/1
[S2-GigabitEthernet0/0/1] port link-type access
[S2-GigabitEthernet0/0/1] port default vlan 2
[S2-GigabitEthernet0/0/1] quit
[S2] interface gigabitethernet 0/0/2
[S2-GigabitEthernet0/0/2] port link-type access
[S2-GigabitEthernet0/0/2] port default vlan 3
[S2-GigabitEthernet0/0/2] quit
[S2] interface gigabitethernet 0/0/3
[S2-GigabitEthernet0/0/3] port link-type access
[S2-GigabitEthernet0/0/3] port default vlan 4
[S2-GigabitEthernet0/0/3] quit
[S2] interface gigabitethernet 0/0/4
[S2-GigabitEthernet0/0/4] port link-type trunk
[S2-GigabitEthernet0/0/4] port trunk allow-pass vlan 2 to 4
[S2-GigabitEthernet0/0/4] quit

Step 2 Configure the QinQ function on the Corridor Switch to allow the Corridor Switch
to send double-tagged packets to the Community Switch.
# Configure S3.
<HUAWEI> system-view
[HUAWEI] sysname S3
[S3] vlan batch 201 401
[S3] interface gigabitethernet 0/0/1
[S3-GigabitEthernet0/0/1] port link-type hybrid
[S3-GigabitEthernet0/0/1] port hybrid untagged vlan 201 401
[S3-GigabitEthernet0/0/1] qinq vlan-translation enable
[S3-GigabitEthernet0/0/1] port vlan-stacking vlan 2 to 3 stack-vlan 201
[S3-GigabitEthernet0/0/1] port vlan-stacking vlan 4 stack-vlan 401
[S3-GigabitEthernet0/0/1] quit
[S3] interface gigabitethernet 0/0/2
[S3-GigabitEthernet0/0/2] port link-type trunk
[S3-GigabitEthernet0/0/2] port trunk allow-pass vlan 201 401
[S3-GigabitEthernet0/0/2] quit

# Configure S4.
<HUAWEI> system-view
[HUAWEI] sysname S4
[S4] vlan batch 201 401
[S4] interface gigabitethernet 0/0/1
[S4-GigabitEthernet0/0/1] port link-type hybrid
[S4-GigabitEthernet0/0/1] port hybrid untagged vlan 201 401

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 601


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

[S4-GigabitEthernet0/0/1] qinq vlan-translation enable


[S4-GigabitEthernet0/0/1] port vlan-stacking vlan 2 to 3 stack-vlan 201
[S4-GigabitEthernet0/0/1] port vlan-stacking vlan 4 stack-vlan 401
[S4-GigabitEthernet0/0/1] quit
[S4] interface gigabitethernet 0/0/2
[S4-GigabitEthernet0/0/2] port link-type trunk
[S4-GigabitEthernet0/0/2] port trunk allow-pass vlan 201 401
[S4-GigabitEthernet0/0/2] quit

Step 3 Configure VLAN mapping on S5.


<HUAWEI> system-view
[HUAWEI] sysname S5
[S5] vlan batch 501
[S5] interface gigabitethernet 0/0/1
[S5-GigabitEthernet0/0/1] port link-type trunk
[S5-GigabitEthernet0/0/1] port trunk allow-pass vlan 501
[S5-GigabitEthernet0/0/1] qinq vlan-translation enable
[S5-GigabitEthernet0/0/1] port vlan-mapping vlan 201 inner-vlan 2 to 3 map-vlan 501
[S5-GigabitEthernet0/0/1] port vlan-mapping vlan 401 inner-vlan 4 map-vlan 501
[S5-GigabitEthernet0/0/1] quit
[S5] interface gigabitethernet 0/0/2
[S5-GigabitEthernet0/0/2] port link-type trunk
[S5-GigabitEthernet0/0/2] port trunk allow-pass vlan 501
[S5-GigabitEthernet0/0/2] qinq vlan-translation enable
[S5-GigabitEthernet0/0/2] port vlan-mapping vlan 201 inner-vlan 2 to 3 map-vlan 501
[S5-GigabitEthernet0/0/2] port vlan-mapping vlan 401 inner-vlan 4 map-vlan 501
[S5-GigabitEthernet0/0/2] quit
[S5] interface gigabitethernet 0/0/3
[S5-GigabitEthernet0/0/3] port link-type trunk
[S5-GigabitEthernet0/0/3] port trunk allow-pass vlan 501
[S5-GigabitEthernet0/0/3] quit

Step 4 Verify the configuration.


Verify that users can connect to the network and that same services are sent on
the same VLAN.
----End

Configuration Files
● Configuration file of S1
#
sysname S1
#
vlan batch 2 to 4
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 4
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
return
● Configuration file of S2
#
sysname S2

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 602


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

#
vlan batch 2 to 4
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 4
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
return
● Configuration file of S3
#
sysname S3
#
vlan batch 201 401
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 201 401
port vlan-stacking vlan 2 to 3 stack-vlan 201
port vlan-stacking vlan 4 stack-vlan 401
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 201 401
#
return
● Configuration file of S4
#
sysname S4
#
vlan batch 201 401
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 201 401
port vlan-stacking vlan 2 to 3 stack-vlan 201
port vlan-stacking vlan 4 stack-vlan 401
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 201 401
#
return
● Configuration file of S5
#
sysname S5
#
vlan batch 501
#
interface GigabitEthernet0/0/1
port link-type trunk
qinq vlan-translation enable
port trunk allow-pass vlan 501
port vlan-mapping vlan 201 inner-vlan 2 to 3 map-vlan

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 603


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

501
port vlan-mapping vlan 401 inner-vlan 4 map-vlan 501
#
interface GigabitEthernet0/0/2
port link-type trunk
qinq vlan-translation enable
port trunk allow-pass vlan 501
port vlan-mapping vlan 201 inner-vlan 2 to 3 map-vlan
501
port vlan-mapping vlan 401 inner-vlan 4 map-vlan 501
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 501
#
return

11.8.4 Example for Configuring VLAN ID-based 2:2 VLAN


Mapping
Networking Requirements
NOTE

Only the S1720X, S1720X-E, S5720HI, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this example.

QinQ is used to send double-tagged packets, which prevents the conflict between
C-VLAN IDs and S-VLAN IDs and differentiates services and users. However, the
interface will discard the packets because C-VLAN IDs are different from S-VLAN
IDs. To ensure communication continuity, configure 2:2 VLAN mapping on the PE
and replace double C-VLAN tags with double S-VLAN tags.
In Figure 11-8, users send double-tagged packets to the ISP network. These
packets cannot be sent successfully because the VLAN IDs are different from the
S-VLAN IDs. To solve this problem, ensure that the users of the Switch5 and
Switch6 can communicate.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 604


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Figure 11-8 Networking diagram for configuring 2:2 VLAN mapping

Switch2 Switch3
ISP
outside tag:50
inner tag:60

GE0/0/1 GE0/0/1
GE0/0/2 GE0/0/2
Switch1 Switch4

GE0/0/1 GE0/0/1
GE0/0/2
GE0/0/2

Switch5 Switch6

GE0/0/1 GE0/0/1

VLAN 10 VLAN 30

VLAN Mapping

Configuration Roadmap
The configuration roadmap is as follows:

1. Add switch ports connecting to users to VLAN 10 and VLAN 30.


2. Configure the QinQ function on Switch1 and Switch4 so that packets sent to
the ISP network are double-tagged.
3. Configure 2:2 VLAN mapping on switches connected to the ISP network.

Procedure
Step 1 Add downlink interfaces on switches to specified VLANs.

# Configure Switch5.
<HUAWEI> system-view
[HUAWEI] sysname Switch5
[Switch5] vlan 10
[Switch5-vlan10] quit
[Switch5] interface gigabitethernet 0/0/1
[Switch5-GigabitEthernet0/0/1] port link-type access
[Switch5-GigabitEthernet0/0/1] port default vlan 10
[Switch5-GigabitEthernet0/0/1] quit
[Switch5] interface gigabitethernet 0/0/2
[Switch5-GigabitEthernet0/0/2] port link-type trunk
[Switch5-GigabitEthernet0/0/2] port trunk allow-pass vlan 10

# Configure Switch6.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 605


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

<HUAWEI> system-view
[HUAWEI] sysname Switch6
[Switch6] vlan 30
[Switch6-vlan30] quit
[Switch6] interface gigabitethernet 0/0/1
[Switch6-GigabitEthernet0/0/1] port link-type access
[Switch6-GigabitEthernet0/0/1] port default vlan 30
[Switch6-GigabitEthernet0/0/1] quit
[Switch6] interface gigabitethernet 0/0/2
[Switch6-GigabitEthernet0/0/2] port link-type trunk
[Switch6-GigabitEthernet0/0/2] port trunk allow-pass vlan 30

Step 2 Configure the QinQ function on Switch1 and Switch4 so that packets sent to the
ISP network are double-tagged.

# Configure Switch 1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 20
[Switch1-vlan20] quit
[Switch1] interface gigabitethernet 0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type hybrid
[Switch1-GigabitEthernet0/0/1] port hybrid untagged vlan 20
[Switch1-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch1-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 20
[Switch1-GigabitEthernet0/0/1] quit
[Switch1] interface gigabitethernet 0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type trunk
[Switch1-GigabitEthernet0/0/2] port trunk allow-pass vlan 20
[Switch1-GigabitEthernet0/0/2] quit

# Configure Switch 4.
<HUAWEI> system-view
[HUAWEI] sysname Switch4
[Switch4] vlan 40
[Switch4-vlan40] quit
[Switch4] interface gigabitethernet 0/0/1
[Switch4-GigabitEthernet0/0/1] port link-type hybrid
[Switch4-GigabitEthernet0/0/1] port hybrid untagged vlan 40
[Switch4-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch4-GigabitEthernet0/0/1] port vlan-stacking vlan 30 stack-vlan 40
[Switch4-GigabitEthernet0/0/1] quit
[Switch4] interface gigabitethernet 0/0/2
[Switch4-GigabitEthernet0/0/2] port link-type trunk
[Switch4-GigabitEthernet0/0/2] port trunk allow-pass vlan 40
[Switch4-GigabitEthernet0/0/2] quit

Step 3 Configure 2:2 VLAN mapping on switches connected to the ISP network.

# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] interface gigabitethernet 0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] port hybrid tagged vlan 50
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port vlan-mapping vlan 20 inner-vlan 10 map-vlan 50 map-inner-vlan
60

# Configure Switch3.
<HUAWEI> system-view
[HUAWEI] sysname Switch3
[Switch3] interface gigabitethernet 0/0/1
[Switch3-GigabitEthernet0/0/1] port link-type hybrid
[Switch3-GigabitEthernet0/0/1] port hybrid tagged vlan 50

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 606


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

[Switch3-GigabitEthernet0/0/1] qinq vlan-translation enable


[Switch3-GigabitEthernet0/0/1] port vlan-mapping vlan 40 inner-vlan 30 map-vlan 50 map-inner-vlan
60

Step 4 Verify the configuration.

Verify that users connected to Switch5 and users connected to Switch6 can
communicate with each other.

----End

Configuration Files
● Switch1 configuration file
#
sysname Switch1
#
vlan batch 20
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 20
port vlan-stacking vlan 10 stack-vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return

● Switch2 configuration file


#
sysname Switch2
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid tagged vlan 50
port vlan-mapping vlan 20 inner-vlan 10 map-vlan 50 map-inner-vlan 60
#
return

● Switch3 configuration file


#
sysname Switch3
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid tagged vlan 50
port vlan-mapping vlan 40 inner-vlan 30 map-vlan 50 map-inner-vlan 60
#
return

● Switch4 configuration file


#
sysname Switch4
#
vlan batch 40
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 40
port vlan-stacking vlan 30 stack-vlan 40
#

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 607


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
return

● Switch5 configuration file


#
sysname Switch5
#
vlan batch 10
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
return

● Switch6 configuration file


#
sysname Switch6
#
vlan batch 30
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
return

11.9 Troubleshooting VLAN Mapping

11.9.1 Communication Failure After VLAN Mapping


Configuration
Fault Symptom
In Figure 11-9, users in VLAN 6 need to communicate with users in VLAN 5 over
an ISP network. The carrier assigns VLAN 10 as the S-VLAN. Single-tag VLAN
mapping is configured on GE 0/0/1 of SwitchC and SwitchD to map C-VLANs 5
and 6 to S-VLAN 10.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 608


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

Figure 11-9 VLAN mapping networking diagram

ISP network
VLAN10
SwitchC SwitchD
GE0/0/1 GE0/0/1
SwitchA SwitchB
VLAN6 GE0/0/1 GE0/0/1 VLAN5
GE0/0/2 GE0/0/3 GE0/0/3
GE0/0/2

172.16.0.1/16 172.16.0.2/16 172.16.0.3/16 172.16.0.5/16 172.16.0.6/16 172.16.0.7/16

After VLAN mapping is configured on the interfaces, users in different VLANs


cannot communicate with each other. This fault is commonly caused by one of the
following:
● The translated VLAN (map-vlan) has not been created.
● The interfaces configured with VLAN mapping are not added to the translated
VLAN.
● The translated VLAN ID configured on SwitchC and SwitchD is different from
the S-VLAN ID assigned by the carrier.
● The interfaces configured with VLAN mapping are faulty.

Procedure
1. In the user view, run the display vlan command to verify that the translated
VLAN (map-vlan) is created.
– If the translated VLAN has not been created, run the vlan command to
create it.
– If the translated VLAN is created, go to the next step.
2. In the interface view, run the display this command to verify that the
interfaces configured with VLAN mapping have been added to the translated
VLAN in tagged mode.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 609


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 11 VLAN Mapping Configuration

NOTE

● VLAN mapping can be configured only on a trunk or hybrid interface, and the hybrid
interface must be added to the translated VLAN in tagged mode.
● If a range of original VLANs is specified by vlan-id1 to vlan-id2 on an interface, the
interface must be added to all the original VLANs in tagged mode, and the translated
VLAN cannot have a VLANIF interface.
● Limiting MAC address learning on an interface may affect N:1 VLAN mapping on the
interface.
– If the interfaces configured with VLAN mapping have not been added to
the translated VLAN in tagged mode, run the port trunk allow-pass vlan
or port hybrid tagged vlan command in the interface view to add the
interfaces to the translated VLAN in tagged mode.
– If the interfaces have been added to the translated VLAN in tagged
mode, go to the next step.
3. In the interface view, run the display this command to verify that the
translated VLAN ID configured on the interface is the same as the S-VLAN ID
assigned by the carrier.
– If the translated VLAN ID on an interface is different from the S-VLAN ID
assigned by the carrier, run the undo port vlan-mapping command on
the interface to delete the VLAN mapping configuration, and run the
port vlan-mapping vlan command to set the translated VLAN ID to the
S-VLAN ID.
– If the translated VLAN ID is the same as the S-VLAN ID assigned by the
carrier, go to the next step.
4. In the user view, run the display vlan vlan-id command to verify that user-
side interfaces are added to C-VLANs.
If the user-side interfaces are not in the C-VLANs, run the port trunk allow-
pass vlan, port hybrid tagged vlan, or port default vlan command to add
the interfaces to the C-VLANs.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 610

You might also like