HSRP Object Tracking
HSRP object tracking allows you to modify the priority of an HSRP interface based on the operational state of another interface. The tracking process periodically polls the tracked objects and notes any value change. The value change triggers HSRP to recalculate the priority. The HSRP interface with the higher priority becomes the active router if you configure the HSRP interface for preemption.
Two objects you can track are the line protocol state of an interface and the reachability of an IP route. If the specified object goes down, Cisco NX-OS reduces the HSRP priority by the configured amount. Object tracking allows you to route to a standby router if the interface to the main network fails.
Figure 3-4 illustrates the HSRP object-tracking feature. In the left diagram, uplinks from Router A and Router B were tracked by HSRP. Router A was the HSRP standby router and Router B was the HSRP active router. When the uplink from Router B fails, HSRP decreases the HSRP priority on Router B, making Router A the active router to process the traffic.
Figure 3-4 HSRP Object (Interface) Tracking
HSRP Load Balancing
HSRP allows you to configure multiple groups on an interface. You can configure two overlapping IPv4 HSRP groups to load share the traffic from the connected hosts while providing the default router redundancy expected from HSRP.
Figure 3-5 illustrates HSRP load balancing.
Figure 3-5 HSRP Load Balancing
Figure 3-5 shows two routers (A and B) and two HSRP groups (10 and 20). Router A is the active router for group 10 but is the standby router for group 20. Similarly, Router B is the active router for group 20 and the standby router for group 10. If both routers remain active, HSRP load-balances the traffic from the hosts across both routers. If either router fails, the remaining router continues to process traffic for both hosts.
HSRP States
Each HSRP router will go through a number of states before it ends up as an active or standby router. Table 3-1 describes the various HSRP states.
Table 3-1 HSRP States
State | Definition |
Initial | This is the state at the start. This state indicates that HSRP does not run. This state is entered through a configuration change or when an interface first becomes available. |
Learn | The router has not determined the virtual IP address and has not yet seen an authenticated hello message from the active router. In this state, the router still waits to hear from the active router. |
Listen | The router knows the virtual IP address, but the router is neither the active router nor the standby router. It listens for hello messages from those routers. |
Speak | The router sends periodic hello messages and actively participates in the election of the active and/or standby router. A router cannot enter speak state unless the router has the virtual IP address. |
Standby | The router is a candidate to become the next active router and sends periodic hello messages. With the exclusion of transient conditions, there is, at most, one router in the group in standby state. |
Active | The router currently forwards packets that are sent to the group virtual MAC address. The router sends periodic hello messages. With the exclusion of transient conditions, there must be, at most, one router in active state in the group. |