Table Of Contents
Enhanced Object Tracking
The Enhanced Object Tracking feature separates the tracking mechanism from the Hot Standby Router Protocol (HSRP) and creates a separate standalone tracking process that can be used by other Cisco IOS processes as well as HSRP. This feature allows tracking of other objects in addition to the interface line-protocol state.
Configuration Information
Configuration information is included in the "Configuring Enhanced Object Tracking" chapter in the Cisco IOS IP Application Services Configuration Guide, Release 12.4T at the following URL:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124tcg/tiapp_c/taipbtrk.htm
Command Reference
This section documents modified commands only.
debug track
To display tracking activity for tracked objects, use the debug track command in privileged EXEC mode. To turn off output, use the no form of this command.
debug track
no debug track
Syntax Description
This command has no arguments or keywords.
Command Modes
Privileged EXEC
Command History
Usage Guidelines
Use this command to display activity for objects being tracked by the tracking process. These objects can be the state of IP routing, the line-protocol state of an interface, the IP-route reachability, and the IP-route threshold metric.
Examples
The following example shows that object number 100 is being tracked and that the state of IP routing on Ethernet interface 0/2 is down:
Router# debug track
Feb 26 19:56:23.247:Track:100 Adding interface objectFeb 26 19:56:23.247:Track:InitialiseFeb 26 19:56:23.247:Track:100 New interface Et0/2, ip routing DownFeb 26 19:56:23.247:Track:Starting processThe following example shows that object number 100 is being tracked and that the state of IP routing on Ethernet interface 0/2 has changed and is back up:
Router# debug track
Feb 26 19:56:41.247:Track:100 Change #2 interface Et0/2, ip routing Down->Up00:15:07:%LINK-3-UPDOWN:Interface Ethernet0/2, changed state to up00:15:08:%LINEPROTO-5-UPDOWN:Line protocol on Interface Ethernet0/2, changed state to upRelated Commands
delay (tracking)
To specify a period of time to delay communicating state changes of a tracked object, use the delay command in tracking configuration mode. To disable the delay period, use the no form of this command.
delay {up seconds [down seconds] | [up seconds] down seconds}
no delay {up seconds [down seconds] | [up seconds] down seconds}
Syntax Description
up
Time to delay the notification of an up event.
down
Time to delay the notification of a down event.
seconds
Delay value, in seconds. The range is from 0 to 180. The default is 0.
Defaults
No delay time is configured for tracking.
Command Modes
Tracking configuration
Command History
Usage Guidelines
This command is available to all tracked objects.
If you specify, for example, delay up 10 down 30, then if the object state changes from down to up, clients tracking that object are notified after 10 seconds. If the object state changes from up to down, then clients tracking that object are notified after 30 seconds.
Examples
In the following example, the tracking process is tracking the IP-route threshold metric. The delay period to communicate the changes of a down event of the tracked object to the client process is set to 30 seconds.
track 1 ip route 10.22.0.0/16 metric thresholdthreshold metric up 16 down 20delay down 30ip vrf
To define a VPN routing and forwarding (VRF) instance and to enter VRF configuration mode, use the ip vrf command in global configuration mode. To remove a VRF instance, use the no form of this command.
ip vrf vrf-name
no ip vrf vrf-name
Syntax Description
Command Default
No VRFs are defined. No import or export lists are associated with a VRF. No route maps are associated with a VRF.
Command Modes
Global configuration
Command History
Usage Guidelines
The ip vrf vrf-name command creates a VRF instance named vrf-name. To make the VRF functional, a route distinguisher (RD) must be created using the rd route-distinguisher command in VRF configuration mode. The rd route-distinguisher command creates the routing and forwarding tables and associates the RD with the VRF instance named vrf-name.
Examples
The following example shows how to import a route map to a VRF instance named VPN1:
ip vrf vpn1
rd 100:2
route-target both 100:2
route-target import 100:1
Related Commands
show track
To display information about objects that are tracked by the tracking process, use the show track command in privileged EXEC mode.
show track [object-number [brief] | interface [brief] | ip route [brief] | resolution | timers]
Syntax Description
Command Modes
Privileged EXEC
Command History
Usage Guidelines
Use this command to display information about objects that are tracked by the tracking process. When no arguments or keywords are specified, information for all objects is displayed.
Examples
The following example shows information about the state of IP routing on the interface that is being tracked:
Router# show track 1
Track 1Interface Ethernet0/2 ip routingIP routing is Down (no IP addr)1 change, last change 00:01:08Tracked by:HSRP Ethernet0/3 1The following example shows information about the line-protocol state on the interface that is being tracked:
Router# show track 1
Track 1Interface Ethernet0/1 line-protocolLine protocol is Up1 change, last change 00:00:05Tracked by:HSRP Ethernet0/3 1The following example shows information about the reachability of a route that is being tracked:
Router# show track 1
Track 1IP route 10.16.0.0 255.255.0.0 reachabilityReachability is Up (RIP)1 change, last change 00:02:04First-hop interface is Ethernet0/1Tracked by:HSRP Ethernet0/3 1The following example shows information about the threshold metric of a route that is being tracked:
Router# show track 1
Track 1IP route 10.16.0.0 255.255.0.0 metric thresholdMetric threshold is Up (RIP/6/102)1 change, last change 00:00:08Metric threshold down 255 up 254First-hop interface is Ethernet0/1Tracked by:HSRP Ethernet0/3 1The following example shows the object type, the interval in which it is polled, and the time until the next poll:
Router# show track timers
Object type Poll Interval Time to next pollinterface 1 expiredip route 30 29.364Table 1 describes the significant fields shown in the displays.
The following output shows that there are two objects. Object 1 has been configured with a weight of 10 "down," and object 2 has been configured with a weight of 20 "up." Object 1 is down (expressed as 0/10) and object 2 is up. The total weight of the tracked list is 20 with a maximum of 30 (expressed as 20/30). The "up" threshold is 20, so the list is "up."
Router# show track
Track 6List threshold weightThreshold weight is Up (20/30)1 change, last change 00:00:08object 1 Down (0/10)object 2 weight 20 Up (20/30)Threshold weight down 10 up 20Tracked by:HSRP Ethernet0/3 1The following example shows information about the Boolean configuration:
Router# show track
Track 3List boolean andBoolean AND is Down1 change, last change 00:00:08object 1 not Upobject 2 DownTracked by:HSRP Ethernet0/3 1Table 2 describes the significant fields shown in the displays.
The following example shows information about a stub object that has been created to be tracked using Embedded Event Manager (EEM):
Router# show track
Track 1Stub-objectState is Up1 change, last change 00:00:04, by UndefinedThe following example shows information about a stub object when the brief keyword is used:
Router# show track brief
Track Object Parameter Value Last Change1 Stub-object Undefined Up 00:00:12Table 3 describes the significant fields shown in the displays.
Related Commands
threshold metric
To set a threshold metric other than the default value, use the threshold metric command in tracking configuration mode. To disable the threshold metric, use the no form of this command.
threshold metric {up number [down number] | down number [up number]}
no threshold metric
Syntax Description
Defaults
No threshold is configured.
Command Modes
Tracking configuration
Command History
Usage Guidelines
This command is available only to IP-route threshold metric objects tracked by the track ip route metric threshold global configuration command.
The default up and down threshold values are 254 and 255, respectively. With these values, IP-route threshold tracking gives the same result as IP-route reachability tracking.
Examples
In the following example, the tracking process is tracking the IP-route threshold metric. The metric default value is changed to 16 for the up threshold and to 20 for the down threshold.
track 1 ip route 10.22.0.0/16 metric thresholdthreshold metric up 16 down 20delay down 20Related Commands
Command Descriptiontrack ip route
Tracks the state of IP routing and enters tracking configuration mode.
track interface
To configure an interface to be tracked and to enter tracking configuration mode, use the track interface command in global configuration mode. To remove the tracking, use the no form of this command.
track object-number interface type number {line-protocol | ip routing}
no track object-number interface type number {line-protocol | ip routing}
Syntax Description
Defaults
No interface is tracked.
Command Modes
Global configuration
Command History
Usage Guidelines
This command reports a state value to clients. A tracked 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 in 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
Examples
In the following example, the tracking process is configured to track the IP-routing capability of serial interface 1/0:
track 1 interface serial1/0 ip routingRelated Commands
track ip route
To track the state of an IP route and to enter tracking configuration mode, use the track ip route command in global configuration mode. To remove the tracking, use the no form of this command.
track object-number ip route ip-address/prefix-length {reachability | metric threshold}
no track object-number ip route ip-address/prefix-length {reachability | metric threshold}
Syntax Description
Defaults
The route to the subnet address is not tracked.
Command Modes
Global configuration
Command History
Usage Guidelines
A tracked IP-route object is considered up and reachable when a routing-table entry exists for the route and the route is not inaccessible.
To provide a common interface to tracking clients, route metric values are normalized to the range of 0 to 255, where 0 is connected and 255 is inaccessible. 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.
The tracking process uses a per-protocol configurable resolution value to convert the real metric to the scaled metric. The metric value communicated to clients is always such that a lower metric value is better than a higher metric value.
Use the threshold metric tracking configuration command to specify a threshold metric other than the default threshold metric.
Examples
In the following example, the tracking process is configured to track the reachability of 10.22.0.0/16:
track 1 ip route 10.22.0.0/16 reachabilityIn the following example, the tracking process is configured to track the threshold metric using the default threshold metric values:
track 1 ip route 10.22.0.0/16 metric thresholdRelated Commands
Command Descriptionshow track
Displays HSRP tracking information.
threshold metric
Sets a threshold metric other than the default value.
track timer
To specify the interval in which the tracking process polls the tracked object, use the track timer command in tracking configuration mode. To disable this functionality, use the no form of this command.
track timer {interface | ip route} seconds
no track timer {interface | ip route} seconds
Syntax Description
Defaults
If you do not use the track timer command to specify a polling interval, a tracked object will be tracked at the default polling interval.
Command Modes
Tracking configuration
Command History
Examples
In the following example, the tracking process is configured to poll the tracked interface every 3 seconds:
track timer interface 3