The direct-route track pw-state command associates the IPv4 direct route on an interface with the PW status.
The direct-route track pw-state command dissociates the IPv4 direct route on an interface from the PW status.
By default, the IPv4 direct route on an interface is not associated with the PW status.
Usage Scenario
To adjust the cost of the direct route on an interface based on the PW status, run the direct-route track pw-state command. When the PW status is backup, the cost of the direct route is changed to the configured; when the PW status is active, the cost of the direct route is changed to default value 0. For configurations details, see Configuration-IP Routing Basis Configuration-Configuring an Direct Route to Respond to L3VE Interface Status Changes After a Delay.
Prerequisites
The main VE interface of the sub-interface has been configured as an L3VE interface.
Precautions
The direct-route track pw-state and direct-route track vrrp commands cannot be configured on one L3VE interface. If you run the two commands on one L3VE interface, the latest configuration overrides the previous one.
<HUAWEI> system-view [~HUAWEI] interface virtual-ethernet0/1/8 [~HUAWEI-Virtual-Ethernet0/1/8] ve-group 2 l3-access [*HUAWEI-Virtual-Ethernet0/1/8] interface virtual-ethernet0/1/8.1 [*HUAWEI-Virtual-Ethernet0/1/8.1] direct-route track pw-state degrade-cost 30