No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

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.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
VLAN Mapping Configuration Commands

VLAN Mapping Configuration Commands

port vlan-mapping

Function

The port vlan-mapping command configures an interface to map tags in packets.

The undo port vlan-mapping command cancels the configuration.

By default, an interface is not configured to map tags in packets.

NOTE:

CE6880EI does not support this command.

Format

  • 1 to 1 VLAN mapping maps a tag in packets to a specified tag.(CE6870EI only supports this method)

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

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

  • 2 to 1 VLAN mapping maps the outer tag in double-tagged packets to a specified tag and transparently transmits the inner tag.

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

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

  • 2 to 2 VLAN mapping maps double tags in packets to specified double tags.

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

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

Parameters

Parameter Description Value
vlan vlan-id1

Specifies the VLAN ID carried in the received packet.

If packets carry double tags, this parameter specifies the outer VLAN ID.

The value is an integer that ranges from 1 to 4094.
map-vlan vlan-id3

Specifies the mapped VLAN ID.

If packets carry double tags, this parameter specifies the mapped outer VLAN ID.

The value is an integer that ranges from 1 to 4094. The VLAN cannot be the reserved VLAN configured by the vlan reserved command.

remark-8021p 8021p-value

Specifies the re-marked 802.1p priority of the mapped tag.

If remark-8021p is specified, an interface maps the VLAN ID in the received single-tagged packet to a specified tag and changes the 802.1p priority in the mapped tag.

NOTE:
  • CE6870EI does not support this parameter.

  • On the CE5810EI, if remark-8021p is specified, the 802.1p priorities in mapped inner and outer tags of double-tagged packets are changed.

  • On other models, if remark-8021p is specified, the 802.1p priority in the mapped outer tag of double-tagged packets is changed.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority.

inner-vlan vlan-id2

Specifies the inner VLAN ID in received packets.

NOTE:
CE6870EI does not support this parameter.

The value of vlan-id2 is an integer that ranges from 1 to 4094.

map-inner-vlan vlan-id4

Specifies the mapped inner VLAN ID.

NOTE:
CE6870EI does not support this parameter.

The value of vlan-id4 is an integer that ranges from 1 to 4094.

all Cancels the mapping for one or double tags in packets. -

Views

GE interface view, 10GE interface view, 25GE interface view, 40GE interface view, 100GE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To allow users on the same network segment to communicate, run the port vlan-mapping command to configure an interface on a network edge device to map the VLAN ID (VLAN IDs) in received single-tagged or double-tagged packets to a specified VLAN ID (VLAN IDs).

Precautions

  • VLAN mapping can only be configured on a trunk or hybrid interface. The interface must be added to the VLAN after mapping in tagged mode.

  • If the trill enable command has been executed, delete the trill enable command configuration before running the port vlan-mapping command.

  • If forwarding resources exceed the specifications, VLAN mapping can be configured. However, after the device restarts, the invalid VLAN mapping configuration may become valid and valid VLAN mapping configuration may become invalid.

  • After the port vlan-mapping command is run to map tags of packets in different modes and a VLANIF interface is configured for the mapped VLAN, L3 traffic on the VLANIF interface cannot be forwarded on physical interfaces with VLAN mapping configured.

Example

# Configure 1 to 1 VLAN mapping to map VLAN 100 of the received packet to VLAN 10 before the packet is forwarded.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] port link-type trunk
[*HUAWEI-10GE1/0/1] port trunk allow-pass vlan 10
[*HUAWEI-10GE1/0/1] port vlan-mapping vlan 100 map-vlan 10
# Configure 2 to 1 VLAN mapping to map outer VLAN 100 of the received packet to outer VLAN 10 and to transparently transmit inner VLAN 200 in the received packet.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] port link-type trunk
[*HUAWEI-10GE1/0/1] port trunk allow-pass vlan 10
[*HUAWEI-10GE1/0/1] port vlan-mapping vlan 100 inner-vlan 200 map-vlan 10
# Configure 2 to 2 VLAN mapping to map outer VLAN 100 and inner VLAN 200 of the received packet to outer VLAN 10 and inner VLAN 20 before the packet is forwarded.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] port link-type trunk
[*HUAWEI-10GE1/0/1] port trunk allow-pass vlan 10
[*HUAWEI-10GE1/0/1] port vlan-mapping vlan 100 inner-vlan 200 map-vlan 10 map-inner-vlan 20

vlan-mapping (traffic behavior view)

Function

The vlan-mapping command configures an action of replacing the VLAN ID in a traffic behavior.

The undo vlan-mapping command cancels the configuration.

By default, an action of replacing the VLAN ID in a traffic behavior is not configured.

NOTE:

Only the CE6870EI does not support this command.

Format

vlan-mapping { vlan vlan-id | inner-vlan inner-vlan-id }

undo vlan-mapping { vlan | inner-vlan }

Parameters

Parameter

Description

Value

vlan vlan-id

Specifies the outer VLAN tag in VLAN packets.

The value is an integer that ranges from 1 to 4094.

inner-vlan inner-vlan-id

Specifies the inner VLAN tag in VLAN packets.

The value is an integer that ranges from 1 to 4094.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To allow user packets to be transmitted on the ISP network, configure the device to change VLAN tags in the user packets to VLAN tags supported by the ISP network before the user packets enter the ISP network. This technology is called VLAN mapping. The vlan-mapping command configures VLAN mapping based on services or users in a traffic behavior.

NOTE:

To replace inner and outer VLAN tags, run the vlan-mapping vlan vlan-id and vlan-mapping inner-vlan inner-vlan-id commands in the traffic behavior view.

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 VLAN tag re-marking.

Precautions

vlan-mapping can be configured together with only deny, permit, mac-address learning disable, and remark 8021p in the same traffic behavior in the inbound direction.

Example

# Configure the device to replace the outer VLAN tag with VLAN 200.

<HUAWEI> system-view
[~HUAWEI] traffic behavior tb
[*HUAWEI-behavior-tb] vlan-mapping vlan 200
# Configure the device to replace the outer VLAN tag with 200 and inner VLAN tag with 300.
<HUAWEI> system-view
[~HUAWEI] traffic behavior tb
[*HUAWEI-behavior-tb] vlan-mapping vlan 200
[*HUAWEI-behavior-tb] vlan-mapping inner-vlan 300
Related Topics
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 68724

Downloads: 374

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next