Guest

Cisco IOS Software Releases 12.2 SB

Enhanced Object Tracking

  • Viewing Options

  • PDF (237.5 KB)
  • Feedback
Enhanced Object Tracking

Table Of Contents

Enhanced Object Tracking

debug track

delay (tracking)

ip vrf

show track

threshold metric

track interface

track ip route

track timer


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

delay (tracking)

ip vrf

show track

threshold metric

track interface

track ip route

track timer

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

Release
Modification

12.2(15)T

This command was introduced.

12.3(8)T

The output was enhanced to include the track-list objects.

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.


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 object
Feb 26 19:56:23.247:Track:Initialise
Feb 26 19:56:23.247:Track:100 New interface Et0/2, ip routing Down
Feb 26 19:56:23.247:Track:Starting process

The 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->Up
00:15:07:%LINK-3-UPDOWN:Interface Ethernet0/2, changed state to up
00:15:08:%LINEPROTO-5-UPDOWN:Line protocol on Interface Ethernet0/2, changed state to up

Related Commands

Command
Description

show track

Displays tracking information.


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

Release
Modification

12.2(15)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)B.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.


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 threshold
 threshold metric up 16 down 20
 delay down 30

ip 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

vrf-name

Name assigned to a VRF.


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

Release
Modification

12.0(5)T

This command was introduced.

12.0(21)ST

This command was integrated into Cisco IOS Release 12.0(21)ST.

12.0(22)S

This command was integrated into Cisco IOS Release 12.0(22)S.

12.2(14)S

This command was integrated into Cisco IOS 12.2(14)S.

12.2(27)SBC

This command was integrated into Cisco IOS Release 12.2(27)SBC.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.


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

Command
Description

ip vrf forwarding (interface configuration)

Associates a VRF with an interface or subinterface.

rd

Creates routing and forwarding tables for a VRF and specifies the default route distinguisher for a VPN.


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

object-number

(Optional) Object number that represents the object to be tracked. The range is from 1 to 500.

brief

(Optional) Displays a single line of information related to the preceding argument or keyword.

interface

(Optional) Displays tracked interface objects.

ip route

(Optional) Displays tracked IP-route objects.

resolution

(Optional) Displays resolution of tracked parameters.

timers

(Optional) Displays polling interval timers.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(15)T

This command was introduced.

12.3(8)T

The output was enhanced to include the track-list objects.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.4(2)T

The output was enhanced to display stub objects.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.


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 1
 Interface Ethernet0/2 ip routing
 IP routing is Down (no IP addr)
  1 change, last change 00:01:08
 Tracked by:
  HSRP Ethernet0/3 1

The following example shows information about the line-protocol state on the interface that is being tracked:

Router# show track 1

Track 1
 Interface Ethernet0/1 line-protocol
 Line protocol is Up
  1 change, last change 00:00:05
 Tracked by:
  HSRP Ethernet0/3 1

The following example shows information about the reachability of a route that is being tracked:

Router# show track 1

Track 1
 IP route 10.16.0.0 255.255.0.0 reachability
 Reachability is Up (RIP)
  1 change, last change 00:02:04
 First-hop interface is Ethernet0/1
 Tracked by:
  HSRP Ethernet0/3 1

The following example shows information about the threshold metric of a route that is being tracked:

Router# show track 1

Track 1
 IP route 10.16.0.0 255.255.0.0 metric threshold
 Metric threshold is Up (RIP/6/102)
  1 change, last change 00:00:08
 Metric threshold down 255 up 254
 First-hop interface is Ethernet0/1
 Tracked by:
  HSRP Ethernet0/3 1

The 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 poll
 interface     1              expired
 ip route      30             29.364

Table 1 describes the significant fields shown in the displays.

Table 1 show track Field Descriptions 

Field
Description

Track

Object number that is being tracked.

Interface Ethernet0/2 ip routing

Interface type, number, and object that is being tracked.

IP routing is

State value of the object, displayed as Up or Down. If the object is down, the reason is displayed.

1 change, last change

Number of times that the state of a tracked object has changed and the time (in hh:mm:ss) since the last change.

Tracked by

Client process that is tracking the object.

First-hop interface is

Displays the first-hop interface.

Object type

Object type that is being tracked.

Poll Interval

Interval (in seconds) in which the tracking process polls the object.

Time to next poll

Period of time, in seconds, until the next polling of the object.


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 6
 List threshold weight
  Threshold weight is Up (20/30)
   1 change, last change 00:00:08
   object 1 Down (0/10)
   object 2 weight 20 Up (20/30)
  Threshold weight down 10 up 20
   Tracked by:
    HSRP Ethernet0/3 1

The following example shows information about the Boolean configuration:

Router# show track

 Track 3
 List boolean and 
 Boolean AND is Down
  1 change, last change 00:00:08
   object 1 not Up
   object 2 Down
 Tracked by:
  HSRP Ethernet0/3 1

Table 2 describes the significant fields shown in the displays.

Table 2 show track Field Descriptions 

Field
Description

Track

Object number that is being tracked.

Boolean AND is Down

Each object defined in the list must be in a down state.

1 change, last change

Number of times that the state of a tracked object has changed and the time (in hh:mm:ss) since the last change.

Tracked by

Client process that is tracking the object; in this case, HSRP.


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 1
  Stub-object
  State is Up
    1 change, last change 00:00:04, by Undefined

The following example shows information about a stub object when the brief keyword is used:

Router# show track brief

Track   Object                           Parameter        Value Last Change
1       Stub-object Undefined                             Up    00:00:12


Table 3 describes the significant fields shown in the displays.

Table 3 show track brief Field Descriptions 

Field
Description

Track

Object number that is being tracked.

Object

Definition of stub object.

Parameter

Tracking parameters.

Value

State value of the object, displayed as Up or Down.

Last Change

Time (in hh:mm:ss) since the state of a tracked object last changed.


Related Commands

Command
Description

track interface

Configures an interface to be tracked and enters tracking configuration mode.

track ip route

Tracks the state of an IP route and enters tracking configuration mode.


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

up

Specifies the up threshold. The state is up if the scaled metric for that route is less than or equal to the up threshold. The default up threshold is 254.

down

Specifies the down threshold. The state is down if the scaled metric for that route is greater than or equal to the down threshold. The default down threshold is 255.

number

Threshold value. The range is from 0 to 255.


Defaults

No threshold is configured.

Command Modes

Tracking configuration

Command History

Release
Modification

12.2(15)T

This command was introduced.

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.


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 threshold
 threshold metric up 16 down 20 
 delay down 20

Related Commands

Command
Description

track 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

object-number

Object number that represents the interface to be tracked. The range is from 1 to 500.

type number

Interface type and number to be tracked. No space is required between the values.

line-protocol

Tracks the state of the interface line protocol.

ip routing

Tracks whether IP routing is enabled, whether an IP address is configured on the interface, and whether the interface state is up before reporting to the tracking client that the interface is up.


Defaults

No interface is tracked.

Command Modes

Global configuration

Command History

Release
Modification

12.2(15)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.3(11)T

The track interface ip routing command was enhanced to allow the tracking of an IP address on an interface that was acquired through DHCP or PPP IPCP.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.


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 routing

Related Commands

Command
Description

show track

Displays HSRP tracking information.


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

object-number

Object number that represents the object to be tracked. The range is from 1 to 500.

ip-address

IP subnet address to the route that is being tracked.

/prefix-length

The number of bits that comprise the address prefix. A slash must precede the value.

reachability

Tracks whether the route is reachable.

metric threshold

Tracks the threshold metric. The default up threshold is 254 and the default down threshold is 255.


Defaults

The route to the subnet address is not tracked.

Command Modes

Global configuration

Command History

Release
Modification

12.2(15)T

This command was introduced.

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.


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 reachability

In 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 threshold

Related Commands

Command
Description

show 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

interface

Tracks the specified interface.

ip route

Tracks the specified IP route.

seconds

Interval (in seconds) in which the tracking process polls the object. The range is from 1 to 3000. The interface polling interval default is 1 second, and the IP-route polling interval default is 15 seconds.


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

Release
Modification

12.2(15)T

This command was introduced.

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.


Examples

In the following example, the tracking process is configured to poll the tracked interface every 3 seconds:

track timer interface 3