The track { ip-link | bfd-session } command configures the interworking between the PBR rule and IP-link or BFD. The IP link or BFD status determines the validity of the PBR rule.
The undo track { ip-link | bfd-session } command deletes the configuration.
track { ip-link link-name | bfd-session local-discr-value }
undo track { ip-link | bfd-session }
| Parameter | Description | Value |
|---|---|---|
| link-name | Specifies the name of the IP link. |
The value must be the name of an existing IP link. |
| local-discr-value | Specifies the local discriminator of a monitored BFD session. |
The value must be the local discriminator of an existing BFD session. |
PBR cannot detect the reachability of the next hop. If the next hop is unreachable, the device forwards the packet to the next hop based on the PBR rule, which may result in packet loss.
You can configure the interworking between the PBR rule and IP link or BFD to resolve this problem. When you configure IP-link or BFD, ensure that the destination IP address of the monitored link is the same as the specified next hop, and run the track { ip-link | bfd-session } command to associate PBR rules with IP links or BFD. IP link or BFD monitors the reachability of the links of the next hop and determines the validity of PBR rules based on the IP link status or BFD status.
# Configure the interworking between PBR rule abc and IP link test to allow the IP link status to determine the validity of PBR rule abc.
<sysname> system-view [sysname] policy-based-route [sysname-policy-pbr] rule name abc [sysname-policy-pbr-rule-abc] track ip-link test
# Configure the interworking between PBR rule test and the local discriminator of BFD session 5 to allow the BFD status to determine the validity of PBR rule test.
<sysname> system-view [sysname] policy-based-route [sysname-policy-pbr] rule name test [sysname-policy-pbr-rule-test] track bfd-session 5