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

S12700 V200R013C00 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.
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).
QinQ Configuration Commands

QinQ Configuration Commands

Command Support

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.

add-tag vlan-id

Function

The add-tag vlan-id command configures an action of adding an outer VLAN tag in a traffic behavior.

The undo add-tag command deletes the action.

By default, no action of adding an outer VLAN tag is configured in a traffic behavior.

Format

add-tag vlan-id vlan-id

undo add-tag

Parameters

Parameter

Description

Value

vlan-id

Specifies the VLAN ID in the outer VLAN tag.

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

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the downstream device needs to provide services based on the outer VLAN tag, run the add-tag vlan-id command to configure the device to add an outer VLAN tag to packets matching the traffic classifier.

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 adding an outer VLAN tag.

Precautions

  • When a traffic classifier defines if-match ipv6 acl { acl-number | acl-name }, add-tag vlan-id vlan-id cannot be configured on the X series cards.
  • After the add-tag vlan-id, remark 8021p, remark cvlan-id or remark vlan-id command is used, the system modifies the VLAN tag of packets according to its configuration. The behavior configured through these commands is called VLAN-based action.

    To apply a VLAN-based action and a non-VLAN-based action to the same upstream traffic policy, configure the VLAN-based action and non-VLAN-based action in different traffic behaviors bound to the same traffic policy.

  • A traffic policy is bound to multiple pairs of traffic classifiers and traffic behaviors. If a traffic behavior contains add-tag vlan-id and a traffic classifier bound to another traffic behavior defines if-match vlan-id, the VLAN ID specified by add-tag vlan-id is matched. If another traffic behavior defines if-match cvlan-id, the VLAN ID in the packets is matched.
  • The add-tag vlan-id command is invalid for double-tagged VLAN packets.

  • When port vlan-stacking, port vlan-stacking untagged, or port link-type dot1q-tunnel is configured on an interface to add a VLAN tag to packets so that packets carry double VLAN tags, the add-tag vlan-id command is invalid for the double-tagged VLAN packets.

  • If you run the add-tag vlan-id command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure an action of adding an outer VLAN tag for traffic behavior tb to 100.

<HUAWEI> system-view
[HUAWEI] traffic behavior tb
[HUAWEI-behavior-tb] add-tag vlan-id 100

display spare-bucket resource

Function

The display spare-bucket resource command displays the usage of backup resources when VLAN translation resources conflict.

Format

display spare-bucket resource [ slot slot-number ]

NOTE:

Only the X series cards support this command.

Parameters

Parameter

Description

Value

slot slot-number

Specifies the slot ID where the usage of backup resources is displayed.

The value is an integer and must be the ID of an existing slot on the device.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The command displays the usage of backup VLAN translation resources, including the total number of backup VLAN translation resources, and the numbers of used and remaining backup VLAN translation resources. The command output helps you manage backup VLAN translation resources and locate the problem of ineffective VLAN mapping due to insufficient resources.

When no slot ID is specified, the usage of backup VLAN translation resources in all slots is displayed.

Example

# Display the usage of backup VLAN translation resources in slot 3.

<HUAWEI> display spare-bucket resource slot 3
------------------------------------------------------------                                                                        
 Slot                Used          Free          Total                                                                              
------------------------------------------------------------                                                                        
 3                   0             66            66             
Table 5-66  Description of the display spare-bucket resource command output

Item

Description

Slot

Slot ID

Used

Number of used backup VLAN translation resources.

Free

Number of remaining backup VLAN translation resources.

Total

Total number of backup VLAN translation resources.

display vlan-translation resource

Function

The display vlan-translation resource command displays VLAN translation resource usage.

Format

display vlan-translation resource [ slot slot-number ]

Parameters

Parameter

Description

Value

slot slot-number

Displays VLAN translation resource usage in a specified slot.

The value is an integer and must be an existing slot on the device.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display vlan-translation resource command displays VLAN translation resource usage, including 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 manage VLAN translation resources, and locate faults of insufficient VLAN translation resources caused by VLAN Mapping, Selective QinQ or QinQ Mapping.

Example

# Display VLAN translation resource usage on a card in slot 5.

<HUAWEI> display vlan-translation resource slot 5
 Interface:
   GigabitEthernet5/0/0 to GigabitEthernet5/0/47
-------------------------------------------------
 Type      Total      Configured      Remaining
-------------------------------------------------
 Ingress   65536      0               65536      
 Egress    65536      0               65536      
Table 5-67  Description of the display vlan-translation resource command output

Item

Description

Interface

Interface where VLAN translation is performed.

Type

VLAN translation resource type, which can be Ingress or Egress.

Total

Total number of VLAN translation resources.

Configured

Number of used VLAN translation resources.

Remaining

Number of remaining VLAN translation resources.

port add-tag acl

Function

The port add-tag acl command adds an outer tag to the packet that matches an ACL rule on an interface.

The undo port add-tag acl command cancels the configuration.

By default, the device does not add an outer tag to the packet that matches an ACL rule.

Format

port add-tag acl { acl-number | name acl-name } [ rule rule-id ] vlan vlan-id { priority-inherit | remark-8021p 8021p-value }

undo port add-tag acl { acl-number | name acl-name } [ rule rule-id ]

If both Layer 2 ACLs and Layer 3 ACLs are configured, use the following command:

port add-tag acl l2-acl [ rule rule-id ] [ acl { basic-acl | advance-acl | name acl-name } [ rule rule-id ] ] vlan vlan-id { priority-inherit | remark-8021p 8021p-value }

port add-tag acl { basic-acl | advance-acl } [ rule rule-id ] [ acl { l2-acl | name acl-name } [ rule rule-id ] ] vlan vlan-id { remark-8021p 8021p-value | priority-inherit }

port add-tag acl name acl-name [ rule rule-id ] [ acl { basic-acl | advance-acl | l2-acl | name acl-name } [ rule rule-id ] ] vlan vlan-id { remark-8021p 8021p-value | priority-inherit }

undo port add-tag acl l2-acl [ rule rule-id ] [ acl { basic-acl | advance-acl | name acl-name } [ rule rule-id ] ]

undo port add-tag acl { basic-acl | advance-acl } [ rule rule-id ] [ acl { l2-acl | name acl-name } [ rule rule-id ] ]

undo port add-tag acl name acl-name [ rule rule-id ] [ acl { basic-acl | advance-acl | l2-acl | name acl-name } [ rule rule-id ] ]

Parameters

Parameter

Description

Value

acl-number

Specifies the number of an ACL.

The value is an integer that ranges from 2000 to 4999. The value ranges of different types of ACLs are as follows:
  • The value of a basic ACL ranges from 2000 to 2999.
  • The value of an advanced ACL ranges from 3000 to 3999.
  • The value of a Layer 2 ACL ranges from 4000 to 4999.

rule-id

Specifies the ID of an ACL rule.

The value of an IPv4 ACL ranges from 0 to 4294967294.
  • When the rule ID is specified and the rule associated with the rule ID exists, the new rule takes effect.
  • If the rule associated with the rule ID does not exist, you can create a new rule with a specified rule ID and add the rule according to the rule ID.
NOTE:

The number of ACL rules assigned automatically by the device starts from the step. The default step is 5. With this step, the device creates ACL rules with the numbers of 5, 10, 15, and so on.

name acl-name

Specifies a named ACL.

The value must the name of an existing ACL.

vlan vlan-id

Specifies a VLAN ID.

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

l2-acl

Specifies the number of a Layer 2 ACL.

The value is an integer that ranges from 4000 to 4999.

basic-acl

Specifies the number of a basic ACL.

The value is an integer that ranges from 2000 to 2999.

advance-acl

Specifies the number of an advance ACL.

The value is an integer that ranges from 3000 to 3999.

priority-inherit

Indicates that the outer VLAN tag inherits the priority in the inner VLAN tag.

-

remark-8021p 8021p-value

Specifies the re-marked priority of the added outer VLAN tag. 8021p-value specifies the 802.1p priority.

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

Views

GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A device interface adds the specified outer tag to a packet based on the VLAN tag, MAC address, IP protocol, source address, destination address, priority, or port number of an application of a user.

Precautions

  • After you run the port add-tag acl command, the following situations may occur:

    • The device does not take the original forwarding action to forward the packet that matches an ACL rule. Instead, the device adds an outer tag to the packet and forwards the packet in the VLAN specified by the added outer tag.
    • The device adds an outer tag to the packet that does not match an ACL rule based on the default VLAN of an interface.
  • A Layer 2 ACL and a Layer 3 ACL can be set in the port add-tag acl command simultaneously. The Layer 3 ACL and its rules can be configured only after the Layer 2 ACL and its rules are configured. The Layer 2 ACL number ranges from 4000 to 4999 and the Layer 3 ACL number ranges from 2000 to 2999 and 3000 to 3999.

  • This command is invalid for packets tagged with VLAN 0. If packets tagged with VLAN 0 need to be processed, configure a traffic policy on the switch.

Example

# Add the outer tag of VLAN 1001 to the packet that matches the source IP address of 192.168.0.0/16 on GE1/0/1.

<HUAWEI> system-view
[HUAWEI] acl name test 2000 
[HUAWEI-acl-basic-test] rule 1 permit source 192.168.0.0 0.0.255.255
[HUAWEI-acl-basic-test] quit
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type trunk
[HUAWEI-GigabitEthernet1/0/1] port trunk allow-pass vlan all
[HUAWEI-GigabitEthernet1/0/1] port add-tag acl 2000 rule 1 vlan 1001 priority-inherit 

port vlan-stacking

Function

The port vlan-stacking command configures VLAN stacking.

The undo port vlan-stacking command cancels the configuration.

By default, VLAN stacking is not configured.

Format

port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] stack-vlan vlan-id3 [ remark-8021p 8021p-value1 ]

undo port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] [ stack-vlan vlan-id3 ]

undo port vlan-stacking all

Parameters

Parameter

Description

Value

vlan vlan-id1 [ to vlan-id2 ]

Specifies the VLAN ID in a received tagged frame.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The value of vlan-id2 must be larger than the value of vlan-id1. vlan-id1 and vlan-id2 identify a VLAN range.

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

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

stack-vlan vlan-id3

Specifies the outer VLAN ID added to a frame.

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

remark-8021p 8021p-value1

Specifies the re-marked 802.1p priority in the outer tag added to a frame.

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

all

Deletes all VLAN stacking configurations on the interface.

-

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

VLAN stacking, also called selective QinQ, is a Layer 2 technology that enables a device to add outer VLAN tags based on VLAN IDs.

When frames are transmitted on the ISP network, the frames are differentiated based on user applications, access sites, or access devices. A device enabled with VLAN stacking adds outer tags to user frames based on the inner tags or priorities in the user frames so that traffic from different users are differentiated. A VLAN stacking interface has the following features:
  • A VLAN stacking port can be configured with multiple outer VLAN tags so that the port can add different outer VLAN tags to different VLAN frames.

  • A VLAN stacking interface can add the outer tag to received frames. After an interface joins the stacked VLAN in untagged mode, the interface removes the outer tag from outgoing frames.

When remark-8021p 8021p-value is not specified, the 802.1p priority in the outer VLAN tag on the SA cards of S series is 0. On other cards, the 802.1p priority in the outer VLAN tag is the same as the 802.1p priority in the inner VLAN tag.

Precautions

When you configure selective QinQ, note the following points:
  • Selective QinQ is recommended to be enabled on a hybrid interface. Selective QinQ can take effect on the interface only in the inbound direction.
  • The outer VLAN must be created before VLAN stacking is performed.
  • When an interface configured with VLAN stacking needs to remove the outer tag from outgoing frames, the interface must join the VLAN specified by stack-vlan in untagged mode. If the outer VLAN does not need to be removed, the interface must join the VLAN specified by stack-vlan in tagged mode.

Example

# On GE1/0/1, configure selective QinQ and outer VLAN tag 100 to the tagged frames with the inner VLAN tags 10 to 13.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[HUAWEI-GigabitEthernet1/0/1] port vlan-stacking vlan 10 to 13 stack-vlan 100
Related Topics

port vlan-stacking untagged

Function

The port vlan-stacking untagged command configures a device to add double VLAN tags to an untagged frame.

The undo port vlan-stacking untagged command cancels the configuration.

By default, the device does not add double tags to an untagged frame.

Format

port vlan-stacking untagged stack-vlan vlan-id1 stack-inner-vlan vlan-id2

undo port vlan-stacking untagged

Parameters

Parameter

Description

Value

stack-vlan vlan-id1

Specifies the outer VLAN tag added to an untagged frame.

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

stack-inner-vlan vlan-id2

Specifies the inner VLAN tag added to an untagged frame.

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

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If double tags need to be added to packets, two devices are required. The port vlan-stacking untagged command adds double tags to packets on one device or untagged packets received on a Layer 2 interface to differentiate services or users.

For outgoing packets:
  • Tags are removed only when both the inner and outer VLAN IDs are matched.
  • When only the outer VLAN ID is matched and the VLAN is configured on the interface in untagged mode, the outer VLAN tag is removed and the inner VLAN tag is reserved.

Precautions

To enable an interface to add double VLAN tags to an untagged packet, you must set the link type of the interface to hybrid, and add the interface to the outer VLAN in untagged mode.

When the interface PVID is not VLAN 1, restore the PVID to VLAN 1 before the port vlan-stacking untagged command is executed.

Adding double VLAN tags to untagged frames is port-based VLAN assignment. Different VLAN assignment modes are in the following order of priority: policy-based VLAN assignment > MAC address-based VLAN assignment > IP subnet-based VLAN assignment > protocol-based VLAN assignment > interface-based VLAN assignment.

Example

# Add double VLAN tags to untagged frames received on GE1/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[HUAWEI-GigabitEthernet1/0/1] port vlan-stacking untagged stack-vlan 100 stack-inner-vlan 200
Related Topics

port vlan-stacking 8021p

Function

The port vlan-stacking 8021p command configures 802.1p priority-based VLAN stacking on an interface.

The undo port vlan-stacking 8021p command cancels the configuration.

By default, no VLAN stacking is configured.

Format

port vlan-stacking 8021p 8021p-value1 stack-vlan vlan-id [ remark-8021p 8021p-value2 ]

undo port vlan-stacking 8021p 8021p-value1 [ stack-vlan vlan-id ]

undo port vlan-stacking all

Parameters

Parameter

Description

Value

8021p 8021p-value1

Specifies the 802.1p priority of a VLAN frame.

The 802.1p priority is a 3-bit PRI (priority) field in an 802.1Q frame. When a switch is blocked, frames with high priorities are sent preferentially.

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

stack-vlan vlan-id

Specifies the outer VLAN ID added to a VLAN frame.

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

remark-8021p 8021p-value2

Specifies the re-marked 802.1p priority in the outer tag added to a frame.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority. By default, the 802.1p priority in the outer VLAN tag added to a frame is the same as the 802.1p priority in the inner VLAN tag of the frame.

all

Deletes all VLAN stacking configurations on the interface.

-

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When frames are transmitted on the ISP network, the frames are differentiated based on user applications, access sites or devices. A device enabled with VLAN stacking adds outer tags to user frames based on the 802.1p priorities in the user frames so that traffic from different users are differentiated.

Precautions

VLAN stacking based on 802.1p priority only takes effect for incoming frames.

VLAN stacking based on 802.1p priority can be enabled on only a trunk or hybrid interface.

Example

# Configure 802.1p priority-based VLAN stacking on GigabitEthernet1/0/1 to add the outer VLAN tag 200 to frames with the 802.1p priority 5.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet1/0/1] port vlan-stacking 8021p 5 stack-vlan 200

port vlan-stacking vlan 8021p

Function

The port vlan-stacking 8021p command configures VLAN stacking based on VLAN IDs and 802.1p priorities on an interface.

The undo port vlan-stacking vlan 8021p command cancels the configuration.

Format

port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] [ 8021p 8021p-value1 [ to 8021p-value2 ] ] stack-vlan vlan-id3 [ remark-8021p 8021p-value3 ] [ map-vlan vlan-id4 ]

undo port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] [ 8021p 8021p-value1 [ to 8021p-value2 ] ] [ stack-vlan vlan-id3 ]

undo port vlan-stacking all

Parameters

Parameter

Description

Value

vlan vlan-id1 [ to vlan-id2 ]

Specifies the inner VLAN tag in a received tagged frame.
  • vlan-id specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The value of vlan-id2 must be larger than the value of vlan-id1. vlan-id1 and vlan-id2 identify a VLAN range.

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

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

8021p 8021p-value1 [ to 8021p-value2 ]

Specifies the 802.1p priority in a VLAN frame. The 802.1p priority is a 3-bit PRI (priority) field in an 802.1Q frame. When a switch is blocked, frames of higher priorities are sent preferentially.
  • 8021p-value1: specifies the lower threshold for the 802.1p priority.
  • to 8021p-value2: specifies the upper threshold for the 802.1p priority. The value of 8021p-value2 must be larger than the value of 8021p-value1.

The value of 8021p-value1 is an integer that ranges from 0 to 7. A larger value indicates a higher priority.

The value of 8021p-value2 is an integer that ranges from 0 to 7. A larger value indicates a higher priority.

stack-vlan vlan-id3

Specifies the outer VLAN ID added to a frame.

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

remark-8021p 8021p-value3

Specifies the re-marked 802.1p priority in the outer tag added to a frame.

The value is an integer that ranges from 0 to 7. A larger value indicates a higher priority. By default, the 802.1p priority in the outer VLAN tag added to a frame is the same as the 802.1p priority in the inner VLAN tag of the frame.

map-vlan vlan-id4 Specifies the mapped VLAN ID in the stacked inner tag.
NOTE:

This parameter is not supported on the X series cards.

After this parameter is specified, the device can only map incoming packets.

The value is an integer ranging from 1 to 4094.

all

Deletes all VLAN stacking configurations on the interface.

-

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When frames are transmitted on the ISP network, the frames are differentiated based on user applications, access sites or devices. A device enabled with VLAN stacking adds outer tags to user frames based on inner tags or priorities in the user frames so that traffic from different users are differentiated.

When a network edge device needs to act as a user-side device and the received single-tagged packets are from one type of service, the same service from different users needs to be sent in different VLANs. That is, 1:1 VLAN mapping is implemented. After mapped VLAN tags enter the carrier network, VLAN stacking needs to be enabled on the network edge device to distinguish different users and services, because the number of VLANs that can be provided by the carrier network is limited. In addition, specified tags need to be added to packets of different users and services. Outer tags are the same as those provided by the carrier network and can be transmitted over the carrier network, and inner tags are transparently transmitted over the carrier network, enabling communication between different users. You can run the port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] [ 8021p 8021p-value1 [ to 8021p-value2 ] ] stack-vlan vlan-id3 [ remark-8021p 8021p-value3 ] map-vlan vlan-id4 command to enable VLAN mapping and VLAN stacking on a device.

If you want to implement both VLAN mapping and VLAN stacking, you cannot enable them separately by running the corresponding commands. This is because the VLAN ID that is mapped based on VLAN mapping cannot be mapped again based on VLAN stacking. For example, if port vlan-stacking vlan 210 stack-vlan 2010 and port vlan-mapping vlan 10 map-vlan 210 are configured on a device, the device maps VLAN 10 to VLAN 210 based on port vlan-mapping vlan 10 map-vlan 210. However, VLAN 210 after mapping will not be mapped to VLAN 2010 based on port vlan-stacking vlan 210 stack-vlan 2010. To implement both VLAN stacking and VLAN mapping, run the port vlan-stacking vlan vlanid1 stack-vlan vlanid2 map-vlan vlanid3 command.

Precautions

VLAN stacking based on VLAN IDs and 802.1p priorities only takes effect for incoming packets.

VLAN stacking based on VLAN IDs and 802.1p priorities can be enabled on only a trunk or hybrid interface.

SA cards of S series do not support this command.

If the port vlan-stacking vlan 8021p command without remark-8021p 8021p-value3 specified and the port vlan-mapping vlan 8021p command with 802.1p priority specified are executed on the same interface, the 802.1 priority of the stacked VLAN set by the port vlan-mapping vlan 8021p command takes effect.

Example

# Configure VLAN stacking based on VLAN IDs and 802.1p priorities on GE1/0/1. Add outer VLAN tag 200 to the frames with inner VLAN tag 100 and 802.1p priority 5 and set the internal priority to 1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet1/0/1] port vlan-stacking vlan 100 8021p 5 stack-vlan 200 remark-8021p 1

qinq mapping pe-vid ce-vid

Function

The qinq mapping pe-vid ce-vid command configures a sub-interface to map the outer VLAN tag of a frame.

The undo qinq mapping pe-vid ce-vid command cancels the configuration.

By default, VLAN mapping is not configured on a sub-interface.

Format

qinq mapping pe-vid vlan-id1 ce-vid vlan-id2 [ to vlan-id3 ] map-vlan vid vlan-id4

undo qinq mapping pe-vid vlan-id1 ce-vid vlan-id2 [ to vlan-id3 ] map-vlan vid vlan-id4

Parameters

Parameter

Description

Value

pe-vid vlan-id1

Specifies the outer VLAN tag in a received frame.

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

ce-vid vlan-id2 [ to vlan-id3 ]

Specifies the inner VLAN tag in a received frame.
  • vlan-id2: specifies the start inner VLAN tag.
  • vlan-id3: specifies the end inner VLAN tag.
  • The value of vlan-id3 must be greater than or equal to the value of vlan-id2. vlan-id2 and vlan-id3 identify a VLAN range.

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

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

map-vlan vid vlan-id4

Specifies the VLAN ID in the mapped outer tag.

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

Views

GE sub-interface view, XGE sub-interface view, 40GE sub-interface view, 100GE sub-interface view, VE sub-interface view, Eth-Trunk sub-interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

QinQ mapping is generally deployed on edge devices of a metro Ethernet and often used to map the VLAN tag carried in the frame to a specified VLAN tag before the frame is transmitted on the public network. QinQ mapping can be applied to the following scenarios:

  • The VLAN IDs deployed in new sites and old sites conflict, but new sites need to communicate with old sites.

  • The VLAN ID planning of each site on the public network is different. As a result, the VLAN IDs conflict. However, the sites do not need to communicate.

  • The VLAN IDs on both ends of the public network are different.

When a network edge device receives double-tagged frames, the inner tags indicate users and outer tags indicates services. To differentiate services on the ISP network, you can configure 2 to 1 QinQ mapping on network edge devices. The double tags of frames are mapped to a specified S-VLAN tag so that the outer tag can be transparently transmitted on the ISP network.

The qinq mapping pe-vid ce-vid command on a sub-interface has similar functions with the port vlan-mapping vlan inner-vlan command on the main interface. The differences are as follows:
  • QinQ mapping on a sub-interface is mainly used to access the L2VPN.

  • QinQ mapping used on the main interface is used for interconnection on the Layer 2 MAN so that users of different VLANs can communicate with each other.

  • QinQ mapping saves a large number of physical ports.

Precautions

The qinq mapping pe-vid ce-vid command maps the outer VLAN tags of the frames on a sub-interface, but does not change the inner VLAN tags. This command takes effect for only incoming frames.

The original VLAN IDs specified for QinQ mapping on a sub-interface cannot be globally created or displayed by display commands.

VLAN mapping or VLAN stacking cannot be configured for the same VLAN on the main interface and its sub-interfaces.

The mapped VLAN IDs specified in QinQ mapping configuration must be different from the control VLAN IDs for ring protocols such as SEP, RRPP, and ERPS. Otherwise, an error message will be displayed, indicating that the configuration fails.

Example

# On GigabitEthernet1/0/1.1, set the outer VLAN tag 10 of frames with the inner VLAN tag 20 to outer VLAN tag 30.

<HUAWEI> system-view
[HUAWEI] vcmp role silent
[HUAWEI] interface gigabitethernet1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet1/0/1] quit
[HUAWEI] interface gigabitethernet 1/0/1.1
[HUAWEI-GigabitEthernet1/0/1.1] qinq mapping pe-vid 10 ce-vid 20 map-vlan vid 30

qinq mapping vid map-vlan

Function

The qinq mapping vid map-vlan command configures 1 to 1 QinQ mapping on a sub-interface.

The undo qinq mapping vid map-vlan command cancels the configuration.

By default, 1 to 1 QinQ mapping is not configured on a sub-interface.

Format

qinq mapping vid vlan-id1 [ to vlan-id2 ] map-vlan vid vlan-id3

undo qinq mapping vid vlan-id1 [ to vlan-id2 ] map-vlan vid vlan-id3

Parameters

Parameter

Description

Value

vid vlan-id1 to vlan-id2

Specifies the VLAN ID of the tag carried in the received packet.
  • vlan-id1: specifies the start inner VLAN tag.
  • vlan-id2: specifies the end inner VLAN tag.
  • The value of vlan-id2 must be greater than or equal to the value of vlan-id1. vlan-id1 and vlan-id2 identify a VLAN range.

vlan-id1 is an integer that ranges from 2 to 4094.

vlan-id2 is an integer that ranges from 2 to 4094.

map-vlan vid vlan-id3

Specifies the VLAN ID in the mapped outer tag.

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

Views

GE sub-interface view, XGE sub-interface view, 40GE sub-interface view, 100GE sub-interface view, VE sub-interface view, Eth-Trunk sub-interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

QinQ mapping is generally deployed on edge devices of a metro Ethernet and often used to map the VLAN tag carried in the frame to a specified VLAN tag before the frame is transmitted on the public network. QinQ mapping can be applied to the following scenarios:

  • The VLAN IDs deployed in new sites and old sites conflict, but new sites need to communicate with old sites.

  • The VLAN ID planning of each site on the public network is different. As a result, the VLAN IDs conflict. However, the sites do not need to communicate.

  • The VLAN IDs on both ends of the public network are different.

The qinq mapping vid map-vlan command on a sub-interface has similar functions with the port vlan-mapping vlan inner-vlan command on the main interface. The differences are as follows:
  • QinQ mapping on a sub-interface is mainly used to access the L2VPN.

  • QinQ mapping used on the main interface is used for interconnection on the Layer 2 MAN so that users of different VLANs can communicate with each other.

  • QinQ mapping saves a large number of physical ports.

Precautions

The qinq mapping vid map-vlan command maps the single tags in frames on a sub-interface. This command takes effect only for incoming packets.

The original VLAN IDs specified for QinQ mapping on a sub-interface cannot be globally created or displayed by display commands.

VLAN mapping or VLAN stacking cannot be configured for the same VLAN on the main interface and its sub-interfaces.

The mapped VLAN IDs specified in QinQ mapping configuration must be different from the control VLAN IDs for ring protocols such as SEP, RRPP, and ERPS. Otherwise, an error message will be displayed, indicating that the configuration fails.

Example

# Configure QinQ mapping on GigabitEthernet1/0/1.1 to map outer VLAN tag 100 to inner VLAN tag 200.

<HUAWEI> system-view
[HUAWEI] vcmp role silent
[HUAWEI] interface gigabitethernet1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet1/0/1] quit
[HUAWEI] interface gigabitethernet 1/0/1.1
[HUAWEI-GigabitEthernet1/0/1.1] qinq mapping vid 100 map-vlan vid 200

qinq protocol

Function

The qinq protocol command sets the TPID value in the outer VLAN tag of an interface.

The undo qinq protocol command restores the default TPID value in the outer VLAN tag.

By default, the TPID value in the outer VLAN tag is 0x8100.

Format

qinq protocol protocol-id

undo qinq protocol

Parameters

Parameter

Description

Value

protocol-id

Specifies the TPID value in the outer VLAN tag.

The value is a 4-digit hexadecimal integer that ranges from 0x0600 to 0xFFFF. The default TPID value is 0x8100.

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To enable devices from different vendors to interoperate, set the same TPID value in outer VLAN tags on the devices. Devices from different vendors or in different network plans may use different Tag Protocol Identifier (TPID) values in VLAN tags of VLAN packets. The switch supports configuration of the TPID value in outer VLAN tags so that it can interoperate with devices from different vendors or operate seamlessly on an existing network.

Precautions

  • In earlier versions of V200R010, this command can be configured on Eth-Trunk member interfaces but not the Eth-Trunk. In V200R010 and later versions, this command can be configured on the Eth-Trunk but not Eth-Trunk member interfaces.
  • When the device is upgraded from an earlier version of V200R010 to V200R010 or later and the qinq protocol command is configured on Eth-Trunk member interfaces, the following situations may occur:

    • If the same qinq protocol command has been configured on all Eth-Trunk member interfaces, the qinq protocol command configuration takes effect on the Eth-Trunk after the upgrade.

    • If different qinq protocol commands are configured on Eth-Trunk member interfaces, the qinq protocol command configuration takes effect on the Eth-Trunk member interfaces after the upgrade and there is the configuration on the Eth-Trunk member interfaces. To configure the qinq protocol command in the Eth-Trunk interface view, first manually run the undo qinq protocol command on Eth-Trunk member interfaces to delete the configuration. In this situation, automatic completion of the undo qinq protocol command is not supported. You must manually enter the undo qinq protocol command.

  • The device directly connected to an interface must be able to identify the TPID value in the outer VLAN tag on the interface.

  • The qinq protocol command identifies incoming frames, and adds or changes the TPID value of outgoing frames.

  • The TPID value specified by the qinq protocol command must be different from TPID values of specific protocols. Otherwise, the interface cannot correctly classify protocol packets. The TPID value cannot be any of the values in the following table.
    Table 5-68  Description of protocol types and values

    Protocol Type

    Value

    ARP

    0x0806

    RARP

    0x8035

    IP

    0x0800

    IPv6

    0x86DD

    PPPoE

    0x8863/0x8864

    MPLS

    0x8847/0x8848

    IPX/SPX

    0x8137

    LACP

    0x8809

    802.1x

    0x888E

    HGMP

    0x88A7

    Reserved

    0xFFFD/0xFFFE/0xFFFF

Example

# Set the TPID value in the outer VLAN tag of a QinQ frame to 0x9100 on GE1/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet1/0/1
[HUAWEI-GigabitEthernet1/0/1] qinq protocol 9100
Related Topics

qinq stacking

Function

The qinq stacking command configures VLAN stacking on a sub-interface.

The undo qinq stacking command cancels the configuration.

By default, VLAN stacking is not configured on a sub-interface.

Format

qinq stacking vid vlan-id1 [ to vlan-id2 ] pe-vid vlan-id3

undo qinq stacking vid vlan-id1 [ to vlan-id2 ] pe-vid vlan-id3

Parameters

Parameter

Description

Value

vid vlan-id1 [ to vlan-id2 ]

Specifies the outer VLAN ID range.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. The . vlan-id1 and vlan-id2 id value of vlan-id2 must be greater than or equal to the value of vlan-id1entify a VLAN range.

The value of vlan-id1 is an integer that ranges from 2 to 4094.

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

pe-vid vlan-id3

Specifies the outer VLAN tags added to a frame.

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

Views

GE sub-interface view, XGE sub-interface view, 40GE sub-interface view, 100GE sub-interface view, VE sub-interface view, Eth-Trunk sub-interface view

Default Level

2: Configuration level

Usage Guidelines

The qinq stacking command adds an outer VLAN tag to the packets on a sub-interface.

The original VLAN IDs specified for QinQ mapping on a sub-interface cannot be globally created or displayed by display commands.

VLAN mapping or VLAN stacking cannot be configured for the same VLAN on the main interface and its sub-interfaces.

Example

# Configure VLAN stacking on GigabitEthernet1/0/1.1 and add an outer VLAN tag 100 to frames with the inner VLAN tags 10 to 13.

<HUAWEI> system-view
[HUAWEI] vcmp role silent
[HUAWEI] interface gigabitethernet1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet1/0/1] quit
[HUAWEI] interface gigabitethernet 1/0/1.1
[HUAWEI-GigabitEthernet1/0/1.1] qinq stacking vid 10 to 13 pe-vid 100

qinq vlan-translation miss-drop

Function

The qinq vlan-translation miss-drop command configures an interface to discard the packets that do not match any VLAN Stacking, VLAN mapping, VLAN switch, and entry.

The undo qinq vlan-translation miss-drop command cancels the configuration.

By default, an interface does not discard the packets that do not match any VLAN Stacking, VLAN mapping, VLAN Switch, and entry.

NOTE:

This command does not take effect for untagged packets.

Format

qinq vlan-translation miss-drop

undo qinq vlan-translation miss-drop

Parameters

None

Views

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

Default Level

2: Configuration level

Usage Guidelines

After VLAN Stacking, VLAN Switch, and VLAN mapping, are configured on an interface, you can run the qinq vlan-translation miss-drop command to configure the interface to discard the received packets that do not match any VLAN Stacking, VLAN mapping, VLAN switch, and entry.

When VLAN Stacking, VLAN Switch, and VLAN mapping are not configured on an interface of the X series cards, the received packets will not be discarded if you run the qinq vlan-translation miss-drop command. When VLAN Stacking, VLAN Switch, and VLAN mapping are not configured on an interface of other series boards, the received packets will be discarded if you run the qinq vlan-translation miss-drop command.

Example

# Configure GE1/0/1 to discard the packets that do not match any VLAN Stacking, VLAN mapping, VLAN Switch, and entry.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet1/0/1] qinq vlan-translation miss-drop
Translation
Download
Updated: 2019-04-09

Document ID: EDOC1100065659

Views: 123542

Downloads: 88

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