The mpls static-l2vc command creates a static primary PW.
The undo mpls static-l2vc command deletes a static primary PW.
By default, no static PW is created.
mpls static-l2vc { { destination ip-address | pw-template pw-template-name vc-id } * | destination ip-address vc-id } transmit-vpn-label transmit-label-value receive-vpn-label receive-label-value [ tunnel-policy tnl-policy-name [ endpoint endpoint-address color color-value ] | [ control-word | no-control-word ] | [ raw | tagged | ip-interworking ] | [ secondary | bypass ] ] *
mpls static-l2vc instance-name instance-name { { destination ip-address | pw-template pw-template-name vc-id } * | destination ip-address vc-id } transmit-vpn-label transmit-label-value receive-vpn-label receive-label-value [ tunnel-policy tnl-policy-name [ endpoint endpoint-address color color-value ] | [ control-word | no-control-word ] | [ raw | tagged | ip-interworking ] ] *
undo mpls static-l2vc { { destination ip-address | pw-template pw-template-name vc-id } * | destination ip-address vc-id } transmit-vpn-label transmit-label-value receive-vpn-label receive-label-value [ tunnel-policy tnl-policy-name [ endpoint endpoint-address color color-value ] | [ control-word | no-control-word ] | [ raw | tagged | ip-interworking ] | [ secondary | bypass ] ] *
undo mpls static-l2vc [ secondary | bypass ]
undo mpls static-l2vc instance-name instance-name { { destination ip-address | pw-template pw-template-name vc-id } * | destination ip-address vc-id } transmit-vpn-label transmit-label-value receive-vpn-label receive-label-value [ tunnel-policy tnl-policy-name [ endpoint endpoint-address color color-value ] | [ control-word | no-control-word ] | [ raw | tagged | ip-interworking ] ] *
Parameter | Description | Value |
---|---|---|
destination ip-address |
Specifies the LSR-ID of a peer device. |
The value is in dotted decimal notation. |
pw-template pw-template-name |
Specifies the name of a static PW template. |
The name 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 the ID of a PW. |
The value is an integer that ranges from 1 to 4294967295. |
transmit-vpn-label transmit-label-value |
Indicates the label value of sent packets. |
The value is an integer that ranges from 0 to 1048575. |
receive-vpn-label receive-label-value |
Indicates the label value of received packets. |
The value is an integer that ranges from 16 to 32783. |
tunnel-policy tnl-policy-name |
Specifies the name of 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. |
control-word |
Enables the control word. |
- |
no-control-word |
Disables the control word. |
- |
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. |
- |
ip-interworking |
Enables static PW interworking when devices in the interworking are all provided by Huawei. |
- |
secondary |
Configures the PW as a secondary PW. |
- |
bypass |
Configures the PW as a bypass PW. |
- |
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
If a device is unable to support a large number of LDP sessions, or if you want to manually manage and allocate VC labels, use the undo mpls static-l2vc command to create static PWs. When you configure VC labels to create PWs, Layer 2 VC or link information does not need to be transmitted using LDP.
To configure static PWs, create the static primary PW first. Static VCs must be created on the PEs at both ends. The destination address of a VC is the IP address of the peer PE. The transmit label of the PE at one end is the receive label of the PE at the other end.Prerequisites
Configuration Impact
If a static PW is configured on an AC interface, the Layer 3 features of the interface, such as the IP address and routing protocol, will not take effect. An interface cannot serve as both an L2VPN AC interface and an L3VPN AC interface. If an interface is bound to both a PW and an L3VPN, only the PW configuration takes effect on the interface. After the PW is deleted, the L3VPN configuration will take effect on the interface.
Follow-up Procedure
Run the display mpls static-l2vc command to view PW configurations.
Precautions
Since the static secondary PW protects the static primary PW, you cannot configure the static secondary PW before configuring the static primary PW. If you attempt to configure the static secondary PW before the static primary PW, the attempt fails. For the same reason, when deleting PWs, delete the static secondary PW and then the static primary PW.
In a PW redundancy scenario, configure the same parameters for the primary, secondary, and bypass PWs. A parameter inconsistency causes the secondary or bypass PW to fail to take over traffic if the primary PW fails. The secondary PWs cannot be created on the same AC interface. If VCCV is not required for a static VC, pwId does not need to be specified. If VCCV is required, pwId must be specified.<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] pw-template pwt [*HUAWEI-pw-template-pwt] peer-address 1.1.1.1 [*HUAWEI-pw-template-pwt] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] mpls static-l2vc pw-template pwt 100 transmit-vpn-label 100 receive-vpn-label 100
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] tunnel-policy policy1 [*HUAWEI-tunnel-policy-policy1] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] mpls static-l2vc destination 1.1.1.1 transmit-vpn-label 100 receive-vpn-label 100 tunnel-policy policy1