To configure the Hot Standby Router Protocol (HSRP) to track an object and change the Hot Standby priority on the basis of
the state of the object, use the
standby
track command in interface configuration mode. To remove the tracking, use the
no form of this command.
Cisco IOS XE Release 2.1 and Later Releases
standby track {object-number | interface-type interface-number [decrement priority-decrement]} [shutdown]
no standby track {object-number | interface-type interface-number}
Cisco IOS Release 12.2(33)SXH, 12.2(33)SRB, and Later Releases
standby track {object-number | interface-type interface-number [decrement priority-decrement]} [shutdown]
no standby track {object-number | interface-type interface-number}
Cisco IOS Release 12.4(9)T and Later Releases
standby track {object-number [priority-decrement] | interface-type interface-number [decrement priority-decrement]} [shutdown]
no standby track {object-number | interface-type interface-number}
Cisco IOS Release 12.2(15)T and Later Releases
standby track {object-number [priority-decrement] | interface-type interface-number [decrement priority-decrement]}
no standby track {object-number | interface-type interface-number}
Cisco IOS Releases 12.2(13)T, 12.2(14)SX, 12.2(17dSXB), 12.2(33)SRA, and Earlier Releases
standby track interface-type interface-number [interface-priority]
no standby track interface-type interface-number [interface-priority]
Syntax Description
object-number
|
Object number that represents the object to be tracked. The range is from 1 to 1000. The default is 1.
|
interface-type
|
Interface type (combined with interface number) that will be tracked.
|
interface-number
|
Interface number (combined with interface type) that will be tracked.
|
decrement
priority-decrement
|
(Optional) Amount by which the Hot Standby priority for the router is decremented (or incremented) when the tracked object
goes down (or comes back up). The range is from 1 to 255. The default is 10.
|
shutdown
|
(Optional) Changes the HSRP group to the Init state on the basis of the state of a tracked object.
|
interface-priority
|
(Optional) Amount by which the Hot Standby priority for the router is decremented (or incremented) when the interface goes
down (or comes back up). The range is from 0 to 255. The default is 10.
|
group-number
|
(Optional) Group number to which the tracking applies.
|
Command Default
There is no tracking.
Command Modes
Interface configuration (config-if)
Command History
Release
|
Modification
|
10.3
|
This command was introduced.
|
12.2(15)T
|
This command was enhanced to allow HSRP to track objects other than the interface line-protocol state.
|
12.2(14)SX
|
Support for this command was introduced on the Cisco 7600 series routers running a Supervisor Engine 720 .
|
12.2(17d)SXB
|
This command was integrated into Cisco IOS release 12.2(17d)SXB.
|
12.2(25)S
|
This command was integrated into Cisco IOS Release 12.2(25)S.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.4(9)T
|
The
shutdown keyword was added.
|
12.2(33)SXH
|
This command was integrated into Cisco IOS Release 12.2(33)SXH.
|
Cisco IOS XE Release 2.1
|
This command was integrated into Cisco IOS XE Release 2.1.
|
15.1(3)T
|
This command was modified. The valid range of the
object-number argument increased to 1000.
|
15.1(1)S
|
This command was modified. The valid range for the
object-number argument increased to 1000.
|
12.2(50)SY
|
This command was modified. The valid range for the
object-number argument increased to 1000.
|
Usage Guidelines
This command ties the Hot Standby priority of the router to the availability of its tracked objects. Use the
track
interface command or
track
ip
route command to track an interface object or an IP-route object. The HSRP client can register its interest in the tracking process
by using the
standby
track command and take action when the object changes.
When a tracked object goes down, the Hot Standby priority decreases by 10. If an object is not tracked, its state changes
do not affect the Hot Standby priority. For each object configured for Hot Standby, you can configure a separate list of objects
to be tracked.
The optional
priority-decrement and
interface-priority arguments specify how much to decrement the Hot Standby priority when a tracked object goes down. When the tracked object
comes back up, the priority is incremented by the same amount.
When multiple tracked objects are down, the decrements are cumulative, whether configured with
priority-decrement or
interface-priority values or not.
The optional
shutdown keyword configures the HSRP group to change to the Init state and become disabled rather than having its priority decremented
when a tracked object goes down.
Use the
no
standby
group-number
track command to delete all tracking configuration for a group.
When group number 0 is used, no group number is written to NVRAM, providing backward compatibility.
The
standby
track command syntax prior to Cisco IOS Release 12.2(15)T is still supported. Using the older form of the command syntax will cause
a tracked object to be created in the new tracking process. This tracking information can be displayed using the
show
track command.
Note |
Using the command syntax of
standby
track prior to Cisco IOS Release 12.2(15)T results in the same performance as using the new
standby
track command syntax.
|
If you configure HSRP to track an interface, and that interface is physically removed as in the case of an Online Insertion
and Removal (OIR) operation, then HSRP regards the interface as always down. You cannot remove the HSRP interface-tracking
configuration. To prevent this situation, use the
no
standby
track command before you physically remove the interface.
If an object is already being tracked by an HSRP group, you cannot change the configuration to use the HSRP Group Shutdown
feature that disables the HSRP group. You must first remove the tracking configuration using the
no
standby
track command and then reconfigure it using the
standby
track command with the
shutdown keyword.
As of Cisco IOS Release 15.1(3)T, 15.1(1)S, and 12.2(50)SY, a maximum of 1000 objects can be tracked. Although 1000 tracked
objects can be configured, each tracked object uses CPU resources. The amount of available CPU resources on a router is dependent
upon variables such as traffic load and how other protocols are configured and run. The ability to use 1000 tracked objects
is dependent upon the available CPU. Testing should be conducted on site to ensure that the service works under the specific
site traffic conditions.
Examples
In the following example, the tracking process is configured to track the IP-routing capability of serial interface 1/0.
HSRP on Ethernet interface 0/0 then registers with the tracking process to be informed of any changes to the IP-routing state
of serial interface 1/0. If the IP state on serial interface 1/0 goes down, the priority of the HSRP group is reduced by 10.
If both serial interfaces are operational, Router A will be the HSRP active router because it has the higher priority. However,
if IP routing on serial interface 1/0 in Router A fails, the HSRP group priority will be reduced and Router B will take over
as the active router, thus maintaining a default virtual gateway service to hosts on the 10.1.0.0 subnet.
Examples
Router(config)# track 100 interface serial1/0 ip routing
Router(config-track)# exit
Router(config)# interface Ethernet0/0
Router(config-if)# ip address 10.1.0.21 255.255.0.0
Router(config-if)# standby 1 ip 10.1.0.1
Router(config-if)# standby 1 preempt
Router(config-if)# standby 1 priority 105
Router(config-if)# standby 1 track 100 decrement 10
Examples
Router(config)# track 100 interface serial1/0 ip routing
Router(config-track)# exit
Router(config)# interface Ethernet0/0
Router(config-if)# ip address 10.1.0.22 255.255.0.0
Router(config-if)# standby 1 ip 10.1.0.1
Router(config-if)# standby 1 preempt
Router(config-if)# standby 1 priority 11
Router(config-if)# standby 1 track 100 decrement 10
The following example shows how to change the configuration of a tracked object to include the HSRP Group Shutdown feature:
Router(config-if)# no standby 1 track 101 decrement 10
Router(config-if)# standby 1 track 101 shutdown