The mpls switch-l2vc encapsulation reroute command configures the PW switchback policy on the S-PE where the primary and secondary PWs are configured and are determined in master/slave mode. This command is applicable to the VLL FRR mode and the master/slave mode of PW redundancy.
The undo mpls switch-l2vc encapsulation reroute command deletes the PW switchback policy.
By default, in master/slave mode of PW redundancy, the switchback policy is configured as delayed switchback with the delay being 30 seconds.
mpls switch-l2vc ip-address vc-id encapsulation { ethernet | ip-interworking | ip-layer2 | vlan } reroute { delay delay-time | immediately | never }
undo mpls switch-l2vc ip-address vc-id encapsulation { ethernet | ip-interworking | ip-layer2 | vlan } reroute { delay delay-time | immediately | never }
Parameter | Description | Value |
---|---|---|
ip-address |
Specifies an LSR ID of the remote device on the PW. |
The value is in dotted decimal notation. |
vc-id |
Specifies the ID of a L2VC. |
The value is a decimal integer ranging from 1 to 4294967295. |
encapsulation |
Indicates the PW encapsulation type. |
- |
ethernet |
This encapsulation type is used when Ethernet packets do not carry VLAN information. |
- |
ip-interworking |
Enables heterogeneous media IP interworking between Huawei devices. |
- |
ip-layer2 |
Enables heterogeneous media IP interworking between a Huawei device and a non-Huawei device. |
- |
vlan |
This encapsulation type is used when Ethernet packets carry VLAN information. |
- |
delay delay-time |
Configures delayed switchback and specifies the delay for it. |
The value is a decimal integer ranging from 10 to 10800, in seconds. |
immediately |
Configures immediate switchback. |
- |
never |
Indicates that traffic is not switched back to the primary PW after the primary PW recovers from a fault. Traffic is switched to the primary PW if the secondary PW fails. |
- |
Usage Scenario
If the primary and secondary MS-PWs on an SPE work in master/slave PW redundancy mode, you can use this command to configure the revertive switching policy. An appropriate switchback delay helps to prevent or reduce packet loss caused by the switchback.
The independent mode supports only immediate switchback. The revertive switching policies can be classified into three modes: immediate switchback, delayed switchback, and non-revertive. The usage scenarios of these policies are similar to those described in mpls l2vpn reroute. Note the following in real-world situations:Prerequisites
The primary and secondary PWs have been configured on the SPE using the mpls switch-l2vc command.
Configuration Impact
After a revertive switching policy is configured, the switchback will be performed according to the revertive switching policy.
Precautions
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] quit [*HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] mpls switch-l2vc 1.1.1.1 1 between 2.2.2.2 2 backup 3.3.3.3 3 encapsulation vlan [*HUAWEI] mpls switch-l2vc 1.1.1.1 1 encapsulation vlan reroute delay 35