Object Tracking Commands

This chapter describes the Cisco IOS XR software commands used to track objects. For information about how to use these commands to configure object tracking, see System Management Configuration Guide for Cisco NCS 5500 Series RoutersSystem Management Configuration Guide for Cisco NCS 540 Series RoutersSystem Management Configuration Guide for Cisco NCS 560 Series Routers.

action

To configure a track to implement actions based on changes in the state of the track, use the action command in the track configuration mode. To delete the configuration of action tracking, use the no form of this command.

action {track-up | | track-down} error-disable interface interface-name [ auto-recover]

no action {track-up | | track-down} error-disable interface interface-name [ auto-recover]

Syntax Description

track-up

Configures action on the track when the track goes up.

track-down

Configures action on the track when the track goes down.

error-disable

Disables the specified interface when the track state changes.

interface interface name

Name of the interface to be disabled.

auto-recover

(Optional) Allows the interface that is error-disabled by object tracking to auto-recover. Autorecovery of the interface occurs when the track state changes to the pre-error-disabled state.

Command Default

No default behavior or values

Command Modes

Track configuration (config track)

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use the action command, you must be in a user group that is associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation

sysmgr

read, write

Examples

This example shows how to configure the action command:

Router# configure
Router(config)# track t1
Router(config-track)# type route reachability route ipv4 192.2.0.1/24
Router(config)# action track-down error-disable interface GigabitEthernet 0/0/0/1 auto-recover

delay

To configure the delay, in seconds, before the track or interface state should be polled for a change in status, use the delay command in track configuration mode. To delete the configuration of delay tracking, use the no form of this command.

delay {up | down} seconds

no delay {up | down} [seconds]

Syntax Description

delay up seconds

Sets delay of from 1 to 180 seconds before communication of up status of the tracked object or list of objects.

delay down seconds

Sets delay of from 1 to 180 seconds before communication of down status of the tracked object or list of objects.

Command Default

No default behavior or values

Command Modes

Track configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The delay command can be used in conjunction with all track types:

When using the no form of the command, the use of the seconds argument is optional.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example shows that the tracking process is configured to notify the network administrator that the interface should be polled for its up state in five-second intervals:


RP/0/RP0/CPU0:router# configuration
RP/0/RP0/CPU0:router(config)# track name1         
RP/0/RP0/CPU0:router(config-track)# delay up 5
    

interface (track)

To select an interface object type for tracking purposes, use the interface command in interface configuration mode. To delete the configuration of a track based on a particular interface object type, use the no form of this command.

interface type interface-path-id

no interface type interface-path-id

Syntax Description

type

(Optional) Interface type. For more information, use the question mark (?) online help function.

interface-path-id

(Optional) Physical interface or virtual interface.

Note

 

Use the show interfaces command to see a list of all interfaces currently configured on the router.

For more information about the syntax for the router, use the question mark (? ) online help function.

Command Default

No default behavior or values

Command Modes

Interface configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

To access the interface command, you must be in line protocol tracking configuration submode.

For information about interface keywords, see Interface and Hardware Component Command Reference for Cisco NCS 5500 and NCS 540 and NCS 560 Series Routers.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example shows the interface command in the context of object tracking:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track track12
RP/0/RP0/CPU0:router(config-track)# type line-protocol state
RP/0/RP0/CPU0:router(config-track-line-prot)# interface GigabitEthernet0/1
         

object

To configure an object for tracking, use the object command in list tracking configuration mode. To delete a previously configured track based on an object, use the no form of this command.

object object-name [not]

no object object-name

Syntax Description

object-name

Name of the object to be tracked.

not

(Optional) Deletes a preivously configured track based on whether an interface object is not up or down.

Command Default

No default behavior or values

Command Modes

List tracking configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

To delete a previously configured track based on whether an interface object is not up or down, use the not keyword together with the object command in a list of tracked objects based on a Boolean expression.

The object command can be used only for a track based on a Boolean expression.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example shows how to configure an object, using the optional not keyword, in a tracked list of objects based on a Boolean calculation:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track connection100 
RP/0/RP0/CPU0:router(config-track-list)# type list boolean and
RP/0/RP0/CPU0:router(config-track-list)# object obj3 no
         

route ipv4

To configure that an IP prefix and subnet mask should be used as the basis to track route reachability, use the route ipv4 command in route tracking configuration mode. To remove this configuration, use the no form of the command.

route ipv4 IP prefix and subnet mask

no route ipv4

Syntax Description

IP prefix and subnet mask

Network and subnet mask; for example, 10.56.8.10/16.

Command Default

No default behavior or values

Command Modes

Route tracking configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The IP prefix and subnet mask arguments are optional for the no form of this command.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example displays use of the route ipv4 command:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track track22
RP/0/RP0/CPU0:router(config-track)# type route reachability
RP/0/RP0/CPU0:router(config-track-route)# route ipv4 10.56.8.10/16
           

show track

To display information about objects that are tracked and to specify the format of the report, use the show track command in EXEC mode.

show track [track-name | interface | ipv4 route] [brief]

Syntax Description

track-name

(Optional) Name of track used for tracking objects; for example, track1.

brief

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

interface

(Optional) Displays tracked interface objects.

ipv4 route

(Optional) Displays the tracked IPv4 route objects.

Command Default

No default behavior or values

Command Modes

EXEC

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Use the show track 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.

Task ID

Task ID

Operations

sysmgr

read

Examples

The following sample output illustrates use of the show track command:


RP/0/RP0/CPU0:router# show track

Track track3
        List boolean and is UP
        7 changes, last change 16:04:28 IST Mon Jul 02 2018
                object track2 UP
                object track1 UP
Track track1
        Interface GigabitEthernet0/0/0/1 line-protocol
        Line protocol is UP
        7 changes, last change 16:04:28 IST Mon Jul 02 2018
Track track2
        Interface GigabitEthernet0/1/0/1 line-protocol
        Line protocol is UP
        7 changes, last change 16:02:41 IST Mon Jul 02 2018

  

threshold weight

To configure tracking threshold values based on weights, use the threshold weight command in track list threshold configuration mode. To remove a threshold weight, use the no form of the command.

threshold weight up weight [down weight]

Syntax Description

up

Maximum threshold value for the specific range beyond which a track is set to the DOWN state.

weight

Percentage limit to define the maximum threshold value.

down

Minimum threshold value for the specific range below which a track is set to the DOWN state.

weight

Percentage limit to define the minimum threshold value.

Command Default

None

Command Modes

Tack list threshold configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

Use the threshold weight command to specify the threshold value used to determine the state of a threshold-weighted list.

  • A threshold-weighted list is set to the UP state when the cumulative sum of the weight of objects is between UP threshold value and DOWN threshold value.

  • A threshold-weighted list is set to the DOWN state when the cumulative sum of the weight of objects is out of the range in a configuration.

Task ID

Task ID Operation

sysmgr

read, write

Examples

This example shows how to specify the weight thresholds for a threshold-weighted list:


RP/0/RP0/CPU0:router(config)# track 4
RP/0/RP0/CPU0:router(config-track)# type list threshold weight
RP/0/RP0/CPU0:router(config-track-list-threshold)# threshold weight up 18 down 5
  

track

To initiate or identify a tracking process used to track the status of an object or list of objects, use the track command in global configuration mode. To remove the tracking process, use the no form of this command.

track track-name

no track track-name

Syntax Description

track track-name

Name of track used for tracking objects; for example, track1.

Command Default

No default behavior or values

Command Modes

Global configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

When you use the track command, you enter track configuration mode.

You can configure up to 1500 tracks. The Cisco IOS XR Software rejects configurations with more than 1500 tracks.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

This example shows that the tracking process is configured to notify the network administrator about the up state of the tracked object list every five seconds:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track LIST2
RP/0/RP0/CPU0:router# track LIST2 delay up 5
  

type line-protocol state

To configure tracking of the line protocol state of an interface object, use the type line-protocol command in track configuration mode. To delete the configuration of line-protocol tracking, use the no form of this command.

type line-protocol state

no type line-protocol state

Command Default

No default behavior or values

Command Modes

Track configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The type line-protocol state command can be used in conjunction with the delay command to configure the delay, in seconds, before the track or interface state should be polled for a change in its status.

The type line-protocol state command enters line-protocol tracking configuration mode.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

This example shows how to use the type line-protocol state command:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track track12
RP/0/RP0/CPU0:router(config-track)# type line-protocol state
         

type list boolean

To configure a tracked list of objects based on a Boolean calculation, use the type list boolean command in track configuration mode. To remove an object tracking list based on a Boolean calculation, use the no form of the command.

type list boolean {and | or}

no type list boolean {and | or}

Syntax Description

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.

Command Default

No default behavior or values

Command Modes

Track configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The type list boolean command enters the list tracking configuration mode, and can be used in conjunction with the delay command to configure the delay, in seconds, before the track or interface state should be polled for a change in its status.

To remove a track based on whether an interface object is not up or down, use the not keyword together with the object command as shown in the example that follows.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

This example shows how to use the type list boolean command in creating a list of objects to be tracked:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track LIST2
RP/0/RP0/CPU0:router(config-track)# type list boolean and
RP/0/RP0/CPU0:router(config-track-list)# object IPSec1 not
RP/0/RP0/CPU0:router(config-track-list)# object IPSec2
RP/0/RP0/CPU0:router(config-track-list)# object PREFIX1
RP/0/RP0/CPU0:router(config-track-list)# exit
RP/0/RP0/CPU0:router(config)# track IPSec1
RP/0/RP0/CPU0:router(config-track)# type line-protocol state
RP/0/RP0/CPU0:router(config-track-line-prot)# interface tengige 0/0/0/3
RP/0/RP0/CPU0:router(config-track-line-prot)# exit
RP/0/RP0/CPU0:router(config-track)# track IPSec2
RP/0/RP0/CPU0:router(config-track)# type line-protocol state
RP/0/RP0/CPU0:router(config-track-line-prot)# interface ATM0/2/0.1
RP/0/RP0/CPU0:router(config-track-line-prot)# exit
RP/0/RP0/CPU0:router(config)# track PREFIX1
RP/0/RP0/CPU0:router(config-track)# type route reachability
RP/0/RP0/CPU0:router(config-track-route)# route ipv4 7.0.0.0/24
RP/0/RP0/CPU0:router(config-track-route)# exit
RP/0/RP0/CPU0:router(config-track)# interface service-ipsec 1
RP/0/RP0/CPU0:router(config-if)# vrf 1
RP/0/RP0/CPU0:router(config-if)# ipv4 address 70.0.0.2 255.255.255.0
RP/0/RP0/CPU0:router(config-if)# profile vrf_1_ipsec
RP/0/RP0/CPU0:router(config-if)# line-protocol track LIST2
RP/0/RP0/CPU0:router(config-if)# tunnel source 80.0.0.2
RP/0/RP0/CPU0:router(config-if)# tunnel destination 80.0.0.1
RP/0/RP0/CPU0:router(config-if)# service-location preferred-active 0/2/0
RP/0/RP0/CPU0:router(config-if)# commit
         

type list threshold percentage

To configure a tracked list of objects based on a percentage threshold, use the type list threshold percentage command in track configuration mode. To remove an object tracking list based on a percentage threshold, use the no form of the command.

type list threshold percentage

Syntax Description

This command has no keywords or arguments.

Command Default

None

Command Modes

Track configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

Use the threshold percentage command to specify the tracking threshold value used to determine the state of a percentage threshold-weighted list. A percentage threshold-weighted list is set to the UP state when the percentage of objects in the UP state is between UP threshold value to DOWN threshold value. A percentage threshold-weighted list is set to the DOWN state when the percentage of objects is out of the range in a configuration.

Use the object command to add tracked objects to the threshold-weighted list. A maximum of 200 track objects are allowed.

Task ID

Task ID Operation

sysmgr

read, write

Examples

This example shows how to add objects to a percentage threshold-weighted list:


RP/0/RP0/CPU0:router(config)# track 4
RP/0/RP0/CPU0:router(config-track)# type list threshold percentage
RP/0/RP0/CPU0:router(config-track-list-threshold)# object 1
RP/0/RP0/CPU0:router(config-track-list-threshold)# object 2
RP/0/RP0/CPU0:router(config-track-list-threshold)# object 3
  

type list threshold weight

To configure a tracked list of objects based on a weight threshold, use the type list threshold weight command in track configuration mode. To remove an object tracking list based on a weight threshold, use the no form of the command.

type list threshold weight

Syntax Description

This command has no keywords or arguments.

Command Default

None

Command Modes

Track configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

Use the threshold weight command to specify the threshold value used to determine the state of a threshold-weighted list. When the cumulative sum of the weight of objects in the UP state is between UP threshold value to DOWN threshold value, the threshold-weighted list is set to the UP state. A threshold-weighted list is set to the DOWN state when the cumulative sum of the weight of objects in the UP state is out of the range in a configuration.

Use the object command to add tracked objects to the threshold-weighted list. A maximum of 200 track objects are allowed.

Task ID

Task ID Operation

sysmgr

read, write

Examples

This example illustrates how to add objects to a threshold-weighted list:


RP/0/RP0/CPU0:router(config)# track t4
RP/0/RP0/CPU0:router(config-track)# type list threshold weight
RP/0/RP0/CPU0:router(config-track-list-threshold)# object 1
RP/0/RP0/CPU0:router(config-track-list-threshold)# object 1 weight 10
RP/0/RP0/CPU0:router(config-track-list-threshold)# object 2 weight 5
RP/0/RP0/CPU0:router(config-track-list-threshold)# object 3 weight 3
   

type route reachability

To configure the routing process to notify the tracking process when the route state changes due to a routing update, use the type route reachability command in track configuration mode. To remove a track based on route reachability, use the no form of this command.

type route reachability

no type route reachability

Syntax Description

This command has no keywords or arguments.

Command Default

No default behavior or values

Command Modes

Track configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

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.

The type route reachability command can be used in conjunction with the delay command to configure the delay, in seconds, before the track or interface state should be polled for a change in its status.

The route reachability tracking process is based on either of the following, depending on your router type:

  • vrf—A VRF table name.
  • route—An IPv4 prefix consisting of the network and subnet mask (for example, 10.56.8.10/16).

Task ID

Task ID

Operations

sysmgr

read, write

Examples

This example shows how to track for route reachability:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track track22
RP/0/RP0/CPU0:router(config-track)# type route reachability
         

type rtr

To configure the router to track the return code of IP service level agreement (SLA) operations, use the type rtr command in track configuration mode. To remove a track based on IP SLA return code, use the no form of this command.

type rtr ipsla-no reachability

no type rtr

Syntax Description

ipsla-no

IP SLA operation number. Values can range from 1 to 2048.

reachability

Tracks whether the route is reachable or not.

Command Default

None

Command Modes

Track configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Use the type rtr command in conjunction with a configuration that uses:

  • The

    track keyword in the permit command within an ACL definition. For example:

    
    ipv4 access-list abf-track
      10 permit any any nexthop track track1 1.2.3.4
    
  • An IP service level agreement configuration.

Task ID

Task ID Operation

sysmgr

read, write

Examples

This example shows how to configure IPSLA object tracking:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track track22
RP/0/RP0/CPU0:router(config-track)# type rtr 1 reachability
  

vrf (track)

To configure a VRF table to be used as the basis to track route reachability, use the vrf command in route tracking configuration mode. To delete the configuration of a VRF table for the purpose of IP route tracking purposes, use the no form of the command.

vrf vrf-table-name

no vrf [vrf-table-name]

Syntax Description

vrf-table-name

Network and subnet; for example, 10.56.8.10/16.

Command Default

No default behavior or values

Command Modes

Route tracking configuration

Command History

Release Modification
Release 7.0.1

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID

Operations

sysmgr

read, write

Examples

The following example displays the use of the vrf command:


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track track22
RP/0/RP0/CPU0:router(config-track)# type route reachability
RP/0/RP0/CPU0:router(config-track-route)# vrf vrf1