Table Of Contents
Information About Enhanced Object Tracking
Feature Design of Enhanced Object Tracking
Benefits of Enhanced Object Tracking
How to Configure Enhanced Object Tracking
Tracking the IP-Routing State of an Interface
Tracking the Line-Protocol State of an Interface
Tracking IP-Route Reachability
Tracking the Threshold of IP-Route Metrics
Configuring a Tracked List and Boolean Expression
Configuring a Tracked List and Threshold Weight
Configuring a Tracked List and Threshold Percentage
Configuring the Track List Defaults
Configuring HSRP Object Tracking
Configuring the Polling Interval
Verifying Enhanced Object Tracking
Configuration Examples for Enhanced Object Tracking
Interface Line Protocol: Example
IP-Route Reachability: Example
IP-Route Threshold Metric: Example
Threshold Weight for a Tracked List Configuration: Example
Threshold Percentage for a Tracked List Configuration: Example
Boolean Expression for a Tracked List Configuration: Example
Enhanced Object Tracking
Prior to the introduction of the Enhanced Object Tracking feature, the Hot Standby Router Protocol (HSRP) had a simple tracking mechanism that allowed you to track the interface line-protocol state only. If the line-protocol state of the interface went down, the HSRP priority of the router was reduced, allowing another HSRP router with a higher priority to become active.
The Enhanced Object Tracking feature separates the tracking mechanism from HSRP and creates a separate standalone tracking process that can be used by any other process as well as HSRP. This feature allows tracking of other objects in addition to the interface line-protocol state.
A client process, such as HSRP, Virtual Router Redundancy Protocol (VRRP), or Gateway Load Balancing Protocol (GLBP), can now register its interest in tracking objects and then be notified when the tracked object changes state. The object can be an interface or a route.
Feature History for the Enhanced Object Tracking Feature
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
Information About Enhanced Object Tracking
•
How to Configure Enhanced Object Tracking
•
Configuration Examples for Enhanced Object Tracking
Information About Enhanced Object Tracking
Before you configure the Enhanced Object Tracking feature, you should understand the following concepts:
•
Feature Design of Enhanced Object Tracking
•
Benefits of Enhanced Object Tracking
Feature Design of Enhanced Object Tracking
The Enhanced Object Tracking feature provides complete separation between the objects to be tracked and the action to be taken by a client when a tracked object changes. Thus, several clients such as HSRP, VRRP, or GLPB can register their interest with the tracking process, track the same object, and each take different action when the object changes.
Each tracked object is identified by a unique number that is specified on the tracking command-line interface (CLI). Client processes use this number to track a specific object.
The tracking process periodically polls the tracked objects and notes any change of value. The changes in the tracked object are communicated to interested client processes, either immediately or after a specified delay. The object values are reported as either up or down.
In this release, the tracking capabilities have been enhanced to enable the configuration of a combination of tracked objects in a list, and a flexible method of combining objects using Boolean logic. The enhancements introduced the following capabilities:
•
Threshold—The tracked list can be configured to use a weight or percentage threshold to measure the state of the list. Each object in a tracked list can be assigned a threshold weight. The state of the tracked list is determined by whether or not the threshold has been met.
•
Boolean "and" function—When a tracked list has been assigned a Boolean "and" function, it means that each object defined within a subset must be in an up state so that the tracked object can become up.
•
Boolean "or" function—When the tracked list has been assigned a Boolean "or" function, it means that at least one object defined within a subset must be in an up state so that the tracked object can become up.
Benefits of Enhanced Object Tracking
•
Increases the availability and speed of recovery of a router system.
•
Decreases outages and their duration.
•
Provides a scalable solution that allows other processes such as VRRP and GLBP to track objects individually or a list of objects. Prior to the introduction of this feature, the tracking process was embedded within HSRP.
How to Configure Enhanced Object Tracking
The following sections describe configuration tasks for enhanced object tracking:
•
Tracking the IP-Routing State of an Interface (optional)
•
Tracking the Line-Protocol State of an Interface (optional)
•
Tracking IP-Route Reachability (optional)
•
Tracking the Threshold of IP-Route Metrics (optional)
•
Configuring a Tracked List and Boolean Expression (optional)
•
Configuring a Tracked List and Threshold Weight (optional)
•
Configuring a Tracked List and Threshold Percentage (optional)
•
Configuring the Track List Defaults (optional)
•
Configuring HSRP Object Tracking (optional)
•
Configuring the Polling Interval (optional)
•
Verifying Enhanced Object Tracking (optional)
Tracking the IP-Routing State of an Interface
Perform this task to track the IP-routing state of an interface. An IP-routing object is considered up when the following criteria exist:
•
IP routing is enabled and active on the interface.
•
The interface line-protocol state is up.
•
The interface IP address is known. The IP address is configured or received through the Dynamic Host Configuration Protocol (DHCP) or IP Control Protocol (IPCP) negotiation.
Interface IP routing will go down when one of the following criteria exist:
•
IP routing is disabled globally.
•
The interface line-protocol state is down.
•
The interface IP address is unknown. The IP address is not configured or received through DHCP or IPCP negotiation.
Tracking the IP-routing state of an interface using the track interface ip routing command can be more useful in some situations than just tracking the line-protocol state using the track interface line-protocol command, especially on interfaces for which IP addresses are negotiated. For example, on a serial interface that uses the Point-to-Point Protocol (PPP), the line protocol could be up [link control protocol (LCP) negotiated successfully], but IP could be down (IPCP negotiation failed).
The track interface ip routing command supports the tracking of an interface with an IP address acquired through any of the following methods:
•
Conventional IP address configuration
•
PPP/IPCP
•
DHCP
•
Unnumbered interface
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track object-number interface type number ip routing
4.
delay {up seconds [down seconds] | [up seconds] down seconds}
5.
exit
DETAILED STEPS
Tracking the Line-Protocol State of an Interface
Perform this task to track the line-protocol state of an interface.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track object-number interface type number line-protocol
4.
delay {up seconds [down seconds] | [up seconds] down seconds}
5.
exit
DETAILED STEPS
Tracking IP-Route Reachability
Perform this task to track the reachability of an IP route. A tracked object is considered up when a routing table entry exists for the route and the route is accessible.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track object-number ip route ip-address/prefix-length reachability
4.
delay {up seconds [down seconds] | [up seconds] down seconds}
5.
ip vrf vrf-name
6.
exit
DETAILED STEPS
Tracking the Threshold of IP-Route Metrics
Perform this task to track the threshold of IP route metrics.
Scaled Route Metrics
The track ip route command enables tracking of a route in the routing table. If a route exists in the table, the metric value is converted into a number. To provide a common interface to tracking clients, route metric values are normalized to the range from 0 to 255, where 0 is connected and 255 is inaccessible. Scaled metrics can be tracked by setting thresholds. Up and down state notification occurs when the thresholds are crossed. The resulting value is compared against threshold values to determine the tracking state as follows:
•
State is up if the scaled metric for that route is less than or equal to the up threshold.
•
State is down if the scaled metric for that route is greater than or equal to the down threshold.
Tracking uses a per-protocol configurable resolution value to convert the real metric to the scaled metric. Table 1 shows the default values used for the conversion. You can use the track resolution command to change the metric resolution default values.
Table 1 Metric Conversion
Route Type1 Metric ResolutionStatic
10
Enhanced Interior Gateway Routing Protocol (EIGRP)
2560
Open Shortest Path First (OSPF)
1
Intermediate System-to-Intermediate System (IS-IS)
10
1 RIP is scaled directly to the range from 0 to 255 because its
maximum metric is less than 255.
For example, a change in 10 in an IS-IS metric results in a change of 1 in the scaled metric. The default resolutions are designed so that approximately one 2-Mbps link in the path will give a scaled metric of 255.
Scaling the very large metric ranges of EIGRP and IS-IS to a 0 to 255 range is a compromise. The default resolutions will cause the scaled metric to go above the maximum limit with a 2-Mbps link. However, this scaling allows a distinction between a route consisting of three Fast-Ethernet links and a route consisting of four Fast-Ethernet links.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track resolution ip route {eigrp resolution-value | isis resolution-value | ospf resolution-value | static resolution-value}
4.
track object-number ip route ip-address/prefix-length metric threshold
5.
delay {up seconds [down seconds] | [up seconds] down seconds}
6.
ip vrf vrf-name
7.
threshold metric {up number down number | up number | down number}
8.
end
DETAILED STEPS
Configuring a Tracked List and Boolean Expression
Perform this task to configure a tracked list of objects and a Boolean expression to determine the state of the list. A tracked list contains one or more objects. The Boolean expression enables two types of calculation by using either "and" or "or" operators. For example, when tracking two interfaces using the "and" operator, up means that both interfaces are up, and down means that either interface is down.
You may also configure a tracked list state to be measured using a weight or percentage threshold. See "Configuring a Tracked List and Threshold Weight" section and "Configuring a Tracked List and Threshold Percentage" section.
Note
The "not" operator is specified for one or more objects and negates the state of the object.
Prerequisites
An object must exist before it can be added to a tracked list.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track track-number list boolean {and | or}
4.
object object-number [not]
5.
delay {up seconds [down seconds] | [up seconds] down seconds}
6.
exit
DETAILED STEPS
Examples
The following configuration example shows that tracked list 4 has two objects and one object state is negated (if the list is up, the list detects that object 2 is down):
track 4 list boolean andobject 1object 2 notConfiguring a Tracked List and Threshold Weight
Perform this task to configure a tracked list of objects, to specify that weight be used as the threshold, and to configure a weight for each of its objects. A tracked list contains one or more objects. Using a weight threshold the state of each object is determined by comparing the total weight of all objects that are up against a threshold weight for each object.
You may also configure a tracked list state to be measured using a Boolean calculation or threshold percentage. See "Configuring a Tracked List and Boolean Expression" section and "Configuring a Tracked List and Threshold Percentage" section.
Prerequisites
An object must exist before it can be added to a tracked list.
Restrictions
You cannot use the Boolean "not" operator in a weight or percentage threshold list.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track track-number list threshold weight
4.
object object-number [weight weight-value]
5.
threshold weight {up number | down number}
6.
delay {up seconds [down seconds] | [up seconds] down seconds}
7.
exit
DETAILED STEPS
Examples
The following configuration example shows that if object 1, and object 2 are down, then track list 4 is up, because object 3 satisfies the up threshold value of up 30. But, if object 3 is down, both objects 1 and 2 need to be up in order to satisfy the threshold weight.
track 4 list threshold weightobject 1 weight 15object 2 weight 20object 3 weight 30threshold weight up 30 down 10This configuration may be useful to you if you have two small bandwidth connections (represented by object 1 and 2) and one large bandwidth connection (represented by object 3). Also the down 10 value means that once the tracked object is up, it will not go down until the threshold value is lower or equal to 10, which in this example means that all connections are down.
Configuring a Tracked List and Threshold Percentage
Perform this task to configure a tracked list of objects, to specify that a percentage will be used as the threshold, and to specify a percentage for each object in the list. A tracked list contains one or more objects. Using the percentage threshold, the state of the list is determined by comparing the assigned percentage of each object to the list.
You may also configure a tracked list state to be measured using a Boolean calculation or threshold weight. See "Configuring a Tracked List and Boolean Expression" section and "Configuring a Tracked List and Threshold Weight" section.
Prerequisites
An object must exist before it can be added to a tracked list.
Restrictions
You cannot use the Boolean "not" operator in a weight or percentage threshold lists.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track track-number list threshold percentage
4.
object object-number
5.
threshold percentage {up number | down number}
6.
delay {up seconds [down seconds] | [up seconds] down seconds}
7.
exit
DETAILED STEPS
Examples
The following configuration example shows that tracked list 4 has three objects and specified percentages to measure the state of the list:
track 4 list threshold percentageobject 1object 2object 3threshold percentage up 51 down 10Configuring the Track List Defaults
Perform this task to configure a default delay value for a tracked list, a default object, and default threshold parameters for a tracked list.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track track-number list
4.
default {delay | object object-number | threshold percentage}
5.
exit
DETAILED STEPS
Configuring HSRP Object Tracking
Perform this task to configure a standby HSRP group to track an object and change the HSRP priority on the basis of the object state.
Note
There are many protocols that can use the tracking feature in addition to HSRP.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
track object-number interface type-number {line-protocol | ip routing}
4.
exit
5.
interface type number
6.
standby [group-number] ip [ip-address [secondary]]
7.
standby [group-number] track object-number [decrement [priority-decrement]]
8.
end
DETAILED STEPS
Command or Action PurposeStep 1
enable
Example:Router> enable
Enables privileged EXEC mode.
•
Enter your password if prompted.
Step 2
configure terminal
Example:Router# configure terminal
Enters global configuration mode.
Step 3
track object-number interface type-number {line-protocol | ip routing}
Example:Router(config)# track 100 interface serial2/0 line-protocol
Configures an interface to be tracked and enters tracking configuration mode.
Note
Repeat this step for each interface to be tracked.
Step 4
exit
Example:Router(config-track)# exit
Returns to global configuration mode.
Step 5
interface type number
Example:Router(config)# interface ethernet 2
Enters interface configuration mode.
Step 6
standby [group-number] ip [ip-address [secondary]]
Example:Router(config-if)# standby 1 ip 10.10.10.0
Creates an HSRP group. The arguments and keywords are as follows:•
group-number—(Optional) Group number on the interface for which HSRP is being activated. The default is 0. The group number range is from 0 to 255 for HSRP version 1 and from 0 to 4095 for HSRP version 2.
•
ip ip-address—(Optional) Primary IP address.
•
secondary—(Optional) IP address is secondary. If this keyword is omitted, the configured address is the primary IP address.
Step 7
standby [group-number] track object-number [decrement [priority-decrement]]
Example:Router(config-if)# standby 1 track 100 decrement 20
Configures HSRP to track an object and change the Hot Standby priority on the basis of the state of the object.
•
group-number—(Optional) Number that represents the group to which the tracking applies.
•
object-number—Number that represents the object to be tracked. The range is from 1 to 500. The default is 1.
•
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.
Note
If you have a Cisco IOS Release 12.2(13)T or earlier image installed, the syntax is different from the syntax shown in this step. Refer to Cisco IOS IP Command Reference, Volume 1 of 3: Addressing and Services, Release 12.2 T for earlier command syntax.
Step 8
exit
Example:Router(config-if)# exit
Returns to privileged EXEC mode.

