track ip-link (PBR rule view)

Function

The track ip-link 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 command deletes the configuration.

Format

track ip-link link-name

undo track ip-link

Parameters

Parameter Description Value
link-name

Specifies the name of the IP link.

The value must be the name of an existing IP link.

Views

PBR rule view

Default Level

2: Configuration level

Usage Guidelines

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 to resolve this problem. When you configure IP-link, ensure that the destination IP address of the monitored link is the same as the specified next hop, and run the track ip-link command to associate PBR rules with IP links. IP link monitors the reachability of the links of the next hop and determines the validity of PBR rules based on the IP link status.

  • When an IP link is Up, the link is reachable, and PBR is valid to guide traffic forwarding.
  • When an IP link is Down, the link is unreachable, and PBR is invalid. Packets are forwarded based on the routing table.

Example

# 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

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.