mpls static-l2vc (interface view)

Function

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.

Format

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 ] | access-port | [ 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 ] | access-port | [ 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 ] | access-port | [ 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 ] | access-port | [ control-word | no-control-word ] | [ raw | tagged | ip-interworking ] ] *

Parameters

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

access-port

Indicates that only untagged packets can be forwarded. By default, all packets can be forwarded. The access-port attribute can be configured only on an Ethernet main interface.

-

control-word

Enables the control word.

-

no-control-word

Disables the control word.

-

raw

Specifies the encapsulation type without any P-Tags. This parameter is available only when the AC link is an Ethernet link.

-

tagged

Specifies the encapsulation type with P-Tags. This parameter is available only when the AC link is an Ethernet link.

-

ip-interworking

Enables static PW interworking when devices in the interworking are all provided by Huawei.

-

secondary

Configures a PW as the secondary PW.

-

bypass

Configures a 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 (").

Views

100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE Layer 2 sub-interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE Layer 2 sub-interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk Layer 2 sub-interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, GE Layer 2 sub-interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, XGE sub-interface view, XGE interface view, Layer 2 sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l2vpn write

Usage Guidelines

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

  • MPLS has been enabled in the system view.
  • MPLS L2VPN has been enabled in the system view.

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, VC ID does not need to be specified. If VCCV is required, VC ID must be specified.

  • If a sub-interface is bound to a PW, the sub-interface can be deleted only after the binding is removed.
  • If a sub-interface is bound to a PW, you cannot change the encapsulation type of the main interface.

    When configuring static VCs, note the following:
  • The transmit label of the VRP ranges from 0 to 1048575, allowing the VRP to interwork with different types of devices.
  • The receive label of the VRP ranges from 16 to 1023. Packets with labels not in this range will be dropped by the VRP.

Example

# Configure a static PW, with the jitter buffer depth being 64, 32 TDM frames to be encapsulated, and the RTP header being added to TDM frames.
<HUAWEI> system-view
[~HUAWEI] mpls
[*HUAWEI-mpls] quit
[*HUAWEI] mpls l2vpn
[*HUAWEI-l2vpn] quit
[*HUAWEI] interface GigabitEthernet 0/1/0
[*HUAWEI-GigabitEthernet0/1/0] mpls static-l2vc destination 1.1.1.1 1 transmit-vpn-label 16 receive-vpn-label 17 jitter-buffer 64 tdm-encapsulation 32 rtp-header
# Import the PW template to configure a static PW. L2VC ID is 100, label value for sent packets is 100, and label value for received packets is also 100.
<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
# Configure a static PW. Its peer LSR-ID is 1.1.1.1, label value for sent packets is 100, label value for received packets is 100, and the tunnel policy is policy1.
<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] 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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >