8.2 HSRP Configuration
8.2.5 HSRP interface tracking
In many situations, the status of an interface directly affects which router needs to become the active router, particularly when each of the routers in an HSRP group has a different path to resources within the campus network.

In this campus LAN example, Routers A and B reside in a branch office. These two routers each support a FastEthernet link to the backbone. Router A has the higher priority and is the active forwarding router for standby group 50. Router B is the standby router for that group. Router A and B are exchanging hello messages through their FastEthernet 0/0 interfaces.

For example, if the Router-A FastEthernet 0/1 goes down, Router-A loses its direct connection to the backbone. Although this would not prevent traffic from reaching the backbone (Router-A could send everything through Router-B), it does lead to an inefficient traffic flow. Router-A FastEthernet 0/0 interface is still active, so packets destined for the core would still be sent to the active HSRP router, Router-A, just to be forwarded in turn to Router-B (regardless of HSRP). The standby track option can be used to prevent this situation, as shown in the Figure to the left.

To configure HSRP tracking, enter the following command in interface configuration mode:

Router(config-if)#standby group-number track type number interface-priority

The value indicated by the standby track command is the value that gets decremented from the priority of the node if the specified interface goes down. Multiple standby track commands can be used to list multiple interfaces to track. If multiple interfaces fail, the decrement values are cumulative. In the example, if the Router-A FastEthernet 0/1 goes down, the HSRP priority of the router is lowered by 55. Because this is lower than the default priority being used by Router-B, Router-B takes over as the active router, providing optimal flow to the backbone.