03-Layer 2—LAN Switching Command Reference

HomeSupportSwitchesIE4320 SeriesReference GuidesCommand ReferencesH3C IE4320-EI[IEF4320-EI] Command References-R68xx-6W10003-Layer 2—LAN Switching Command Reference
07-VLAN mapping commands
Title Size Download
07-VLAN mapping commands 64.10 KB

VLAN mapping commands

display vlan mapping

Use display vlan mapping to display VLAN mapping information.

Syntax

display vlan mapping [ interface interface-type interface-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, the command displays VLAN mapping information on all interfaces.

Examples

# Display VLAN mapping information on all interfaces.

<Sysname> display vlan mapping

 

Interface GigabitEthernet1/0/1:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  10            N/A           120                      N/A

 

Interface GigabitEthernet1/0/2:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  1024-4094     N/A           100                      N/A

 

Interface GigabitEthernet1/0/3:

  Outer VLAN    Inner VLAN    Translated Outer VLAN    Translated Inner VLAN

  12            N/A           110                      12

 

Table 1 Command output

Field

Description

Outer VLAN

Original outer VLAN.

This field indicates the original VLAN for one-to-one VLAN mapping, many-to-one VLAN mapping, and one-to-two VLAN mapping.

Inner VLAN

Original inner VLAN.

This field displays N/A for one-to-one VLAN mapping, many-to-one VLAN mapping, and one-to-two VLAN mapping.

Translated Outer VLAN

Translated outer VLAN.

This field indicates the translated VLAN for one-to-one VLAN mapping and many-to-one VLAN mapping.

Translated Inner VLAN

Translated inner VLAN.

This field displays N/A for one-to-one VLAN mapping and many-to-one VLAN mapping.

Related commands

vlan mapping

vlan mapping

Use vlan mapping to configure VLAN mapping on an interface.

Use undo vlan mapping to cancel the VLAN mapping configuration.

Syntax

vlan mapping { vlan-id translated-vlan vlan-id | nest { range vlan-range-list | single vlan-id-list } nested-vlan vlan-id | uni 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 | uni single vlan-id-list translated-vlan vlan-id  }

Default

No VLAN mapping is configured on an interface.

Views

Layer 2 Ethernet interface view

Layer 2 aggregate interface view

Predefined user roles

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.

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 in common mode 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 value for the vlan-id2 argument must be greater than the value for the vlan-id1 argument. The value range for the vlan-id argument is 1 to 4094. Different VLAN ranges cannot overlap. Any of the original VLANs cannot be the same as the translated VLAN.

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 format of vlan-id1 to vlan-id2. The value range for CVLAN IDs is 1 to 4094. The value for the vlan-id2 argument must be greater than the value for the vlan-id1 argument. 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, each of which is in the range of 1 to 4094. The vlan-id argument specifies the SVLAN ID in the range of 1 to 4094.

all: Deletes all VLAN mapping configurations from the interface.

Usage guidelines

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

The original and translated VLANs in VLAN mappings on an interface must meet the following requirements:

·     Different types of VLAN mapping entries cannot include the same original VLANs or translated VLANs.

·     Different one-to-one VLAN mapping entries cannot include the same translated VLANs. If you configure multiple one-to-one VLAN mapping entries for the same original VLANs, the most recent configuration takes effect.

When you configure many-to-one VLAN mappings, following these restrictions and guidelines:

·     You can configure only one many-to-one VLAN mapping on the same interface. To modify the many-to-one VLAN mapping, perform the following tasks:

a.     Execute the undo vlan mapping command to delete the existing many-to-one VLAN mapping.

b.     Configure another many-to-one VLAN mapping.

·     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.

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

Before you enable or disable QinQ on a port, you must remove all VLAN mappings on the port.

If you use both transparent VLANs and VLAN mappings on an interface, the transparent VLANs cannot be the following VLANs:

·     Original or translated VLANs of one-to-one, many-to-one, and one-to-two VLAN mappings.

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 on the service provider network.

Examples

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

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

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

# Configure many-to-one VLAN mappings on the customer-side port (GigabitEthernet 1/0/2) to map VLANs 1 through 50 to VLAN 101.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/2

[Sysname-GigabitEthernet1/0/2] vlan mapping uni range 1 to 50 translated-vlan 101

[Sysname-GigabitEthernet1/0/2] quit

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

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/4

[Sysname-GigabitEthernet1/0/4] vlan mapping nest range 1 to 10 nested-vlan 101

[Sysname-GigabitEthernet1/0/4] vlan mapping nest single 80 nested-vlan 101

Related commands

display vlan mapping

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网