vlan mapping

Use vlan mapping to configure VLAN mapping on an interface.

Use undo vlan mapping to cancel the VLAN mapping configuration.

vlan mapping { vlan-id translated-vlan vlan-id | nest { range vlan-range-list | single vlan-id-list } nested-vlan vlan-id | nni | tunnel outer-vlan-id inner-vlan-id translated-vlan outer-vlan-id inner-vlan-id | uni { range vlan-range-list | single vlan-id-list } translated-vlan vlan-id }

undo vlan mapping { vlan-id translated-vlan vlan-id | all | nest { range vlan-range-list | single vlan-id-list } nested-vlan vlan-id | nni | tunnel outer-vlan-id inner-vlan-id translated-vlan outer-vlan-id inner-vlan-id | uni { range vlan-range-list | single vlan-id-list } translated-vlan vlan-id }

No VLAN mapping is configured on an interface.

Layer 2 Ethernet interface view, Layer 2 aggregate interface view

Predefined user roles

network-admin

vlan-id translated-vlan vlan-id : Specifies the original VLAN and translated VLAN for a one-to-one VLAN mapping. The value range for the vlan-id argument is 1 to 4094. The original VLAN and the translated VLAN cannot be the same.

uni range vlan-range-list translated-vlan vlan-id : Specifies the original VLAN ranges and the translated VLAN for a many-to-one VLAN mapping on the customer-side port. The vlan-range-list argument specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN ID or a range of VLAN IDs in the form of vlan-id1 to vlan-id2 . The value range for VLAN IDs is 1 to 4094. The ID for vlan-id2 must be equal to or greater than the ID for vlan-id1 . Make sure different VLAN ranges do not overlap. Any of the original VLANs cannot be the same as the translated VLAN.

uni single vlan-id-list translated-vlan vlan-id : Specifies the original VLANs and the translated VLAN for a many-to-one VLAN mapping on the customer-side port. The vlan-id-list argument specifies a space-separated list of up to 10 VLAN IDs. The value range for the VLAN ID is 1 to 4094. Any of the original VLANs cannot be the same as the translated VLAN.

nni : Configures the network-side port to use the original VLAN tags of the many-to-one mapping to replace the VLAN tags of the packets destinated to the user network.

nest range vlan-range-list nested-vlan vlan-id : Specifies the CVLAN ranges and the SVLAN for a one-to-two VLAN mapping. The vlan-range-list argument specifies a space-separated list of up to 10 CVLAN items. Each item specifies a CVLAN ID or a range of CVLAN IDs in the form of vlan-id1 to vlan-id2 . The value range for CVLAN IDs is 1 to 4094. The ID for vlan-id2 must be equal to or greater than the ID for vlan-id1 . Different CVLAN ranges cannot overlap. The vlan-id argument specifies the SVLAN ID in the range of 1 to 4094.

nest single vlan-id-list nested-vlan vlan-id : Specifies the CVLANs and the SVLAN for a one-to-two VLAN mapping. The vlan-id-list argument specifies a space-separated list of up to 10 CVLAN IDs. The value range for the VLAN ID is 1 to 4094. The vlan-id argument specifies the SVLAN ID in the range of 1 to 4094.

tunnel outer-vlan-id inner-vlan-id translated-vlan outer-vlan-id inner-vlan-id : Specifies the original SVLAN ID and CVLAN ID and the translated SVLAN ID and CVLAN ID for a two-to-two VLAN mapping. The value range for either outer-vlan-id or inner-vlan-id is 1 to 4094.

all : Deletes all VLAN mapping configurations from the interface.

Usage guidelines

For different types of VLAN mapping entries on an interface, both the original VLANs and the translated VLANs cannot overlap. For one-to-one VLAN mapping entries or two-to-two VLAN mapping entries, the translated VLANs cannot overlap. When the original VLANs of one-to-one or two-to-two VLAN mapping entries overlap, the most recent configuration takes effect.

On an interface, a transparent VLAN cannot be configured as an original VLAN or translated VLAN. For packets carrying two layers of VLAN tags, the translated VLANs and original VLANs refer to only the outer VLANs. For more information about transparent VLANs, see Layer 2—LAN Switching Configuration Guide .

To make many-to-one VLAN mapping take effect, configure many-to-one VLAN mapping in pairs on both the customer side and the network side. An interface cannot be configured as the customer-side port and network-side port of many-to-one VLAN mapping at the same time. After you configure an interface as the network-side interface of many-to-one VLAN mapping, do not configure the other types of VLAN mapping on the interface.

Customer-side many-to-one VLAN mapping is not supported in Layer 2 aggregate interface view.

Before enabling or disabling QinQ, first clear the existing VLAN mapping entries. You cannot configure two-to-two VLAN mapping on a QinQ-enabled port.

To ensure correct traffic forwarding from the service provider network to the customer network, do not configure many-to-one VLAN mapping together with uRPF. For more information about uRPF, see Security Configuration Guide .

The MTU of an interface is 1500 bytes by default. After a VLAN tag is added to a packet, the packet length is added by 4 bytes. When you configure one-to-two VLAN mapping, HP recommends that you set the MTU to a minimum of 1504 bytes on interfaces in the service provider network.

VLAN mapping takes effect on only VLAN-tagged packets received on an interface.

VLAN mapping is mutually exclusive with EVB. Do not configure VLAN mapping and EVB on a port.

# Configure a one-to-one VLAN mapping on Ten-GigabitEthernet 1/0/1 to map VLAN 1 to VLAN 101.

# Configure many-to-one VLAN mappings on the customer-side port Ten-GigabitEthernet 1/0/2 to map VLANs 1 through 50 and VLAN 80 to VLAN 101. Configure the network-side port Ten-GigabitEthernet 1/0/3 to use the original VLAN tags of the many-to-one mappings to replace the VLAN tags of the packets destinated to the user network.

# Configure one-to-two VLAN mappings on Ten-GigabitEthernet 1/0/4 to add SVLAN tag 101 to packets carrying VLAN tags 1 through 10 and 80.

# Configure a two-to-two VLAN mapping on Ten-GigabitEthernet 1/0/5 to map SVLAN 101 and CVLAN 1 to SVLAN 201 and CVLAN 10, respectively.

Related commands

display vlan mapping

© Copyright 2015 Hewlett-Packard Development Company, L.P.

S1720, S2700, S5700, and S6720 V200R011C10 Command Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands..

  • About This Document
  • Using the Command Query Tool to Query Product Command Information
  • Basic Configurations Commands
  • Device Management Commands
  • Interface Management Commands
  • MAC Address Table Configuration Commands
  • Link Aggregation Commands
  • VLAN Configuration Commands
  • VLAN Aggregation Configuration Commands
  • MUX VLAN Configuration Commands
  • VLAN Termination Configuration Commands
  • Voice VLAN Configuration Commands
  • QinQ Configuration Commands

VLAN Mapping Configuration Commands

  • GVRP Configuration Commands
  • VCMP Configuration Commands
  • STP/RSTP/MSTP/VBST Configuration Commands
  • SEP Configuration Commands
  • RRPP Configuration Commands
  • ERPS (G.8032) Configuration Commands
  • Loopback Detection Configuration Commands
  • Layer 2 Protocol Transparent Transmission Commands
  • IP Service Commands
  • IP Unicast Routing Commands
  • IP Multicast Commands
  • MPLS Configuration Commands
  • VPN Configuration Commands
  • WLAN-AC Commands
  • Reliability Commands
  • User Access and Authentication Commands
  • Security Commands
  • QoS Commands
  • Network Management and Monitoring Commands
  • Free Mobility Commands
  • VXLAN Commands
  • Upgrade-compatible Commands Reference
  • Command Support
  • port vlan-mapping ingress
  • port vlan-mapping vlan inner-vlan
  • port vlan-mapping vlan map-vlan
  • remark cvlan-id
  • remark vlan-id

Commands provided in this section and all the parameters in the commands are supported by all switch models by default, unless otherwise specified. For details, see specific commands.

The port vlan-mapping ingress command configures VLAN mapping in the inbound direction.

The undo port vlan-mapping ingress command cancels the configuration.

By default, VLAN mapping is valid for both inbound and outbound directions.

undo port vlan-mapping ingress

Ethernet interface view, GE interface view , 40GE interface view , MultiGE interface view , Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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 containing CAR. 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.

Prerequisites

The qinq vlan-translation enable command has been executed.

Precautions

To make VLAN mapping take effect in the inbound direction only, configure the port vlan-mapping ingress and port vlan-mapping vlan map-vlan commands in sequence. To delete the VLAN mapping configuration, delete the port vlan-mapping vlan map-vlan and port vlan-mapping ingress commands in sequence.

# Configure VLAN mapping in the inbound direction on GE 0/0/1 to map VLAN 100 in received frames to VLAN 10.

The port vlan-mapping vlan inner-vlan command enables the interface to replace the outer VLAN tag or both VLAN tags of a double-tagged packet.

The undo port vlan-mapping vlan inner-vlan command disables the interface to replace the outer VLAN tag or both VLAN tags of a double-tagged packet.

By default, the interface does not map tags of packets.

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

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

port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 map-vlan vlan-id4 [ map-inner-vlan vlan-id5 ] [ remark-8021p 8021p-value ]

undo port vlan-mapping { all | vlan vlan-id1 inner-vlan vlan-id2 [ to vlan-id3 ] [ map-vlan vlan-id4 ] }

undo port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 map-vlan vlan-id4 map-inner-vlan vlan-id5

Ethernet interface view, GE interface view , XGE interface view , 40GE interface view , Eth-Trunk interface view, port group view

When provider edges (PEs) receive double-tagged packets, the inner tag in the packets indicates the user, and the outer tag indicates the service. To differentiate services entering the ISP network, you can configure 2 to 1 VLAN mapping on PEs. To allow users to communicate with each other, the interface maps tags of different services to outer tags, and inner tags are transparently transmitted to the ISP network.

This command allows an interface to map the VLAN ID in a tagged packet to an S-VLAN ID.

VLAN mapping can be configured only on a trunk or hybrid interface, and the interface must be added to the map-vlan in tagged mode.

When inner-vlan is set to a VLAN ID range, the interface cannot replace the VLAN ID of the inner tag in packets.

If VLAN mapping and DHCP are configured on the same interface, the interface must be added to the original VLANs (VLANs before mapping) in tagged mode.

When the VLAN tags of a packet match both a single-tag VLAN mapping entry and a double-tag VLAN mapping entry, the double-tag VLAN mapping takes effect.

# Configure 2 to 1 VLAN mapping, map VLAN 10 in the outer tag of a packet (with VLAN 10 in the outer tag and VLAN 20 in the inner tag) to VLAN 100.

The port vlan-mapping vlan map-vlan command enables the interface to map single tags of packets.

The undo port vlan-mapping command cancels the interface to map single tags of packets.

port vlan-mapping vlan vlan-id1 [ to vlan-id2 ] map-vlan vlan-id3 [ remark-8021p 8021p-value ]

undo port vlan-mapping { all | vlan vlan-id1 [ to vlan-id2 ] [ map-vlan vlan-id3 ]}

S5720HI does not support the N:1 VLAN Mapping.

Ethernet interface view, GE interface view , XGE interface view , 40GE interface view , MultiGE interface view , Eth-Trunk interface view, port group view

VLAN mapping, also called VLAN translation, implements communication between different VLANs. VLAN mapping takes effect after outbound interfaces on a switch forward the packets received by inbound interfaces. This command allows an interface to map the VLAN ID in a tagged packet to an S-VLAN ID.

VLAN mapping can be configured only on a trunk or hybrid interface, and the interface must be added to the translated VLAN in tagged mode.

When N:1 VLAN mapping is configured (VLAN IDs can be incontiguous 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.

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.

A maximum of 16 original VLAN IDs can be specified on an interface.

If the VLANs before and after mapping are the same, return packets may fail to be forwarded. To solve the problem, map the VLAN to itself. For example, packets with VLAN 10 and VLAN 20 (before mapping) need to be sent to the network side and S-VLAN 20 (after mapping) is assigned to users, run the port vlan-mapping vlan 10 map-vlan 20 command. To ensure that return packets are correctly forwarded, run the port vlan-mapping vlan 20 map-vlan 20 command.

# Configure VLAN mapping on the GE 0/0/1 and map VLAN 100 of a received packet to VLAN 10 before the packet is forwarded.

The remark cvlan-id command configures an action of re-marking the inner VLAN tag in QinQ packets in a traffic behavior.

The undo remark cvlan-id command deletes the configuration.

By default, an action of re-marking the inner VLAN tag in QinQ packets is not configured in a traffic behavior.

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

remark cvlan-id cvlan-id

undo remark cvlan-id

Traffic behavior view

You can use the remark cvlan-id command to re-mark the inner VLAN tag in QinQ packets in a traffic behavior so that the downstream device can identify packets and provide differentiated services.

Follow-up Procedure

Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing the action of re-marking the inner VLAN tag in QinQ packets.

The remark cvlan-id command is valid for only QinQ packets that carry two or more layers of tags.

After the remark cvlan-id , remark 8021p , add-tag vlan-id , and remark vlan-id commands are used, the system modifies VLAN tags of packets according to the configuration. These actions are called VLAN-based actions.

You must configure the VLAN-based action and non-VLAN-based action in different traffic behaviors bound to the same traffic policy.

If you run the remark cvlan-id command in the same traffic classifier view multiple times, only the latest configuration takes effect.

# Re-mark the inner VLAN tag in packets with 5 in the traffic behavior b1 .

The remark vlan-id command configures an action of re-marking the VLAN tag in VLAN packets in a traffic behavior.

The undo remark vlan-id command deletes the configuration.

By default, an action of re-marking the VLAN tag in VLAN packets is not configured in a traffic behavior.

remark vlan-id vlan-id

undo remark vlan-id

You can use the remark vlan-id command to re-mark the VLAN tag in VLAN packets in a traffic behavior so that the downstream device can identify packets and provide differentiated services.

The remark vlan-id command re-marks only the outer VLAN tag of double-tagged packets.

Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing VLAN tag re-marking.

If the remark vlan-id command is used on an inbound interface , on the S5720HI, S5720EI, S6720EI, and S6720S-EI , add the outbound interfaces to the replaced VLAN and the original VLAN. Otherwise, packets cannot be forwarded correctly. On other models, add the inbound and outbound interfaces to the replaced VLAN and the original VLAN. Otherwise, packets cannot be forwarded correctly.

If a traffic policy containing remark vlan-id is applied to the outbound direction on an interface, the VLAN that the interface belongs to must work in tag mode.

After the remark vlan-id , remark 8021p , remark cvlan-id command is used, the system modifies the VLAN tag of packets based on the device configuration. The behavior configured through these commands is called VLAN-based action.

To perform VLAN-based actions and non-VLAN-based actions in an upstream traffic policy, you need to configure VLAN-based actions and non-VLAN-based actions in different traffic behaviors.

If you run the remark vlan-id command in the same traffic behavior view multiple times, only the latest configuration takes effect.

# Re-mark the VLAN tag of packets in a VLAN to 200.

Related Documents

S200, S300, S500, S1700, S2700, S5700, and S6700 V200R021C10 Command Reference

S300, S500, S1700, S2700, S5700, and S6700 V200R021C00, C01 Command Reference

S300, S500, S2700, S5700, and S6700 V200R023C00 Command Reference

Digital Signature File

digtal sigature tool

vlan mapping configuration

  • Create Post
  • Create Chapter Note
  • Create Note for Selection
  • View All Notes
  • Show All Notes on Page
  • Hide All Notes on Page
  • Print with Notes
  • Share on Facebook
  • Share on Twitter
  • Email a Link
  • Copy Link to Clipboard
  • Cisco Industrial Ethernet 2000U Series Switches

Published On: August 6ᵗʰ, 2019 02:04

Layer 2 Switching Software Configuration Guide for Cisco IE 2000U and Connected Grid Switches

Configuring vlan mapping.

The Cisco 2520 Connected Grid Switch (CGS 2520) supports VLAN mapping (or VLAN ID translation) on trunk ports.

This chapter includes the following sections:

Information About VLAN Mapping

Prerequisites, guidelines and limitations, default settings, verifying configuration, configuration example, related documents, feature history.

Another way to establish service provider VLANs is to configure VLAN mapping (or VLAN ID translation) on trunk ports connected to a customer network to map customer VLANs to service-provider VLANs. Packets entering the port are mapped to a service provider VLAN ( S-VLAN) based on the port number and the original customer VLAN-ID ( C-VLAN) of the packet.

In a typical metro deployment, VLAN mapping takes place on user network interfaces (UNIs) or enhanced network interfaces (ENIs) that face the customer network. However, you are not prevented from configuring VLAN mapping on network node interfaces (NNIs).

Because the VLAN ID is mapped to the S-VLAN on ingress, on the switch all forwarding operations are performed by using S-VLAN information and not C-VLAN information.

On an interface configured for VLAN mapping, the specified C-VLAN packets are mapped to the specified S-VLAN when they enter the port. Symmetrical mapping back to the customer C-VLAN occurs when packets exit the port.

The switch supports these types of VLAN mapping on UNI trunk ports:

  • One-to-one VLAN mapping occurs at the ingress and egress of the port and maps the customer C-VLAN ID in the 802.1Q tag to the service-provider S-VLAN ID. You can also specify that packets with all other VLAN IDs are dropped.
  • Selective QinQ maps the specified customer VLANs entering the UNI to the specified S-VLAN ID. The S-VLAN is added to the incoming unmodified C-VLAN. You can also specify that traffic carrying all other customer VLAN IDs is dropped.
  • Traditional 802.1Q tunneling ( QinQ) performs all-to-one bundling of C-VLAN IDs to a single S-VLAN ID for the port. The S-VLAN is added to the incoming unmodified C-VLAN. You can configure the UNI as an 802.1Q tunnel port for traditional QinQ, or you can configure selective QinQ on trunk ports for a more flexible implementation. Mapping takes place at ingress and egress of the port. All packets on the port are bundled into the specified S-VLAN.

For quality of service (QoS), the switch has flexible mapping between C-CoS or C-DSCP and S-CoS and maps the inner CoS to the outer CoS for traffic with traditional QinQ or selective QinQ VLAN mapping. For more information, see the “802.1Q Tunneling CoS Mapping” section in the QoS Software Configuration Guide for Cisco IE 2000U and Connected Grid Switches .

Mapping Customer VLANs to Service-Provider VLANs

Figure 9-1 shows a topology where a customer uses the same VLANs in multiple sites on different sides of a service-provider network. You map the customer VLAN IDs to service-provider VLAN IDs for packet travel across the service-provider backbone. The customer VLAN IDs are retrieved at the other side of the service-provider backbone for use in the other customer site. Configure the same set of VLAN mappings at a customer-connected port on each side of the service-provider network.

See the examples following the configuration steps for using one-to-one mapping, traditional QinQ, or selective QinQ to map customer VLANs 1 to 5 to service-provider VLANs.

Figure 9-1 Mapping Customer VLANs

vlan mapping configuration

  • Be familiar with the information in the “Information About VLAN Mapping” section and “Guidelines and Limitations” section .
  • Ensure that your network strategy and planning for your network are complete. For example, you must decide what type of VLAN mapping your network requires.
  • Traditional QinQ uses 802.1Q tunnel ports; you configure one-to-one VLAN mapping and selective QinQ on 802.1Q trunk ports.
  • To avoid mixing customer traffic, when you configure traditional Q-in-Q on a trunk port, you should configure the service provider S-VLAN ID as an allowed VLAN on the trunk port.
  • On a switch interface configured for VLAN mapping, mapping to the S-VLAN occurs on traffic entering the switch. Therefore, when you configure other features on an interface configured for VLAN mapping, you should use the S-VLAN ID, except when configuring VLAN mapping and Ethernet E-LMI. When configuring E-LMI on an interface, use the C-VLAN when entering the ethernet lmi ce-vlan map vlan-id service instance configuration mode command.
  • When you configure VLAN mapping on an EtherChannel, the mapping applies to all ports in the port channel.
  • You cannot configure encapsulation replicate on a SPAN destination port if the source port is configured as a tunnel port or has a 1-to-2 mapping configured. Encapsulation replicate is supported with 1-to-1 VLAN mapping.
  • To determine switch resources used for VLAN mapping, enter the show vlan mapping usage or show platform vlan mapping privileged EXEC command.

By default, no VLAN mapping is configured.

These procedures show how to configure each type of VLAN mapping on trunk ports. To verify your configuration, enter the show interfaces interface-id vlan mapping or show vlan mapping privileged EXEC commands. See the “Verifying Configuration” section for the syntax of these commands.

One-to-One Mapping

Follow this procedure to configure one-to-one VLAN mapping to map a customer VLAN ID to a service-provider VLAN ID. You can use the default drop keywords to specify that traffic is dropped unless both the specified C-VLAN ID and S-VLAN ID combination is explicitly mapped.

BEFORE YOU BEGIN

Review the “Guidelines and Limitations” section .

DETAILED STEPS

Use the no switchport vlan mapping vlan-id translated-id command to remove the VLAN mapping information. Entering no switchport vlan mapping all deletes all mapping configurations.

This example shows how to map VLAN IDs 1 to 5 in the customer network to VLANs 101 to 105 in the service-provider network as shown in Figure 9-1 . You configure these same VLAN mapping commands for a port in Switch A and Switch B. The traffic on any other VLAN IDs is dropped.

In the previous example, at the ingress of the service-provider network, VLAN IDs 1 to 5 in the customer network are mapped to VLANs 101 to 105, respectively, inside of the service-provider network. At the egress of the service-provider network, VLANs 101 to 105 in the service-provider network are mapped to VLAN IDs 1 to 5, respectively, in the customer network.

Traditional QinQ on a Trunk Port

Follow this procedure to configure VLAN mapping for traditional QinQ on a trunk port or tunneling by default. Configuring tunneling by default bundles all packets on the port into the configured S-VLAN.

Use the no switchport vlan mapping tunnel default outer vlan-id command to remove the VLAN mapping configuration. Entering no switchport vlan mapping all deletes all mapping configurations.

This example shows how to bundle all traffic on the port to leave the switch with the S-VLAN ID of 100:

Selective QinQ on a Trunk Port

Follow this procedure to configure VLAN mapping for selective QinQ on a trunk port. Note that you can configure one-to-one mapping and selective QinQ on the same interface, but you cannot use the same C-VLAN IDs in both configurations. You can use the default drop keywords to specify that traffic is dropped unless the specified C-VLAN ID and S-VLAN ID combination is explicitly mapped.

Use the no switchport vlan mapping vlan-id dot1q-tunnel outer vlan-id command to remove the VLAN mapping configuration. Entering no switchport vlan mapping all deletes all mapping configurations.

This example shows how to configure selective QinQ mapping on the port so that traffic with a C-VLAN ID of 1 to 5 enters the switch with an S-VLAN ID of 100. The traffic of any other VLAN IDs is dropped.

  • Cisco IOS Master Command List, All Releases
  • Cisco IOS LAN Switching Command Reference
  • Cisco IOS Interface and Hardware Component Command Reference
  • QoS Software Configuration Guide for Cisco IE 2000U and Connected Grid Switches

Custom Book

Welcome to the custom book wizard. Using this tool you can create books containing a custom selection of content. To get started, enter a name for the book or select an existing book to add to.

Select the topics and posts that you would like to add to your book.

Preview your selected content before you download or save to your dashboard.

PDF View with Adobe Reader on a variety of devices.

ePub View in various apps on iPhone, iPad, Android, Sony Reader or Windows devices.

Mobi View on Kindle device or Kindle app on multiple devices.

Save to Dashboard

Save the custom book to your dashboard for future downloads.

Your contact details will be kept confidential and will not be shared outside Cisco. If we need additional information regarding your feedback, we will contact you at this email address.

Industry Solutions

  • Training & Certification
  • Contact Sales

Online Exhibition Center

Resource center.

  • Become a Partner

vlan mapping configuration

  • 04-Layer 2 - LAN Switching Configuration Guide
  • 01-MAC address table configuration
  • 02-Ethernet link aggregation configuration
  • 03-DRNI configuration
  • 04-Port isolation configuration
  • 05-VLAN configuration
  • 06-MVRP configuration
  • 07-QinQ configuration
  • 08-VLAN mapping configuration
  • 09-Loop detection configuration
  • 10-Spanning tree configuration
  • 11-LLDP configuration
  • 12-L2PT configuration
  • 13-Service loopback group configuration

Configuring VLAN mapping · 1

Overview · 1

VLAN mapping application scenarios · 1

VLAN mapping implementations · 3

Configuration restrictions and guidelines · 7

VLAN mapping configuration task list 8

Configuring one-to-one VLAN mapping · 8

Configuring many-to-one VLAN mapping · 9

Configuring many-to-one VLAN mapping in a network with dynamic IP address assignment 9

Configuring many-to-one VLAN mapping in a network with static IP address assignment 11

Configuring enhanced many-to-one VLAN mapping for Layer 2 communication · 13

Configuring one-to-two VLAN mapping · 15

Configuring zero-to-two VLAN mapping · 16

Configuring two-to-two VLAN mapping · 16

Displaying and maintaining VLAN mapping · 17

VLAN mapping configuration examples · 17

One-to-one and many-to-one VLAN mapping configuration example · 17

One-to-two and two-to-two VLAN mapping configuration example · 22

Configuring VLAN mapping

VLAN mapping re-marks VLAN tagged traffic with new VLAN IDs. H3C provides the following types of VLAN mapping:

·            One-to-one VLAN mapping —Replaces one VLAN tag with another.

·            Many-to-one VLAN mapping —Replaces multiple VLAN tags with the same VLAN tag.

·            One-to-two VLAN mapping —Tags single-tagged packets with an outer VLAN tag.

·            Zero-to-two VLAN mapping —Adds double VLAN tags to untagged packets.

·            Two-to-two VLAN mapping —Replaces the outer and inner VLAN IDs of double tagged traffic with a new pair of VLAN IDs.

VLAN mapping application scenarios

One-to-one and many-to-one vlan mapping.

Figure 1 shows a typical application scenario of one-to-one and many-to-one VLAN mapping. The scenario implements broadband Internet access for a community.

Figure 1 Application scenario of one-to-one and many-to-one VLAN mapping

As shown in Figure 1 , the network is implemented as follows:

·            Each home gateway uses different VLANs to transmit the PC, VoD, and VoIP services.

·            To further subclassify each type of traffic by customer, configure one-to-one VLAN mapping on the wiring-closet switches. This feature assigns a separate VLAN to each type of traffic from each customer. The required total number of VLANs in the network can be very large.

·            To prevent the maximum number of VLANs from being exceeded on the distribution layer device, configure many-to-one VLAN mapping on the campus switch. This feature assigns the same VLAN to the same type of traffic from different customers.

One-to-two and two-to-two VLAN mapping

Figure 2 shows a typical application scenario of one-to-two and two-to-two VLAN mapping. In this scenario, the two remote sites of the same VPN must communicate across two SP networks.

Figure 2 Application scenario of one-to-two and two-to-two VLAN mapping

Site 1 and Site 2 are in VLAN 2 and VLAN 3, respectively. The SP 1 network assigns SVLAN 10 to Site 1. The SP 2 network assigns SVLAN 20 to Site 2. When the packet from Site 1 arrives at PE 1, PE 1 tags the packet with SVLAN 10 by using one-to-two VLAN mapping.

When the double-tagged packet from the SP 1 network arrives at the SP 2 network interface, PE 3 processes the packet as follows:

·            Replaces SVLAN tag 10 with SVLAN tag 20.

·            Replaces CVLAN tag 2 with CVLAN tag 3.

One-to-two VLAN mapping provides the following benefits:

·            Enables a customer network to plan its CVLAN assignment without conflicting with SVLANs.

·            Adds a VLAN tag to a tagged packet and expands the number of available VLANs to 4094 × 4094.

·            Reduces the stress on the SVLAN resources, which were 4094 VLANs in the SP network before the mapping process was initiated.

Zero-to-two VLAN mapping

The application scenario of zero-to-two VLAN mapping is similar to the scenario of one-to-two VLAN mapping. Zero-to-two VLAN mapping is used on the customer-side port of a PE to add double tags to untagged packets.

VLAN mapping implementations

Figure 3 shows a simplified network that illustrates basic VLAN mapping terms.

Basic VLAN mapping terms include the following:

·            Uplink traffic —Traffic transmitted from the customer network to the service provider network.

·            Downlink traffic —Traffic transmitted from the service provider network to the customer network.

·            Network-side port —A port connected to or closer to the service provider network.

·            Customer-side port —A port connected to or closer to the customer network.

Figure 3 Basic VLAN mapping terms

One-to-one VLAN mapping

As shown in Figure 4 , one-to-one VLAN mapping is implemented on the customer-side port and replaces VLAN tags as follows:

·            Replaces the CVLAN with the SVLAN for the uplink traffic.

·            Replaces the SVLAN with the CVLAN for the downlink traffic.

Figure 4 One-to-one VLAN mapping implementation

Many-to-one VLAN mapping in common mode

As shown in Figure 5 , many-to-one VLAN mapping in common mode is implemented on both the customer-side and network-side ports as follows:

·            For the uplink traffic, the customer-side many-to-one VLAN mapping replaces multiple CVLANs with the same SVLAN.

·            For the downlink traffic, the network-side many-to-one VLAN mapping replaces the SVLAN with the CVLAN found in the DHCP snooping table or ARP snooping table. For more information about DHCP snooping and ARP snooping, see Layer 3—IP Services Configuration Guide .

Figure 5 Many-to-one VLAN mapping implementation in common mode

Many-to-one VLAN mapping in enhanced mode

As shown in Figure 6 and Figure 7 , many-to-one VLAN mapping in enhanced mode is implemented as follows:

·            For the downlink traffic, the device processes VLAN translation as follows:

¡   For Layer 2 downlink traffic, the device uses the SVLAN ID and the destination MAC address to find a matching CVLAN based on the automatically assigned ACL rules.

¡   For Layer 3 downlink traffic, the network-side many-to-one VLAN mapping replaces the SVLAN with CVLANs found in the DHCP snooping table or ARP snooping table. The VLAN translation for Layer 3 downlink traffic is the same in enhanced mode and common mode.

Figure 6 Many-to-one VLAN mapping in enhanced mode for Layer 2 downlink traffic

Figure 7 Many-to-one VLAN mapping in enhanced mode for Layer 3 downlink traffic

One-to-two VLAN mapping

As shown in Figure 8 , one-to-two VLAN mapping is implemented on the customer-side port to add the SVLAN tag for the uplink traffic.

For the downlink traffic to be correctly sent to the customer network, make sure the SVLAN tag is removed on the customer-side port before transmission. Use one of the following methods to remove the SVLAN tag from the downlink traffic:

·            Configure the customer-side port as a hybrid port and assign the port to the SVLAN as an untagged member.

·            Configure the customer-side port as a trunk port and set the port PVID to the SVLAN.

Figure 8 One-to-two VLAN mapping implementation

As shown in Figure 9 , zero-to-two VLAN mapping is implemented on the customer-side port and processes VLAN tags as follows:

·            Adds double tags to untagged uplink traffic.

·            Removes SVLAN tags and CVLAN tags from downlink traffic.

For zero-to-two VLAN mapping to take effect, set the PVID of the customer-side port to the SVLAN.

To ensure correct transmission of downlink traffic, use one of the following methods to remove the SVLAN tag from the downlink traffic:

·            Configure the customer-side port as a n access port and assign it to the SVLAN.

·            Configure the customer-side port as a trunk port, assign it to the SVLAN, and set the port PVID to the SVLAN .

·            Configure the customer-side port as a hybrid port, assign it to the SVLAN as a n un tagged member, and set the port PVID to the SVLAN .

Figure 9 Zero-to-two VLAN mapping implementation

Two-to-two VLAN mapping

As shown in Figure 10 , two-to-two VLAN mapping is implemented on the customer-side port and replaces VLAN tags as follows:

·            Replaces the CVLAN and the SVLAN with the CVLAN' and the SVLAN' for the uplink traffic.

·            Replaces the SVLAN' and CVLAN' with the SVLAN and the CVLAN for the downlink traffic.

Figure 10 Two-to-two VLAN mapping implementation

Configuration restrictions and guidelines

If the network-side port receives both Layer 2 and Layer 3 packets, configure many-to-one VLAN mapping in enhanced mode on the customer-side port. When you configure enhanced many-to-one VLAN mapping, following these restrictions and guidelines:

·            This feature cannot work in conjunction with QinQ. For more information about QinQ, see "Configuring QinQ."

·            This feature is not supported on Layer 2 aggregate interfaces.

·            After you configure this feature on a port, the port and its VLANs do not support setting the MAC address learning limit. For more information about setting the MAC address learning limit, see "Configuring the MAC address table."

VLAN mapping configuration task list

When you configure VLAN mapping, follow these guidelines:

·            To add VLAN tags to packets, you can configure both VLAN mapping and QinQ. VLAN mapping takes effect if a configuration conflict occurs. For more information about QinQ, see "Configuring QinQ."

·            To add or replace VLAN tags for packets, you can configure both VLAN mapping and a QoS policy. The QoS policy takes effect if a configuration conflict occurs. For information about QoS policies, see ACL and QoS Configuration Guide .

To configure VLAN mapping:

Configuring one-to-one VLAN mapping

Configure one-to-one VLAN mapping on the customer-side ports of wiring-closet switches (see Figure 1 ) to isolate traffic of the same service type from different homes.

Before you configure one-to-one VLAN mapping, create the original VLAN and the translated VLAN.

To configure one-to-one VLAN mapping:

Configuring many-to-one VLAN mapping

Configure many-to-one VLAN mapping on campus switches (see Figure 1 ) to transmit the same type of traffic from different users in one VLAN.

Configuring many-to-one VLAN mapping in a network with dynamic IP address assignment

In a network that uses dynamic address assignment, configure many-to-one VLAN mapping with DHCP snooping.

The switch replaces the SVLAN tag of the downlink traffic with the associated CVLAN tag based on the DHCP snooping entry lookup.

When you configure many-to-one VLAN mapping in a network that uses dynamic address assignment, follow these restrictions and guidelines:

·            Before you configure many-to-one VLAN mapping, create the original VLANs and the translated VLANs.

·            To ensure correct traffic forwarding from the service provider network to the customer network, do not configure many-to-one VLAN mapping together with uRPF. For more information about uRPF, see Security Configuration Guide .

·            To modify many-to-one VLAN mappings, first use the reset dhcp snooping binding command to clear the DHCP snooping entries.

Many-to-one VLAN mapping configuration task list

Enabling dhcp snooping, enabling arp detection.

Enable ARP detection for the original VLANs and the translated VLANs.

To enable ARP detection:

Configuring the customer-side port

Configuring the network-side port, configuring many-to-one vlan mapping in a network with static ip address assignment.

In a network that uses static IP addresses, configure many-to-one VLAN mapping with ARP snooping.

The switch replaces the SVLAN tag of the downlink traffic with the associated CVLAN tag based on the ARP snooping entry lookup.

When you configure many-to-one VLAN mapping in a network that uses static address assignment, follow these restrictions and guidelines:

·            Make sure hosts in different CVLANs do not use the same IP address.

·            When an IP address is no longer associated with the MAC address and VLAN in an ARP snooping entry, wait for this entry to be aged out. You can also use the reset arp snooping ip ip-address command to clear the entry.

·            Before you modify many-to-one VLAN mapping, use the reset arp snooping vlan vlan-id command to clear the ARP snooping entries in each CVLAN.

Configuration task list

Enabling arp snooping.

Enable ARP snooping for the original VLANs and the translated VLANs.

To enable ARP snooping:

Configuring enhanced many-to-one VLAN mapping for Layer 2 communication

Perform this task if only Layer 2 packets are transmitted between the customer network and service provider network.

The device uses the SVLAN ID and the destination MAC address of the downlink traffic to find a matching CVLAN in the automatically assigned ACL rules. You do not need to configure network-side many-to-one VLAN mapping.

To ensure correct traffic transmission from the service provide network to the customer network, do not configure this feature when MAC address learning is disabled or the MAC address learning limit is set. For more information about MAC address learning, see "Configuring the MAC address table."

Configuring one-to-two VLAN mapping

Configure one-to-two VLAN mapping on the customer-side ports of edge devices from which customer traffic enters SP networks, for example, on PEs 1 and 4 in Figure 2 . One-to-two VLAN mapping enables the edge devices to add an SVLAN tag to each incoming packet.

Before you configure one-to-two VLAN mapping, create the SVLAN. You do no need to create the CVLAN or assign the customer-side port to the CVLAN.

The MTU of an interface is 1500 bytes by default. After a VLAN tag is added to a packet, the packet length is added by 4 bytes. As a best practice, set the MTU to a minimum of 1504 bytes for ports on the forwarding path of the packet in the service provider network.

To c onfigure one-to-two VLAN mapping:

Configuring zero-to-two VLAN mapping

As a best practice, set the MTU to a minimum of 1504 bytes for ports on the forwarding path of the double-tagged packet in the service provider network.

You must configure packets from the SVLAN to pass through the network-side port with VLAN tags.

To configure zero-to-two VLAN mapping:

Configuring two-to-two VLAN mapping

Configure two-to-two VLAN mapping on the customer-side port of an edge device that connects two SP networks, for example, on PE 3 in Figure 2 . Two-to-two VLAN mapping enables two sites in different VLANs to communicate at Layer 2 across two service provider networks that use different VLAN assignment schemes.

Before you configure two-to-two VLAN mapping, create the original VLANs and the translated VLANs.

To configure two-to-two VLAN mapping:

Displaying and maintaining VLAN mapping

Execute display commands in any view.

VLAN mapping configuration examples

One-to-one and many-to-one vlan mapping configuration example, network requirements.

As shown in Figure 11 :

·            Each household subscribes to PC, VoD, and VoIP services, and obtains the IP address through DHCP.

·            On the home gateways, VLANs 1, 2, and 3 are assigned to PC, VoD, and VoIP traffic, respectively.

To isolate traffic of the same service type from different households, configure one-to-one VLAN mappings on the wiring-closet switches. This feature assigns one VLAN to each type of traffic from each household.

To save VLAN resources, configure many-to-one VLAN mappings on the campus switch (Switch C). This feature transmits the same type of traffic from different households in one VLAN. Use VLANs 501, 502, and 503 for PC, VoD, and VoIP traffic, respectively.

Table 1 VLAN mappings for each service

Figure 11 Network diagram

Configuration procedure

1.       Configure Switch A:

# Create the original VLANs.

<SwitchA> system-view

[SwitchA] vlan 2 to 3

# Create the translated VLANs.

[SwitchA] vlan 101 to 102

[SwitchA] vlan 201 to 202

[SwitchA] vlan 301 to 302

# Configure customer-side port GigabitEthernet 1/0/1 as a trunk port.

[SwitchA] interface gigabitethernet 1/0/1

[SwitchA-GigabitEthernet1/0/1] port link-type trunk

# Assign GigabitEthernet 1/0/1 to all original VLANs and translated VLANs.

[SwitchA-GigabitEthernet1/0/1] port trunk permit vlan 1 2 3 101 201 301

# Configure one-to-one VLAN mappings on GigabitEthernet 1/0/1 to map VLANs 1, 2, and 3 to VLANs 101, 201, and 301, respectively.

[SwitchA-GigabitEthernet1/0/1] vlan mapping 1 translated-vlan 101

[SwitchA-GigabitEthernet1/0/1] vlan mapping 2 translated-vlan 201

[SwitchA-GigabitEthernet1/0/1] vlan mapping 3 translated-vlan 301

[SwitchA-GigabitEthernet1/0/1] quit

# Configure customer-side port GigabitEthernet 1/0/2 as a trunk port.

[SwitchA] interface gigabitethernet 1/0/2

[SwitchA-GigabitEthernet1/0/2] port link-type trunk

# Assign GigabitEthernet 1/0/2 to all original VLANs and translated VLANs.

[SwitchA-GigabitEthernet1/0/2] port trunk permit vlan 1 2 3 102 202 302

# Configure one-to-one VLAN mappings on GigabitEthernet 1/0/2 to map VLANs 1, 2, and 3 to VLANs 102, 202, and 302, respectively.

[SwitchA-GigabitEthernet1/0/2] vlan mapping 1 translated-vlan 102

[SwitchA-GigabitEthernet1/0/2] vlan mapping 2 translated-vlan 202

[SwitchA-GigabitEthernet1/0/2] vlan mapping 3 translated-vlan 302

[SwitchA-GigabitEthernet1/0/2] quit

# Configure the network-side port (GigabitEthernet 1/0/3) as a trunk port.

[SwitchA] interface gigabitethernet 1/0/3

[SwitchA-GigabitEthernet1/0/3] port link-type trunk

# Assign GigabitEthernet 1/0/3 to the translated VLANs.

[SwitchA-GigabitEthernet1/0/3] port trunk permit vlan 101 201 301 102 202 302

[SwitchA-GigabitEthernet1/0/3] quit

2.       Configure Switch B in the same way Switch A is configured. (Details not shown.)

3.       Configure Switch C:

# Enable DHCP snooping.

<SwitchC> system-view

[SwitchC] dhcp snooping enable

# Create the original VLANs and translated VLANs, and enable ARP detection for these VLANs.

[SwitchC] vlan 101

[SwitchC-vlan101] arp detection enable

[SwitchC-vlan101] vlan 201

[SwitchC-vlan201] arp detection enable

[SwitchC-vlan201] vlan 301

[SwitchC-vlan301] arp detection enable

[SwitchC-vlan301] vlan 102

[SwitchC-vlan102] arp detection enable

[SwitchC-vlan102] vlan 202

[SwitchC-vlan202] arp detection enable

[SwitchC-vlan202] vlan 302

[SwitchC-vlan302] arp detection enable

[SwitchC-vlan302] vlan 103

[SwitchC-vlan103] arp detection enable

[SwitchC-vlan103] vlan 203

[SwitchC-vlan203] arp detection enable

[SwitchC-vlan203] vlan 303

[SwitchC-vlan303] arp detection enable

[SwitchC-vlan303] vlan 104

[SwitchC-vlan104] arp detection enable

[SwitchC-vlan104] vlan 204

[SwitchC-vlan204] arp detection enable

[SwitchC-vlan204] vlan 304

[SwitchC-vlan304] arp detection enable

[SwitchC-vlan304] vlan 501

[SwitchC-vlan501] arp detection enable

[SwitchC-vlan501] vlan 502

[SwitchC-vlan502] arp detection enable

[SwitchC-vlan502] vlan 503

[SwitchC-vlan503] arp detection enable

[SwitchC-vlan503] quit

[SwitchC] interface gigabitethernet 1/0/1

[SwitchC-GigabitEthernet1/0/1] port link-type trunk

[SwitchC-GigabitEthernet1/0/1] port trunk permit vlan 101 102 201 202 301 302 501 to 503

# Configure many-to-one VLAN mappings on GigabitEthernet 1/0/1 to map VLANs for PC, VoD, and VoIP traffic to VLANs 501, 502, and 503, respectively.

[SwitchC-GigabitEthernet1/0/1] vlan mapping uni range 101 to 102 translated-vlan 501

[SwitchC-GigabitEthernet1/0/1] vlan mapping uni range 201 to 202 translated-vlan 502

[SwitchC-GigabitEthernet1/0/1] vlan mapping uni range 301 to 302 translated-vlan 503

# Enable DHCP snooping entry recording on GigabitEthernet 1/0/1.

[SwitchC-GigabitEthernet1/0/1] dhcp snooping binding record

[SwitchC-GigabitEthernet1/0/1] quit

[SwitchC] interface gigabitethernet 1/0/2

[SwitchC-GigabitEthernet1/0/2] port link-type trunk

[SwitchC-GigabitEthernet1/0/2] port trunk permit vlan 103 104 203 204 303 304 501 to 503

# Configure many-to-one VLAN mappings on GigabitEthernet 1/0/2 to map VLANs for PC, VoD, and VoIP traffic to VLANs 501, 502, and 503, respectively.

[SwitchC-GigabitEthernet1/0/2] vlan mapping uni range 103 to 104 translated-vlan 501

[SwitchC-GigabitEthernet1/0/2] vlan mapping uni range 203 to 204 translated-vlan 502

[SwitchC-GigabitEthernet1/0/2] vlan mapping uni range 303 to 304 translated-vlan 503

# Enable recording of client information in DHCP snooping entries on GigabitEthernet 1/0/2.

[SwitchC-GigabitEthernet1/0/2] dhcp snooping binding record

[SwitchC-GigabitEthernet1/0/2] quit

# Configure the network-side port (GigabitEthernet 1/0/3) to use the original VLAN tags of the many-to-one mappings to replace the VLAN tags of the packets destined for the user network.

[SwitchC] interface gigabitethernet 1/0/3

[SwitchC-GigabitEthernet1/0/3] vlan mapping nni

# Configure GigabitEthernet 1/0/3 as a trunk port.

[SwitchC-GigabitEthernet1/0/3] port link-type trunk

[SwitchC-GigabitEthernet1/0/3] port trunk permit vlan 501 to 503

# Configure GigabitEthernet 1/0/3 as a DHCP snooping trusted and ARP trusted port.

[SwitchC-GigabitEthernet1/0/3] dhcp snooping trust

[SwitchC-GigabitEthernet1/0/3] arp detection trust

[SwitchC-GigabitEthernet1/0/3] quit

4.       Configure Switch D:

<SwitchD> system-view

[SwitchD] vlan 501 to 503

# Configure GigabitEthernet 1/0/1 as a trunk port.

[SwitchD] interface gigabitethernet 1/0/1

[SwitchD-GigabitEthernet1/0/1] port link-type trunk

# Assign GigabitEthernet 1/0/1 to the translated VLANs.

[SwitchD-GigabitEthernet1/0/1] port trunk permit vlan 501 to 503

[SwitchD-GigabitEthernet1/0/1] quit

Verifying the configuration

# Verify VLAN mapping information on the wiring-closet switches, for example, Switch A.

[SwitchA] display vlan mapping

Interface GigabitEthernet1/0/1:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  1             N/A           101                      N/A

  2             N/A           201                      N/A

  3             N/A           301                      N/A

Interface GigabitEthernet1/0/2:

  1             N/A           102                      N/A

  2             N/A           202                      N/A

  3             N/A           302                      N/A

# Verify VLAN mapping information on Switch C.

[SwitchC] display vlan mapping

  101-102       N/A           501                      N/A

  201-202       N/A           502                      N/A

  301-302       N/A           503                      N/A

  103-104       N/A           501                      N/A

  203-204       N/A           502                      N/A

  303-304       N/A           503                      N/A

One-to-two and two-to-two VLAN mapping configuration example

As shown in Figure 12 :

·            Two VPN A branches, Site 1 and Site 2, are in VLAN 5 and VLAN 6, respectively.

·            The two sites use different VPN access services from different service providers, SP 1 and SP 2.

·            SP 1 assigns VLAN 100 to Site 1 and Site 2. SP 2 assigns VLAN 200 to Site 1 and Site 2.

Configure one-to-two VLAN mappings and two-to-two VLAN mappings to enable the two branches to communicate across networks SP 1 and SP 2.

Figure 12 Network diagram

1.       Configure PE 1:

# Create VLANs 5 and 100.

<PE1> system-view

[PE1] vlan 5

[PE1-vlan5] quit

[PE1] vlan 100

[PE1-vlan100] quit

# Configure a one-to-two VLAN mapping on the customer-side port (GigabitEthernet 1/0/1) to add SVLAN tag 100 to packets from VLAN 5.

[PE1] interface gigabitethernet 1/0/1

[PE1-GigabitEthernet1/0/1] vlan mapping nest single 5 nested-vlan 100

# Configure GigabitEthernet 1/0/1 as a hybrid port.

[PE1-GigabitEthernet1/0/1] port link-type hybrid

# Assign GigabitEthernet 1/0/1 to VLAN 100 as an untagged member.

[PE1-GigabitEthernet1/0/1] port hybrid vlan 100 untagged

[PE1-GigabitEthernet1/0/1] quit

# Configure the network-side port (GigabitEthernet 1/0/2) as a trunk port.

[PE1] interface gigabitethernet 1/0/2

[PE1-GigabitEthernet1/0/2] port link-type trunk

# Assign GigabitEthernet 1/0/2 to VLAN 100.

[PE1-GigabitEthernet1/0/2] port trunk permit vlan 100

[PE1-GigabitEthernet1/0/2] quit

2.       Configure PE 2:

# Create VLAN 100.

<PE2> system-view

[PE2] vlan 100

[PE2-vlan100] quit

[PE2] interface gigabitethernet 1/0/1

[PE2-GigabitEthernet1/0/1] port link-type trunk

# Assign GigabitEthernet 1/0/1 to VLAN 100.

[PE2-GigabitEthernet1/0/1] port trunk permit vlan 100

[PE2-GigabitEthernet1/0/1] quit

# Configure GigabitEthernet 1/0/2 as a trunk port.

[PE2] interface gigabitethernet 1/0/2

[PE2-GigabitEthernet1/0/2] port link-type trunk

[PE2-GigabitEthernet1/0/2] port trunk permit vlan 100

[PE2-GigabitEthernet1/0/2] quit

3.       Configure PE 3:

# Create VLANs 5, 6, 100, and 200.

<PE3> system-view

[PE3] vlan 5 to 6

[PE3] vlan 100

[PE3-vlan100] quit

[PE3] vlan 200

[PE3-vlan200] quit

[PE3] interface gigabitethernet 1/0/1

[PE3-GigabitEthernet1/0/1] port link-type trunk

# Assign GigabitEthernet 1/0/1 to VLANs 100 and 200.

[PE3-GigabitEthernet1/0/1] port trunk permit vlan 100 200

# Configure a two-to-two VLAN mapping on GigabitEthernet 1/0/1 to map SVLAN 100 and CVLAN 5 to SVLAN 200 and CVLAN 6.

[PE3-GigabitEthernet1/0/1] vlan mapping tunnel 100 5 translated-vlan 200 6

[PE3-GigabitEthernet1/0/1] quit

[PE3] interface gigabitethernet 1/0/2

[PE3-GigabitEthernet1/0/2] port link-type trunk

# Assign GigabitEthernet 1/0/2 to VLAN 200.

[PE3-GigabitEthernet1/0/2] port trunk permit vlan 200

[PE3-GigabitEthernet1/0/2] quit

4.       Configure PE 4:

# Create VLANs 6 and 200.

<PE4> system-view

[PE4] vlan 6

[PE4-vlan6] quit

[PE4] vlan 200

[PE4-vlan200] quit

# Configure the network-side port (GigabitEthernet 1/0/1) as a trunk port.

[PE4] interface gigabitethernet 1/0/1

[PE4-GigabitEthernet1/0/1] port link-type trunk

# Assign GigabitEthernet 1/0/1 to VLAN 200.

[PE4-GigabitEthernet1/0/1] port trunk permit vlan 200

[PE4-GigabitEthernet1/0/1] quit

# Configure the customer-side port (GigabitEthernet 1/0/2) as a hybrid port.

[PE4] interface gigabitethernet 1/0/2

[PE4-GigabitEthernet1/0/2] port link-type hybrid

# Assign GigabitEthernet 1/0/2 to VLAN 200 as an untagged member.

[PE4-GigabitEthernet1/0/2] port hybrid vlan 200 untagged

# Configure a one-to-two VLAN mapping on GigabitEthernet 1/0/2 to add SVLAN tag 200 to packets from VLAN 6.

[PE4-GigabitEthernet1/0/2] vlan mapping nest single 6 nested-vlan 200

[PE4-GigabitEthernet1/0/2] quit

# Verify VLAN mapping information on PE 1.

[PE1] display vlan mapping

  5             N/A           100                      5

# Verify VLAN mapping information on PE 3.

[PE3] display vlan mapping

  100           5             200                      6

# Verify VLAN mapping information on PE 4.

[PE4] display vlan mapping

  6             N/A           200                      6

InterConnect

Intelligent computing, smb products, intelligent terminal products.

  • Cloud Computing
  • Computing Virtualization
  • Distributed Storage
  • Virtual Desktop

H3C Workspace Cloud Desktop

H3C UIS 3000 G5 HCI

  • Application-Driven Data Center (AD-DC)
  • Application-Driven Wide Area Network (AD-WAN)
  • Application-Driven Campus Network (AD-Campus)
  • Network Management
  • Operating System
  • UniServer Series
  • Server Intelligent Management Platform

H3C UniServer R4900 G5 Server

  • Boundary Security
  • Application Security
  • Security Management

Situational Awareness

Zero Trust Security Solution

  • Home Router
  • MagicSwitch
  • Star Products
  • Whole-House Wi-Fi
  • Manufacturing
  • Transportation
  • TV Solution
  • SMB Solutions

The Government Cloud “1+N+N+1” Innovation Model Becomes a Template

Strong Support for the G20 Hangzhou Summit

Product Support Services

Technical service solutions.

  • Maintenance Service
  • Product Deployment Services
  • Support Service For Cloud Software
  • Unified Operations
  • Cloud Computing Services
  • Security Services and Operations
  • H3C IC7000 Prefabricated Container Data Center

Online Help

  • Software Download
  • Technical Documents
  • Service Bulletin
  • Product Life Cycle Management Strategy
  • Star-rated Service Certification
  • Service and Warranty
  • License Service
  • Warranty Query
  • H3C Product Anti-Counterfeit Query
  • Service Hotlines
  • Web to Case
  • Repair & Replace
  • H3C Support APP
  • Security Vulnerability Announcement
  • Knowledge Base
  • Software License Validity Update
  • Certification Programs
  • Product Training
  • College Services
  • Certificate Query
  • Online E-Books

Partner Resources

Partner business management.

  • Channel Service
  • Find The H3C Partner
  • Channel Policy & Bulletin
  • e-Learning Center
  • Marketing Resources
  • H3C Configurator
  • H3C Products Job Qualification Certificate
  • Product Specifications
  • Service Qualification Query
  • Business Profile
  • Find Your Order
  • Self-service Inquiry System

News & Events

  • Company Information
  • President´s Message
  • Success Stories
  • Navigator Culture
  • Corporate Social Responsibility
  • Ethics & Compliance

新华三官网

IMAGES

  1. VLAN Mapping for Cisco ASA Firewall in Transparent Mode

    vlan mapping configuration

  2. Configure VLAN Mapping on a Switch through the CLI

    vlan mapping configuration

  3. Lab 3.5.1: Basic VLAN Configuration

    vlan mapping configuration

  4. Cisco Content Hub

    vlan mapping configuration

  5. What Is A VLAN

    vlan mapping configuration

  6. Support

    vlan mapping configuration

VIDEO

  1. 29-Switching: VLANs Configuration Part 2

  2. 56 SWITCH 2 0 Multiple Spanning Tree Protocol VLAN Mapping

  3. simple VLAN

  4. 26

  5. 114- VLANs 4

  6. 03 vlan part-2

COMMENTS

  1. Configure VLAN Mapping on a Switch

    To establish Service Provider Virtual Local Area Networks (S-VLANs), you can configure VLAN mapping or VLAN ID translation on trunk ports that are connected to a customer network. This will map customer VLANs to service provider.

  2. PDF Configuring VLAN Mapping

    On an interface configured for VLAN mapping, the specified C-VLAN packets are mapped to the specified S-VLAN when they enter the port. Symmetrical mapping back to the customer C-VLAN occurs when packets exit the port. The switch supports these types of VLAN mapping on UNI trunk ports:

  3. Cisco Content Hub

    This chapter describes how to configure your access point to operate with the VLANs set up on your wired LAN Understanding VLANs Configuring VLANs VLAN Configuration Example Understanding VLANs A VLAN is a switched network that is logically segmented, by functions, project teams, or applications rather than on a physical or geographical basis.

  4. Configuring 802.1Q Tunneling, VLAN Mapping, and Layer 2 ...

    • Configuring VLAN Mapping • About Layer 2 Protocol Tunneling • Configuring Layer 2 Protocol Tunneling • Monitoring and Maintaining Tunneling Status

  5. Cisco Content Hub

    Configuration Guidelines for VLAN Mapping How to Configure VLAN Mapping Feature History for VLAN Mapping Prerequisites for VLAN Mapping By default, no VLAN mapping is configured. Ensure that you run the Network Advantage license. VLAN Mapping is supported only with the Network Advantage license level.

  6. One-to-one and many-to-one VLAN mapping configuration example

    # Verify VLAN mapping information on the wiring-closet switches, for example, Switch A. [SwitchA] display vlan mapping Interface HundredGigE1/0/1: Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN 1 N/A 101 N/A 2 N/A 201 N/A 3 N/A 301 N/A Interface HundredGigE1/0/2: Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN 1 N/A 102 N/A 2 N/A 202 N/A 3 N/A 302 N/A

  7. Overview of VLAN Mapping

    This document describes the configuration of Ethernet services, including configuring link aggregation, VLANs, Voice VLAN, VLAN mapping, QinQ, GVRP, MAC table, STP/RSTP/MSTP, SEP, and so on. Support Documentation Switches Campus Switch S1700&S2700 Configuration & Commissioning Configuration Guide

  8. Configure VLAN Mapping on a Switch through the CLI

    Configure VLAN Mapping on a Switch through the CLI smallbusiness Community Manager 06-26-2018 01:59 PM - edited ‎03-21-2019 12:51 AM Article ID:5822 Introduction To establish Service Provider Virtual Local Area Networks (S-VLANs), you can configure VLAN mapping or VLAN ID translation on trunk ports that are connected to a customer network.

  9. VLAN access-map (VACL) Example Configuration on Cisco Switch

    A Vlan access-map is placed on the whole Vlan, which means that the incoming and outgoing traffic in a Vlan are filterd by the VLan access-map. We can apply a VLAN access-map to a Layer3 access-list and also to a mac access-list.

  10. vlan mapping

    network-admin Parameters vlan-id translated-vlan vlan-id: Specifies the original VLAN and translated VLAN for a one-to-one VLAN mapping. The value range for the vlan-id argument is 1 to 4094. The original VLAN and the translated VLAN cannot be the same.

  11. Understanding VLAN Mapping

    This document describes the configuration of Ethernet services, including configuring link aggregation, VLANs, Voice VLAN, VLAN mapping, QinQ, GVRP, MAC table, STP/RSTP/MSTP, SEP, and so on. Ethernet Switching Features Supported in This Version Ethernet Switching MAC Address Table Configuration Link Aggregation Configuration VLAN Configuration

  12. VLAN Mapping Configuration Commands

    VLAN Mapping Configuration Commands GVRP Configuration Commands VCMP Configuration Commands STP/RSTP/MSTP/VBST Configuration Commands RRPP Configuration Commands ERPS (G.8032) Configuration Commands Loopback Detection Configuration Commands Layer 2 Protocol Transparent Transmission Commands IP Service Commands IP Unicast Routing Commands

  13. PDF Configuring VLAN Mapping

    Note When you configure features on a port configured for VLAN mapping, you always use the S-VLAN rather than the customer VLAN-ID (C-VLAN). On an interface configured for VLAN mapping, the specified C-VLAN packets are mapped to the specified S-VLAN when they enter the port.

  14. Support

    As shown in Figure 1, the network is implemented as follows: · Each home gateway uses different VLANs to transmit the PC, VoD, and VoIP services. · To further subclassify each type of traffic by customer, configure one-to-one VLAN mapping on the wiring-closet switches. This feature assigns a separate VLAN to each type of traffic from each customer.

  15. Cisco Content Hub

    Enter interface configuration mode for the interface connected to the service-provider network. You can enter a physical interface or an EtherChannel port channel. Step 3. switchport mode trunk. Configure the interface as a trunk port. Step 4. switchport vlan mapping vlan-id translated-id.

  16. PDF Configuring VLAN Mapping

    Device(config-if)# end Prerequisites for One to One VLAN Mapping • One-to-One VLAN mapping can be configured only on trunk ports and not on dynamic trunk. Restrictions for VLAN Mapping One-to-One VLAN mapping should be identical on both ports.

  17. Support

    Overview VLAN mapping re-marks VLAN tagged traffic with new VLAN IDs. H3C provides the following types of VLAN mapping: · One-to-one VLAN mapping—Replaces one VLAN tag with another. · Many-to-one VLAN mapping—Replaces multiple VLAN tags with the same VLAN tag. · One-to-two VLAN mapping—Tags single-tagged packets with an outer VLAN tag.