mpls l2vpn

Function

The mpls l2vpn command enables MPLS L2VPN and displays the L2VPN view.

The undo mpls l2vpn command disables MPLS L2VPN and deletes all MPLS L2VPN configurations.

This command varies in transport and router modes. For detailed differences, see Differences Between Commands in Transport and Router Modes. This topic describes the command configuration in router mode.

By default, MPLS L2VPN is not enabled.

Format

mpls l2vpn

undo mpls l2vpn

Parameters

None

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l2vpn write

Usage Guidelines

Usage Scenario

The mpls l2vpn command enables MPLS L2VPN so that you can configure the MPLS L2VPN service on the PE to transparently transmit Layer 2 user data over the MPLS backbone network.

Prerequisites

The basic MPLS function has been configured. For details on how to configure the basic MPLS function, see mpls lsr-id and mpls.

Configuration Impact

The undo mpls l2vpn command can delete all MPLS L2VPN configurations and interrupt all MPLS L2VPN services. Exercise caution when running this command.

Follow-up Procedure

Run other MPLS L2VPN commands only after the mpls l2vpn command is used.

Precautions

MPLS L2VPN is not required on Ps when the MPLS L2VPN service is being configured.

After running the mpls l2vpn command, note the following:

  • If MPLS L2VPN is not enabled on the device, running the mpls l2vpn command enables MPLS L2VPN and displays the L2VPN view.
  • If MPLS L2VPN is enabled on the device, running the mpls l2vpn command directly displays the L2VPN view.Disabling MPLS L2VPN globally deletes all L2VPN configurations.

Example

# Disable MPLS L2VPN on the device.
<HUAWEI> system-view
[~HUAWEI] undo configuration prevent-misoperation disable
[~HUAWEI] mpls
[*HUAWEI-mpls] quit
[*HUAWEI] mpls l2vpn
[*HUAWEI-l2vpn] quit
[*HUAWEI] commit
[~HUAWEI] undo mpls l2vpn
Warning: This operation will delete all L2VPN configurations. If you want the configurations to be restored, perform reconfigurations. Continue? [Yes/No]:Yes
Warning: This operation may cause L2VPN services to be interrupted. Continue?  [Yes/No]:Yes
Info: MPLS L2VPN is deleting configuration data now. Please wait......done.
# Enable MPLS L2VPN on the device.
<HUAWEI> system-view
[~HUAWEI] interface loopback 1
[*HUAWEI-Loopback1] ip address 1.1.1.1 32
[*HUAWEI-Loopback1] quit
[*HUAWEI] mpls lsr-id 1.1.1.1
[*HUAWEI] mpls
[*HUAWEI-mpls] quit
[*HUAWEI] mpls l2vpn
[*HUAWEI-l2vpn] quit
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >