Enhanced Object Tracking

Feature History for Enhanced Object Tracking

This table provides release and platform support information for the features explained in this module.

These features are available in all the releases subsequent to the one they were introduced in, unless noted otherwise.

Release

Feature Name and Description

Supported Platform

Cisco IOS XE 17.18.1

Enhanced Object Tracking: Enhanced Object Tracking is a feature that provides a flexible and independent mechanism for monitoring various network objects (such as interfaces, IP routes, or reachability), allowing different processes (like HSRP, VRRP, or policy-based routing) to respond dynamically to changes in the network.

Cisco C9350 Series Smart Switches

Cisco C9610 Series Smart Switches

Enhanced Object Tracking

Enhanced Object Tracking is a feature that provides a flexible and independent mechanism for monitoring various network objects (such as interfaces, IP routes, or reachability), allowing different processes (like HSRP, VRRP, or policy-based routing) to respond dynamically to changes in the network.

  • Independence: The tracking process is standalone and not tied to a single protocol, allowing multiple features to use it simultaneously.

  • Versatility: It supports tracking a wide range of objects, including interface states, IP routes, and other network resources, not just interface line-protocol states.

  • Dynamic Response: It enables protocols and features (such as HSRP, VRRP, or routing policies) to automatically adjust their operation based on the tracked object’s status, improving network resilience and flexibility.

Tracking Interface Line-Protocol or IP Routing State

You can track either the interface line protocol state or the interface IP routing state.

When you track the IP routing state, these three conditions are required for the object to be up:

  • IP routing must be enabled and active on the interface.

  • The interface line-protocol state must be up.

  • The interface IP address must be known.

If all three of these conditions are not met, the IP routing state is down.

Tracked Lists

You can configure a tracked list of objects with a Boolean expression, a weight threshold, or a percentage threshold. A tracked list contains one or more objects. An object must exist before it can be added to the tracked list.

  • You configure a Boolean expression to specify calculation by using either “AND” or “OR” operators.

  • When you measure the tracked list state by a weight threshold, you assign a weight number to each object in the tracked list. The state of the tracked list is determined by whether or not the threshold was met. The state of each object is determined by comparing the total weight of all objects against a threshold weight for each object.

  • When you measure the tracked list by a percentage threshold, you assign a percentage threshold to all objects in the tracked list. The state of each object is determined by comparing the assigned percentages of each object to the list.

Tracking Other Characteristics

You can also use the enhanced object tracking for tracking other characteristics.

  • You can track the reachability of an IP route by using the track ip route reachability global configuration command.

  • You can use the track ip route metric threshold global configuration command to determine if a route is above or below threshold.

  • You can use the track resolution global configuration command to change the metric resolution default values for routing protocols.

  • You can use the track timer tracking configuration command to configure the tracking process to periodically poll tracked objects.

Use the show track privileged EXEC command to verify enhanced object tracking configuration.

How Enhanced Object Tracking works

Workflow

This is how enhanced object tracking works:

  1. A client process (such as HSRP, VRRP, or GLBP) registers its interest in tracking specific objects. Each object is identified by a unique number, configured via the tracking CLI.
  2. The client process references this unique tracking number to monitor the desired object.
  3. The tracking process continuously or periodically polls each tracked object to detect value or state changes.
  4. When a tracked object changes state (from up to down or down to up), the tracking process notifies all registered client processes. Notifications can be immediate or delayed, based on configuration.
  5. Multiple client processes can monitor the same tracked object. Each client can independently determine and execute actions based on the state change.
  6. You can create a tracked list that combines multiple objects. The overall state of the list is determined by:
    • Weight threshold (sum of weights must meet/exceed the threshold)
    • Percentage threshold (a certain percentage of objects must be up)
  7. Objects can be combined using Boolean logic:
    • AND Logic: All objects in the list must be up for the tracked list to be up.
    • OR Logic: Only one object in the list needs to be up for the tracked list to be up

Guidelines to configure Enhanced Object Tracking

All tracking configurations must be reconfigured on all Layer 3 subinterfaces after a device reloads. All reload operations on the device must be allowed to complete, so that all Layer 3 subinterfaces are active, before the tracking configuration are reconfigured.

Configure Enhanced Object Tracking

Perform the steps in each of these tasks to configure enhanced object tracking.

Procedure


Step 1

Configure tracking for line state protocol on an interface

Step 2

Configure tracking for IP routing state on an interface

Step 3

Configure tracked lists

  1. Configure a tracked List with a weight threshold

  2. Configure a tracked list with a percentage threshold

Step 4

Configure HSRP Object Tracking


Configure tracking for line state protocol on an interface

Perform this procedure to configure tracking for line state protocol for an interface.

Procedure


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

track object-number interface interface-id line-protocol

Example:

Device(config)# track 33 interface gigabitethernet 1/0/1 line-protocol

Creates a tracking list to track the line-protocol state of an interface and enter tracking configuration mode.

  • object-number : The object-number identifies the tracked object.

    The range is from 1 to 500.

  • interface-id : The interface being tracked.

Step 4

delay {object-number up seconds [down seconds] | [up seconds] down seconds}

Example:

Device(config-track)# delay up5

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

The range is from 1 to 180 seconds.

Step 5

end

Example:

Device(config-track)# end

Returns to privileged EXEC mode.

Step 6

show track object-number

Example:

Device# show track 33

Verifies that the specified objects are being tracked.


Configure tracking for IP routing state on an interface

Perform this procedure to configure tracking for IP routing state for an interface.

Procedure


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

track object-number interface interface-id ip-routing

Example:

Device(config)# track 33 interface gigabitethernet 1/0/1 ip-routing

Creates a tracking list to track the IP routing state of an interface and enter tracking configuration mode. IP route tracking tracks an IP route in the routing table and the ability of an interface to route IP packets.

  • object-number : The object-number identifies the tracked object.

    The range is from 1 to 500.

  • interface-id : The interface being tracked.

Step 4

delay {object-number up seconds [down seconds] | [up seconds] down seconds}

Example:

Device(config-track)# delay up5

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

The range is from 1 to 180 seconds.

Step 5

end

Example:

Device(config-track)# end

Returns to privileged EXEC mode.

Step 6

show track object-number

Example:

Device# show track 33

Verifies that the specified objects are being tracked.


Configure Tracked Lists

Perform the steps in each of these tasks to configure tracked lists.

Procedure


Step 1

Configure a tracked list with a weight threshold

Step 2

Configure a tracked list with a percentage threshold


Configure a tracked list with a weight threshold

Perform this task to configure a tracked list with a weight threshold.

To track by weight threshold, configure a tracked list of objects, specify that weight is used as the threshold, and configure a weight for each of its objects. 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.

Before you begin

You cannot use the Boolean NOT operator in a weight threshold list.

Procedure

Step 1

enable

Example:
Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:
Device# configure terminal

Enters global configuration mode.

Step 3

track track-number list threshold {weight}

Example:
Device(config)# track 4 list threshold weight

Configures a tracked list object, and enters tracking configuration mode. The track-number can be from 1 to 500.

  • threshold : Specifies the state of the tracked list based on a threshold.

  • weight : Specifies that the threshold is based on weight.

Step 4

object object-number [weight weight-number]

Example:
Device(config)# object 2 weight 15

Specifies the object to be tracked. The range is from 1 to 500. The optionalweightweight-number specifies the threshold weight for the object.

The range is from 1 to 255.

Note

 

An object must exist before you can add it to a tracked list.

Step 5

threshold weight {up number | [down number]}

Example:
Device(config-track)# threshold weight up 30 down 10

(Optional) Specifies the threshold weight.

  • up number : The range is from 1 to 255.

  • down number : (Optional) The range depends on the number selected for the upnumber. If you configure the upnumber as 25, the range shown for the down number is 0 to 24.

Step 6

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

Example:
Device(config-track)# delay up5

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

The range is from 1 to 180 seconds.

Step 7

end

Example:
Device(config-track)# end

Returns to privileged EXEC mode.

Step 8

show track object-number

Verifies that the specified objects are being tracked.

Step 9

copy running-config startup-config

Example:
Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.


Configure a tracked list with a percentage threshold

To track by percentage threshold, configure a tracked list of objects, specify that a percentage will be used as the threshold, and specify a percentage for all objects in the list. The state of the list is determined by comparing the assigned percentage of each object to the list.

Perform this task to configure a tracked list with a percentage threshold.

Before you begin

You cannot use the Boolean NOT operator in a percentage threshold list.

Procedure

Step 1

enable

Example:
Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:
Device# configure terminal

Enters global configuration mode.

Step 3

track track-number list threshold {percentage}

Example:
Device(config)# track 4 list threshold percentage

Configures a tracked list object, and enters tracking configuration mode.

The track-number can be from 1 to 500.
  • threshold : Specifies the state of the tracked list based on a threshold.

  • percentage : Specifies that the threshold is based on percentage.

Step 4

object object-number

Example:
Device(config)# object 1

Specifies the object to be tracked

The range is from 1 to 500.

Note

 

An object must exist before you can add it to a tracked list.

Step 5

threshold percentage {up number | [down number]}

Example:
Device(config)# threshold percentage up 51 down 10

(Optional) Specifies the threshold percentage.

  • up number : The range is from 1 to 100.

  • down number : (Optional) The range depends on the number selected for the up number . If you configure the up number as 25, the range shown for the down number is 0 to 24.

Step 6

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

Example:
Device(config-track)# delay up 5

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

The range is from 1 to 180 seconds.

Step 7

end

Example:
Device(config-track)# end

Returns to privileged EXEC mode.

Step 8

show track object-number

Verifies that the specified objects are being tracked.

Step 9

copy running-config startup-config

Example:
Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.


Configure HSRP Object Tracking

Perform this task to configure a standby HSRP group to track an object and change the HSRP priority based on the object state:

Procedure


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

track object-number {interface interface-id {line-protocol | ip routing} | ip route ip-address/prefix-length {metric threshold | reachability} list {boolean {and | or}} | {threshold {weight | percentage}}}

Example:

Device(config)# track 1 interface gigabitethernet 1/0/1 line-protocol 

Optional) Create a tracking list to track the configured state and enter tracking configuration mode.

  • The object-number identifies the tracked object and can be from 1 to 500.

  • Enter interface interface-id to select an interface to track.

  • Enter line-protocol to track the interface line protocol state or enter ip routing to track the interface IP routing state.

  • Enter ip route ip-address/prefix-length to track the state of an IP route.

  • Enter metric threshold to track the threshold metric or enter reachability to track if the route is reachable.

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

  • Enter list to track objects grouped in a list.

Step 4

exit

Example:

Device(config-track)# exit

Return to global configuration mode.

Step 5

interface interface-id

Example:

Device(config)# interface vlan10

Enter interface configuration mode.

Step 6

standby [group-number] ip [ip-address secondary]]

Example:

Device(config-vlan)# standby 1 ip 192.168.1.1 

Creates (or enables) the HSRP group by using its number and virtual IP address.

  • (Optional) group-number : Enters a group number on the interface for which HSRP is being enabled. The range is 0 to 255; the default is 0. If there is only one HSRP group, you do not need to enter a group number.

  • (Optional on all but one interface) ip-address : Specifies the virtual IP address of the hot standby router interface. You must enter the virtual IP address for at least one of the interfaces; it can be learned on the other interfaces.

  • (Optional) secondary : Specifies that the IP address is a secondary hot standby router interface. 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:

Device(config-vlan)# standby 1 track 1 decrement 20

Configures HSRP to track an object and change the hot standby priority based on the state of the object.

  • (Optional) group-number : Enters the group number to which the tracking applies.

  • object-number : Enters a number representing the object to be tracked.

    The range is from 1 to 500. The default is 1.

  • (Optional) secondary : Specifies that the IP address is a secondary hot standby router interface. If this keyword is omitted, the configured address is the primary IP address.

  • (Optional) decrement priority-decrement : Specifies the 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.

Step 8

end

Example:

Device(config-vlan)# end

Returns to privileged EXEC mode.

Step 9

show standby

Example:

Device# show standby

Verifies the standby router IP address and tracking states.

Step 10

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.


Monitor Enhanced Object Tracking

Use the privileged EXEC or user EXEC commands in the table below, to display enhanced object tracking information.

Table 1. Commands for displaying tracking information

Command

Purpose

show ip route track table

Displays information about the IP route track table.

show track [object-number]

Displays information about the all tracking lists or the specified list.

show track brief

Displays VTP status and configuration for all interfaces or the specified interface.

show track interface [brief]

Displays information about tracked interface objects.

show track ip [object-number] [brief] route

Displays information about tracked IP-route objects

show track resolution

Displays the resolution of tracked parameters.

show track timer

Displays tracked polling interval timers.