The mpls l2vpn track route command configures a VPWS PW to track VPN route status.
The undo mpls l2vpn track route command disables a VPWS PW from tracking VPN route status.
By default, no VPWS PW tracks VPN route status.
mpls l2vpn track route ipv4-address { mask | mask-length } vpn-instance vpn-instance-name
mpls l2vpn track route ipv6-address { ipv6-mask | ipv6-mask-length } vpn-instance vpn-instance-name
undo mpls l2vpn track route [ ipv4-address { mask | mask-length } vpn-instance vpn-instance-name ]
undo mpls l2vpn track route [ ipv6-address { ipv6-mask | ipv6-mask-length } vpn-instance vpn-instance-name ]
Parameter | Description | Value |
---|---|---|
ipv4-address |
Specifies the destination IP address of a VPNv4 route. |
The value is in dotted decimal notation. |
mask |
Specifies the mask of the destination IP address of a VPNv4 route. |
The value is in dotted decimal notation. |
mask-length |
Specifies a mask length. |
The value is an integer ranging from 0 to 32. |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
ipv6-address |
Specifies the destination IPv6 address of a VPNv6 route. |
The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
ipv6-mask |
Specifies the mask of the destination IPv6 address of a VPNv6 route. |
The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
ipv6-mask-length |
Specifies a mask length of IPv6. |
The value is an integer ranging from 0 to 128. |
Usage Scenario
In an L2VPN accessing L3VPN scenario, if all L3VPN-side links of an AGG become unavailable, a black-hole route is generated. The user-side CSG cannot detect the link failures and still sends traffic to the AGG for transmission. As a result, traffic loss occurs. To prevent traffic loss, run the mpls l2vpn track route command to configure the PW between the CSG and AGG to track VPN route status. After the AGG detects that all its L3VPN-side links become unavailable, the AGG instructs the CSG to switch traffic to the secondary PW.
Prerequisites
Configuration Impact
After the mpls l2vpn track route command is run, a VPN route is associated with a VPWS PW. If the VPN route goes Down, the route instructs its associated VPWS PW to go Down.
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vrf1 [~HUAWEI-vpn-instance-vrf1] ipv6-family [~HUAWEI-vpn-instance-vrf1-af-ipv6] route-distinguisher 100:1 [~HUAWEI-vpn-instance-vrf1-af-ipv6] vpn-target 100:1 export-extcommunity [~HUAWEI-vpn-instance-vrf1-af-ipv6] vpn-target 100:1 import-extcommunity [~HUAWEI-vpn-instance-vrf1-af-ipv6] quit [~HUAWEI-vpn-instance-vrf1] quit [*HUAWEI] interface virtual-ethernet 0/1/0 [*HUAWEI-Virtual-Ethernet0/1/0] ve-group 1 l2-terminate [*HUAWEI-Virtual-Ethernet0/1/0] quit [*HUAWEI] interface virtual-ethernet 0/1/0.1 [*HUAWEI-Virtual-Ethernet0/1/0.1] vlan-type dot1q 10 [*HUAWEI-Virtual-Ethernet0/1/0.1] mpls l2vc 10.1.1.2 101 [*HUAWEI-Virtual-Ethernet0/1/0.1] mpls l2vpn track route FFFF:101:: 64 vpn-instance vrf1
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vrf1 [~HUAWEI-vpn-instance-vrf1] route-distinguisher 100:1 [~HUAWEI-vpn-instance-vrf1-af-ipv4] quit [~HUAWEI-vpn-instance-vrf1] vpn-target 100:1 export-extcommunity [~HUAWEI-vpn-instance-vrf1] vpn-target 100:1 import-extcommunity [~HUAWEI-vpn-instance-vrf1] quit [*HUAWEI] interface virtual-ethernet 0/1/0 [*HUAWEI-Virtual-Ethernet0/1/0] ve-group 1 l2-terminate [*HUAWEI-Virtual-Ethernet0/1/0] quit [*HUAWEI] interface virtual-ethernet 0/1/0.1 [*HUAWEI-Virtual-Ethernet0/1/0.1] vlan-type dot1q 10 [*HUAWEI-Virtual-Ethernet0/1/0.1] mpls l2vc 10.1.1.2 101 [*HUAWEI-Virtual-Ethernet0/1/0.1] mpls l2vpn track route 1.1.1.1 32 vpn-instance vrf1