< Home

mpls l2vpn default vlan

Function

The mpls l2vpn default vlan command configures the default VLAN for a main interface.

The undo mpls l2vpn default vlan command deletes the default VLAN of a main interface.

Format

mpls l2vpn default vlan vlan-id

undo mpls l2vpn default vlan

Parameters

Parameter

Description

Value

vlan-id

Specifies the default VLAN ID of a main interface.

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, you can run the mpls l2vpn default vlan command to specify the default VLAN on a main interface:

  • The VSI using VLAN encapsulation is configured on the two PEs.
  • The remote PE accepts only the tagged packets.
  • 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 only untagged packets. After the default VLAN is specified on 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 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 VSI, you need to run the mpls l2vpn default vlan command to specify the default VLAN of the main interface.

If the remote PE can replace the VLAN tags in the packets with the VLAN tag of the AC-side outgoing interface when terminating the PW, the default VLAN on the main interface of the local PE can be set to any VLAN ID. Otherwise, the default VLAN of the main interface must be the same as the VLAN of the AC-side outgoing interface on the remote PE.

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 the default VLAN of primary interface.

[HUAWEI] interface gigabitethernet 0/0/2
[HUAWEI-GigabitEthernet0/0/2] undo portswitch
[HUAWEI-GigabitEthernet0/0/2] mpls l2vpn default vlan 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >