The mpls l2vc command creates an LDP VPWS connection.
The undo mpls l2vc command deletes an LDP VPWS connection.
By default, no VPWS connection is created.
mpls l2vc { ip-address | pw-template pw-template-name } * vc-id [ [ control-word | no-control-word ] | [ raw | tagged ] | tunnel-policy policy-name [ endpoint endpoint-address color color-value ] | ignore-standby-state ] *
mpls l2vc instance-name instance-name { ip-address | pw-template pw-template-name } * vc-id [ [ control-word | no-control-word ] | [ raw | tagged ] | tunnel-policy policy-name [ endpoint endpoint-address color color-value ] | ignore-standby-state ] *
undo mpls l2vc [ { ip-address | pw-template pw-template-name } * vc-id [ [ control-word | no-control-word ] | [ raw | tagged ] | tunnel-policy policy-name [ endpoint endpoint-address color color-value ] | ignore-standby-state ] * ]
undo mpls l2vc instance-name instance-name { ip-address | pw-template pw-template-name } * vc-id [ [ control-word | no-control-word ] | [ raw | tagged ] | tunnel-policy policy-name [ endpoint endpoint-address color color-value ] | ignore-standby-state ] *
Parameter | Description | Value |
---|---|---|
ip-address |
Specifies the IP address of the remote peer on a PW. |
The value is usually the LSR ID of the remote peer. |
pw-template pw-template-name |
Specifies the name of a PW template. You can set attributes for a PW template, including the remote peer, control word, MTU, VCCV capability, and tunnel policy. When configuring an LDP VPWS connection, you can directly apply the PW template rather than specify attributes for the PW in explicit mode. After setting attributes for a PW template, you can make desired changes whenever needed and run the reset pw command for the modified PW template to take effect. You need to define the name and attributes of the PW template in the system view before applying a PW template. If a PW attribute, such as the remote peer, tunnel policy, or control word, is specified in the mpls l2vc command, the same PW attribute configured in the PW template does not take effect. |
The value is a string of 1 to 19 case-sensitive characters, spaces not supported. The string can contain spaces if it is enclosed in double quotation marks ("). |
vc-id |
Specifies a 32-bit VC ID that is locally unique. A combination of the VC ID and VC type uniquely identifies a VC. This parameter cannot be modified. To change the VC ID, you need to delete the configured one and reconfigure it. |
The value is an integer ranging from 1 to 4294967295. |
control-word |
Enables the control word function. The control word carries the sequence number and Layer 2 header control information. The control word can be filled in a packet to prevent the packet from being too short. |
- |
no-control-word |
Disables the control word function. |
- |
raw |
Specifies that user packets do not carry P-Tags when being transmitted over a PW. This parameter applies only to Ethernet links. |
- |
tagged |
Specifies that user packets carry P-Tags when being transmitted over a PW. This parameter applies only to Ethernet links. |
- |
tunnel-policy policy-name |
Specifies the name of a tunnel policy. If no tunnel policy is specified, the default tunnel policy is adopted. The default tunnel policy for the VPWS connection uses LSPs and only one LSP is used for load balancing. If a tunnel policy name is specified but the tunnel policy is not configured, the default tunnel policy is adopted. You need to define the name and attributes of the tunnel policy in the system view before applying a tunnel policy. |
The value is a string of 1 to 39 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
endpoint endpoint-address |
Specifies the endpoint of an SRv6 TE Policy. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
color color-value |
Specifies the color value of an SRv6 TE Policy. |
The value is an integer that ranges from 0 to 4294967295. |
ignore-standby-state |
Configures the created PW to ignore the secondary state sent from the peer device. |
- |
instance-name instance-name |
Specifies the name of an L2VPN service. This parameter uniquely identifies an L2VPN service on a PE. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. The string can contain spaces if it is enclosed in double quotation marks ("). |
Usage Scenario
The VPWS network provides Layer 2 VPN services based on an MPLS network, enabling carriers to provide L2VPN services over different media, such as VLAN, Ethernet, Point-to-Point Protocol (PPP) on a unified MPLS network. The MPLS network can still provide traditional IP services, MPLS L3VPN, traffic engineering, and QoS services.
The VPWS network transparently transmits Layer 2 user data over the MPLS network. For users, the MPLS network is a Layer 2 switched network on which Layer 2 connections can be set up between nodes. LDP VPWS uses two layers of labels. The inner label uses extended LDP as the signaling protocol to transmit Layer 2 information and VC label information. To configure a VPWS connection that uses LDP as the signaling protocol on interfaces, run the mpls l2vc command.Prerequisites
Configuration Impact
An interface cannot serve as a VPWS AC interface and an L3VPN AC interface at the same time. If an interface is bound to a VPWS, its Layer 3 features such as the IP address and routing protocol will not take effect. If an interface is bound to both a VPWS and an L3VPN, only the VPWS connection is available. After the VPWS connection is deleted, the L3VPN service becomes available.
Precautions
<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 [*HUAWEI] interface GigabitEthernet 0/1/1 [*HUAWEI-GigabitEthernet0/1/1] mpls l2vc 2.2.2.2 100