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.
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:<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.
<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