The mpls switch-l2vc command configures PW switching on the SPE to implement multi-segment PWs.
The undo mpls switch-l2vc command deletes PW switching.
The default policy is used for PW switching. In the default policy, LSP tunnels are used and the number of routes for load balancing is 1.
mpls switch-l2vc ip-address vc-id trans trans-label recv received-label [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] encapsulation encapsulation-type [ control-word [ cc { alert | cw } * cv lsp-ping ] | [ no-control-word ] [ cc alert cv lsp-ping ] ] [ control-word-transparent ]
undo mpls switch-l2vc ip-address vc-id trans trans-label recv received-label [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] encapsulation encapsulation-type [ control-word [ cc { alert | cw } * cv lsp-ping ] | [ no-control-word ] [ cc alert cv lsp-ping ] ] [ control-word-transparent ]
mpls switch-l2vc ip-address vc-id [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] between ip-address vc-id [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] encapsulation encapsulation-type [ control-word-transparent ]
undo mpls switch-l2vc ip-address vc-id [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] between ip-address vc-id [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] encapsulation encapsulation-type [ control-word-transparent ]
mpls switch-l2vc ip-address vc-id [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] encapsulation encapsulation-type [ mtu mtu-value ] [ control-word [ cc { alert | cw } * cv lsp-ping ] | [ no-control-word ] [ cc alert cv lsp-ping ] ] [ flow-label { both | send | receive } ] [ control-word-transparent ]
undo mpls switch-l2vc ip-address vc-id [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] between ip-address vc-id trans trans-label recv received-label [ tunnel-policy policy-name ] [ oam-packet pop flow-label ] encapsulation encapsulation-type [ mtu mtu-value ] [ control-word [ cc { alert | cw } * cv lsp-ping ] | [ no-control-word ] [ cc alert cv lsp-ping ] ] [ flow-label { both | send | receive } ] [ control-word-transparent ]
undo mpls switch-l2vc { ip-address vc-id encapsulation encapsulation-type | all }
Parameter |
Description |
Value |
---|---|---|
ip-address |
Specifies the LSR ID of a peer device on the PW. |
The value is in dotted decimal notation. |
vc-id |
Specifies the L2VC ID. |
The value is an integer that ranges from 1 to 4294967295. |
trans trans-label |
Specifies the static label for sending packets. |
The value is an integer that ranges from 0 to 1048575. |
recv received-label |
Specifies the static label for receiving packets. |
The value is an integer that ranges from 16 to 1023. |
tunnel-policy policy-name |
Specifies the name of a tunnel policy. If this parameter is not specified, the default tunnel policy is used, which preferentially selects the LSP tunnel and only one tunnel is used for load balancing. |
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. |
oam-packet pop flow-label |
Specifies that flow labels of OAM packets are popped out. If OAM packets received from remote devices carry flow labels, the oam-packet pop flow-label parameter must be configured to pop out flow labels so that the SPEs can process the OAM packets. NOTE:
Only the S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S6720-HI, S6730S-H, and S6730-H support this parameter. |
- |
between |
Specifies the switching PW that corresponds to the PW |
- |
encapsulation encapsulation-type |
Specifies the encapsulation type of a static PW. |
The encapsulation types supported by PW switching are ethernet, vlan, and ip-interworking.
NOTE:
Static and mixed PWs support only Ethernet and VLAN encapsulation types. |
mtu mtu-value |
Specifies the MTU for negotiating dynamic PW signaling. If the non-default MTU is set when you configure a dynamic PW, you need to set the MTU manually when configuring mixed PW switching; otherwise, the signaling negotiation at the dynamic PW side may fail. |
The value is an integer that ranges from 46 to 9600. |
control-word |
Enables the control word function. By default, the control word function is disabled. |
- |
no-control-word |
Disable the control word function. |
- |
cw |
Indicates the mode in which the control word function is enabled. |
- |
alert |
Indicates the label alert tunnel for VCCV ping. |
- |
cv |
Indicates connectivity verification, which is enabled by default. |
- |
lsp-ping |
Indicates connectivity verification in LSP ping mode for VCs, which is enabled by default. |
- |
control-word-transparent |
Enables transparent transmission of the control word. In the scenario where a PE is dual homed to SPEs and BFD for PW is enabled, transparent transmission of the control word must be enabled on the SPEs; otherwise, the BFD negotiation fails. By default, transparent transmission of the control word is disabled. |
- |
all |
Deletes all PW switching. |
- |
flow-label both |
Enables flow label-based load balancing for outgoing traffic and incoming traffic. NOTE:
Only the S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S6720-HI, S6730S-H, and S6730-H support this parameter. |
- |
flow-label send |
Enables flow label-based load balancing for outgoing traffic. NOTE:
Only the S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S6720-HI, S6730S-H, and S6730-H support this parameter. |
- |
flow-label receive |
Enables flow label-based load balancing for incoming traffic. NOTE:
Only the S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S6720-HI, S6730S-H, and S6730-H support this parameter. |
- |
Usage Scenario
The mpls switch-l2vc command configures PW switching on the SPE to implement multi-segment PWs.
PW switching can be classified into dynamic mode, static mode, and mixed mode. You can create PW switching of different types using different commands to meet site requirements:
Precautions
You need to configure the PW label for the static PW switching and for the static PW in the mixed PW switching.
The configuration of dynamic PW switching is simple. The remote label is sent from two neighboring ends (UPE or SPE) to the SPE through signaling. The CW and the VCCV are sent from two UPE nodes to the SPE through signaling.
When you configure mixed PW switching, the value of ip-address vc-id before between in the command is for the dynamic PW, and the value of ip-address vc-id after between in the command is for the static PW. The two values cannot be interchanged.
The VC IDs for PW switching can be different.
The combination of the PW ID and PW type must be unique on each node. The PW IDs at two ends of PW switching can be the same.
When creating PW switching, the latest configurations of some parameters override the previous ones. The parameters include tunnel-policy policy-name, control-word-transparent, control-word, no-control-word, mtu mtu-value, oam-packet pop flow-label, and flow-label { both | send | receive }.
# Configure dynamic PW switching.
<HUAWEI> system-view [HUAWEI] mpls switch-l2vc 1.1.1.9 100 between 3.3.3.9 100 encapsulation vlan
# Configure static PW switching.
<HUAWEI> system-view [HUAWEI] mpls switch-l2vc 1.1.1.9 100 trans 100 recv 100 between 3.3.3.9 100 trans 200 recv 200 encapsulation vlan
# Configure mixed PW switching.
<HUAWEI> system-view [HUAWEI] mpls switch-l2vc 1.1.1.9 100 between 3.3.3.9 100 trans 200 recv 200 encapsulation vlan mtu 1500
# Delete PW switching.
<HUAWEI> system-view [HUAWEI] undo mpls switch-l2vc 1.1.1.9 100 encapsulation vlan