Guest

Cisco IOS Software Releases 12.2 T

Enhanced Object Tracking

Table Of Contents

Enhanced Object Tracking

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

Scaled Route Metrics

Configuring a Tracked List and Boolean Expression

Prerequisites

Examples

Configuring a Tracked List and Threshold Weight

Prerequisites

Restrictions

Examples

Configuring a Tracked List and Threshold Percentage

Prerequisites

Restrictions

Examples

Configuring the Track List Defaults

Configuring HSRP Object Tracking

Examples

Configuring the Polling Interval

Verifying Enhanced Object Tracking

Configuration Examples for Enhanced Object Tracking

Interface IP Routing: Example

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

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

debug track

delay (tracking)

default (tracking)

ip vrf (tracking)

object (tracking)

show track

standby track

threshold metric

threshold percentage

threshold weight

track interface

track ip route

track list

track resolution

track timer

Glossary


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

Release
Modification

12.2(15)T

This feature was introduced.

12.3(8)T

The object, track list, and track resolution commands were introduced and the debug track and show track commands were modified.

12.2(25)S

This feature was integrated to 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.


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

Additional References

Command Reference

Glossary

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

 
Command or Action
Purpose

Step 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 ip routing

Example:

Router(config)# track 1 interface ethernet 0/1 ip routing

Tracks the IP-routing state of an interface and enters tracking configuration mode.

IP-route tracking tracks an IP route in the routing table and the ability of an interface to route IP packets.

Step 4 

delay {up seconds [down seconds] | [up seconds] down seconds}

Example:

Router(config-track)# delay up 30

(Optional) Specifies a period of time (in seconds) to delay communicating state changes of a tracked object.

Step 5 

exit

Example:

Router(config-track)# exit

Returns to privileged EXEC mode.

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

 
Command or Action
Purpose

Step 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

Example:

Router(config)# track 3 interface ethernet 0/1 line-protocol

Tracks the line-protocol state of an interface and enters tracking configuration mode.

Step 4 

delay {up seconds [down seconds] | [up seconds] down seconds}

Example:

Router(config-track)# delay up 30

(Optional) Specifies a period of time (in seconds) to delay communicating state changes of a tracked object.

Step 5 

exit

Example:

Router(config-track)# exit

Returns to privileged EXEC mode.

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

 
Command or Action
Purpose

Step 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 ip route ip-address/prefix-length reachability

Example:

Router(config)# track 4 ip route 10.16.0.0/16 reachability

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

Step 4 

delay {up seconds [down seconds] | [up seconds] down seconds}

Example:

Router(config-track)# delay up 30

(Optional) Specifies a period of time (in seconds) to delay communicating state changes of a tracked object.

Step 5 

ip vrf vrf-name

Example:

Router(config-track)# ip vrf VRF2

(Optional) Specifies which forwarding (VRF) table to look for the VPN route.

Step 6 

exit

Example:

Router(config-track)# exit

Returns to privileged EXEC mode.

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 Resolution

Static

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

 
Command or Action
Purpose

Step 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 resolution ip route {eigrp resolution-value | isis resolution-value | ospf resolution-value | static resolution-value}

Example:

Router(config)# track resolution ip route eigrp 300

(Optional) Specifies resolution parameters for a tracked object.

Use this command to change the default metric resolution values.

Step 4 

track object-number ip route ip-address/ prefix-length metric threshold

Example:

Router(config)# track 6 ip route 10.16.0.0/16 metric threshold

Tracks the scaled metric value of an IP route to determine if it is above or below a threshold.

The default down value is 255, which equates to an inaccessible route.

The default up value is 254.

Step 5 

delay {up seconds [down seconds] | [up seconds] down seconds}

Example:

Router(config-track)# delay up 30

(Optional) Specifies a period of time (in seconds) to delay communicating state changes of a tracked object.

Step 6 

ip vrf vrf-name

Example:

Router(config-track)# ip vrf VRF1

(Optional) Configures a VRF table.

Step 7 

threshold metric {up number down number | up number | down number}

Example:

Router(config-track)# threshold metric up 254 down 255

(Optional) Sets a metric threshold other than the default value.

Step 8 

end

Example:

Router(config-track)# end

Exits to privileged EXEC mode.

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

 
Command or Action
Purpose

Step 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 track-number list boolean {and | or}

Example:

Router(config)# track 100 list boolean and

Configures a tracked list object and enters tracking configuration mode. The keywords and arguments are as follows:

boolean—Specifies that the state of the tracked list is based on a Boolean calculation. The keywords are as follows:

and—Specifies that the list is up if all objects are up, or down if one or more objects are down. For example when tracking two interfaces, up means that both interfaces are up, and down means that either interface is down.

or—Specifies that the list is up if at least one object is up. For example, when tracking two interfaces, up means that either interface is up, and down means that both interfaces are down.

Step 4 

object object-number [not]

Example:

Router(config-track)# object 3 not

Specifies the object to be tracked. The object-number argument has a valid range from 1 to 500. There is no default. The optional not keyword negates the state of the object.

Note The example means that when object 3 is up, the tracked list detects object 3 as down.

Step 5 

delay {up seconds [down seconds] | [up seconds] down seconds}

Example:

Router(config-track)# delay up 3

(Optional) Specifies a tracking delay in seconds between up and down states.

Step 6 

exit

Example:

Router(config-track)# exit

Returns to privileged EXEC mode.

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 and
 object 1
 object 2 not

Configuring 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

 
Command or Action
Purpose

Step 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 track-number list threshold weight

Example:

Router(config)# track 100 list threshold weight

Configures a tracked list object and enters tracking configuration mode. The keywords are as follows:

threshold—Specifies that the state of the tracked list is based on a threshold.

weight—Specifies that the threshold is based on a specified weight.

Step 4 

object object-number [weight weight-number]

Example:

Router(config-track)# object 3 weight 30

Specifies the object to be tracked. The object-number argument has a valid range from 1 to 500. There is no default. The optional weight keyword specifies a threshold weight for each object.

Step 5 

threshold weight {up number | [down number]}

Example:

Router(config-track)# threshold weight up 30

Specifies the threshold weight. The keywords and arguments are as follows:

up number—Valid range is from 1 to 255.

down number—(Optional) Range depends upon what you select for the up keyword. For example, if you configure 25 for up, you will see a range from 0 to 24 for down.

Step 6 

delay {up seconds [down seconds] | [up seconds] down seconds}

Example:

Router(config-track)# delay up 3

(Optional) Specifies a tracking delay in seconds between up and down states.

Step 7 

exit

Example:

Router(config-track)# exit

Returns to privileged EXEC mode.

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 weight
 object 1 weight 15
 object 2 weight 20
 object 3 weight 30
 threshold weight up 30 down 10

This 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

 
Command or Action
Purpose

Step 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 track-number list threshold percentage

Example:

Router(config)# track 100 list threshold percentage

Configures a tracked list object and enters tracking configuration mode. The keywords are as follows:

threshold—Specifies that the state of the tracked list is based on a threshold.

percentage—Specifies that the threshold is based on a percentage.

Step 4 

object object-number

Example:

Router(config-track)# object 3

Specifies the object to be tracked. The object-number argument has a valid range from 1 to 500. There is no default.

Step 5 

threshold percentage {up number | [down number]}

Example:

Router(config-track)# threshold percentage up 30

Specifies the threshold percentage. The keywords and arguments are as follows:

up number—Valid range is from 1 to 100.

down number—(Optional) Range depends upon what you have selected for the up keyword. For example, if you specify 25 as up, a range from 26 to 100 is displayed for the down keyword.

Step 6 

delay {up seconds [down seconds] | [up seconds] down seconds}

Example:

Router(config-track)# delay up 3

(Optional) Specifies a tracking delay in seconds between up and down states.

Step 7 

exit

Example:

Router(config-track)# exit

Returns to privileged EXEC mode.

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 percentage
 object 1
 object 2
 object 3
 threshold percentage up 51 down 10

Configuring 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

 
Command or Action
Purpose

Step 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 track-number list

Example:

Router(config)# track 3 list

Enters tracking configuration mode.

Step 4 

default {delay | object object-number | threshold percentage}

Example:

Router(config-track) default delay

Specifies a default delay value for a tracked list, a default object, and default threshold parameters for a tracked list. The keywords and arguments are as follows:

delay—Reverts to the default delay.

object—Specifies a default object for the track list. The valid range is from 1 to 500.

threshold percentage—Specifies a default threshold percentage.

Step 5 

exit

Example:

Router(config-track)# exit

Returns to privileged EXEC mode.

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
Purpose

Step 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.