< Home

mpls l2vpn vlan-stacking

Function

The mpls l2vpn vlan-stacking command configures the stacked VLAN ID for a main interface.

The undo mpls l2vpn vlan-stacking command deletes the stacked VLAN ID from a main interface.

By default, the system does not add a VLAN ID to a packet passing through the main interface.

Format

mpls l2vpn vlan-stacking stack-vlan vlan-id

undo mpls l2vpn vlan-stacking stack-vlan

Parameters

Parameter

Description

Value

stack-vlan vlan-id

Indicates the outer VLAN ID.

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

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the following conditions are met, run the mpls l2vpn vlan-stacking stack-vlan command to specify a VLAN for a main interface:

  • The VLL or VSI using VLAN encapsulation is configured on the two PEs.
  • The remote PE accepts packets with one more VLAN tag.
  • The local PE is connected to a computer by using a GE interface, XGE interface, 25GE interface, MultiGE interface, 40GE interface, 100GE interface, or Eth-Trunk interface as the AC interface.

    In this scenario, the computer sends and receives all packets. After a VLAN is specified for the main interface, the local PE performs the following operations:

    • The local PE adds VLAN tags to the packets sent by the computer. The VLAN tags are encapsulated in the user packets, and are transparently transmitted to the remote PE.
    • The local PE removes the outer VLAN tags from the packets sent by the remote PE, and forwards the packets to the computer.

Precautions

Before binding the main interface to the VLL or VSI, run the mpls l2vpn vlan-stacking stack-vlan command to specify a VLAN for the main interface.

To use an XGE interface, a GE interface, a 25GE interface, a MultiGE interface, a 40GE interface, a 100GE interface, or an Eth-Trunk interface of the device as the AC interface of the PE, run the undo portswitch command to change a Layer 2 interface to a Layer 3 interface.

Example

# Configure MPLS VLL on the main interface and add VLAN tag 80 to incoming packets.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/13
[HUAWEI-GigabitEthernet0/0/13] undo portswitch
[HUAWEI-GigabitEthernet0/0/13] mpls l2vpn vlan-stacking stack-vlan 80
[HUAWEI-GigabitEthernet0/0/13] mpls l2vc 10.0.0.17 20 tagged
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >