![]() |
Table Of Contents
Object Tracking Commands in Cisco IOS XR Software
clear type line-protocol state
Object Tracking Commands in Cisco IOS XR Software
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 Cisco IOS XR System Management Configuration Guide.
clear delay
To clear entry of a duration, in seconds, before the track or interface state should be polled for a change in status, use the clear delay command in track configuration mode.
clear delay {up | down} [seconds]
Syntax Description
Defaults
No default behavior or values
Command Modes
Track configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Examples
The following example shows clearance of the configured delay, which had been set to notify the network administrator of a change in the up state of the interface every five seconds:
RP/0/RP0/CPU0:router# configurationRP/0/RP0/CPU0:router(config)# track atm1235RP/0/RP0/CPU0:router(config-track)# clear delay up 5Related Commands
clear interface (track)
To clear entry of a particular interface object from a line protocol tracking configuration, use the clear interface command in line protocol tracking configuration mode.
clear interface {type instance-id}
Syntax Description
Defaults
No default behavior or values
Command Modes
Line protocol tracking configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The clear interface command is accessed through line protocol tracking configuration submode.
Task ID
Examples
The following example shows the use of the clear interface command:
RP/0/RP0/CPU0:router# configurationRP/0/RP0/CPU0:router(config)# track name1RP/0/RP0/CPU0:router(config-track)# type line-protocol stateRP/0/RP0/CPU0:router(config-track-line-prot)# clear interface atm 0/2/0/0.1RP/0/RP0/CPU0:router(config-track-line-prot)#Related Commands
clear object
To clear entry of a particular object to be used for object for tracking, use the clear object command in list tracking configuration mode.
clear object object-name [not]
Syntax Description
object-name
Name of the object to be tracked.
not
Deletes tracking configured on the basis of whether an interface object is not up or down.
Defaults
No default behavior or values
Command Modes
List tracking configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The clear object command is accessed through list tracking configuration submode.
Task ID
Examples
The following example shows the use of the clear object command:
RP/0/RP0/CPU0:router# configurationRP/0/RP0/CPU0:router(config)# track name1RP/0/RP0/CPU0:router(config-track)# type list boolean andRP/0/RP0/CPU0:router(config-track-list)# clear object IPSEC3 notRelated Commands
clear route ipv4
To clear entry of an IP prefix route as the basis to track route reachability, use the clear route ipv4 command in route tracking configuration mode.
clear route ipv4 {IP prefix and subnet mask}
Syntax Description
IP prefix and subnet mask
An IP prefix consisting of the network and subnet mask (for example, 10.56.8.10/16).
Defaults
No default behavior or values
Command Modes
Route tracking configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The clear route ipv4 command is accessed through route tracking configuration submode.
Task ID
Examples
The following example shows the use of the clear route ipv4 command:
RP/0/RP0/CPU0:router# configurationRP/0/RP0/CPU0:router(config)# track name1RP/0/RP0/CPU0:router(config-track)# type route reachabilityRP/0/RP0/CPU0:router(config-track-route)# clear route ipv4 10.56.8.10/16Related Commands
clear type line-protocol state
To clear entry of type line protocol state as the basis for tracking an object, use the clear type line-protocol command in track configuration mode.
clear type line-protocol state
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values
Command Modes
Track configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Examples
The following example shows how to use the clear type line-protocol state command:
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track track12RP/0/RP0/CPU0:router(config-track)# clear type line-protocol stateRelated Commands
clear type list boolean
To clear entry of type list boolean as the basis for tracking an object or list of objects, use the clear type list boolean command in list tracking configuration mode.
clear type list boolean {and | or}
Syntax Description
Defaults
No default behavior or values
Command Modes
List tracking configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Examples
The following example shows how to use the clear type list boolean command:
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track connection100RP/0/RP0/CPU0:router(config-track-list)# clear type list boolean andRelated Commands
clear type route reachability
To clear entry of type route reachability as the basis for tracking an object, use the clear type route reachability command in track configuration mode.
clear type route reachability
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values
Command Modes
Track configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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.
Task ID
Examples
The following example shows how to clear tracking for route reachability.
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track track22RP/0/RP0/CPU0:router(config-track)# clear type route reachabilityRelated Commands
clear vrf (track)
To clear entry of a VRF table as a basis to track route reachability, use the clear vrf command in route tracking configuration mode.
clear vrf {vrf-table-name}
Syntax Description
Defaults
No default behavior or values
Command Modes
Route tracking configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The clear vrf command is accessed through route tracking configuration submode.
Task ID
Examples
The following example shows the use of the clear vrf command:
RP/0/RP0/CPU0:router# configurationRP/0/RP0/CPU0:router(config)# track name1RP/0/RP0/CPU0:router(config-track)# type route reachabilityRP/0/RP0/CPU0:router(config-track)# clear vrf vrf-table-nameRelated Commands
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 the 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
Defaults
No default behavior or values
Command Modes
Track configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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
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# configurationRP/0/RP0/CPU0:router(config)# track name1RP/0/RP0/CPU0:router(config-track)# delay up 5Related Commands
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-instance
no interface type interface-instance
Syntax Description
Defaults
No default behavior or values
Command Modes
Interface configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
To access this interface command, you must be in line protocol tracking configuration submode.
For information about interface keywords, see Cisco IOS XR Interface and Hardware Component Command Reference.
Task ID
Examples
The following example shows the interface command in the context of object tracking:
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track track12RP/0/RP0/CPU0:router(config-track)# type line-protocol stateRP/0/RP0/CPU0:router(config-track-line-prot)#interface atm 0/2/0/0.1Related Commands
line-protocol track
To associate a specific track with an IPSec or GRE interface object, use the line-protocol track command in interface configuration mode. To delete the association between the track and the IPSec or GRE interface object, use the no form of this command.
line-protocol track object-name
no line-protocol track object-name
Syntax Description
Defaults
No default behavior or values
Command Modes
Interface configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Examples
The following example shows how the line-protocol track command is used:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# track PREFIX1RRP/0/RP0/CPU0:router(config-track)# type route reachabilityRP/0/RP0/CPU0:router(config-track-route)# route ipv4 7.0.0.0/24RP/0/RP0/CPU0:router(config-track-route)# interface service-ipsec 1RP/0/RP0/CPU0:router(config-if)# vrf 1RP/0/RP0/CPU0:router(config-if)# ipv4 address 70.0.0.2 255.25.255.0RP/0/RP0/CPU0:router(config-if)# line-protocol track PREFIX1Related Commands
Command DescriptionIndicatdes an interface object type for tracking purposes.
Initiates a tracking process to track the status of an object or list of objects; enters track configuration mode.
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.
Defaults
No default behavior or values
Command Modes
List tracking configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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 only be used for a track based on a Boolean expression.
Task ID
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# configureRP/0/RP0/CPU0:router(config)# track connection100RP/0/RP0/CPU0:router(config-track-list)# type list boolean and
RP/0/RP0/CPU0:router(config-track-list)# object obj3 notRelated Commands
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 [IP prefix and subnet mask]
Syntax Description
Defaults
No default behavior or values
Command Modes
Route tracking configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
The IP prefix and subnet mask arguments are optional for the no form of this command.
Task ID
Examples
The following example displays use of the route ipv4 command:
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track track22RP/0/RP0/CPU0:router(config-track)# type route reachabilityRP/0/RP0/CPU0:router(config-track-route)# route ipv4 10.56.8.10/16Related Commands
show track
To display information about objects that were tracked and to specify the format of the report, use the show track command in EXEC mode.
show track [track-name | brief | interface | ipv4 route]
Syntax Description
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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
Examples
The following sample output illustrates use of the show track command:
RP/0/RP0/CPU0:router# show track Track_name3Track_name3List boolean and is DOWN1 change, last change 10:26:20 SJC Sun Aug 05 2007object name2 not UPobject name1 UPRelated Commands
Command DescriptionInitiates or identifies a tracking process to track the status of an object; also enters track configuration mode.
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
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
When you use the track command, you enter track configuration mode.
The track command is used in conjunction with all the following track commands and types:
Task ID
Examples
The following 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# configureRP/0/RP0/CPU0:router(config)# track LIST2RP/0/RP0/CPU0:router# track LIST2 delay up 5Related Commands
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
Defaults
No default behavior or values
Command Modes
Track configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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
Examples
The following example shows how to use the type line-protocol state command:
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track track12RP/0/RP0/CPU0:router(config-track)# type line-protocol stateRelated Commands
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
Defaults
No default behavior or values
Command Modes
Track configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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
Examples
The following example shows how to use the type list boolean command in creating a list of objects to be tracked:
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track LIST2RP/0/RP0/CPU0:router(config-track)# type list boolean andRP/0/RP0/CPU0:router(config-track-list)# object IPSec1 notRP/0/RP0/CPU0:router(config-track-list)# object IPSec2RP/0/RP0/CPU0:router(config-track-list)# object PREFIX1RP/0/RP0/CPU0:router(config-track-list)# exitRP/0/RP0/CPU0:router(config)# track IPSec1RP/0/RP0/CPU0:router(config-track)# type line-protocol stateRP/0/RP0/CPU0:router(config-track-line-prot)# interface GigabitEthernet 0/0/0/3RP/0/RP0/CPU0:router(config-track-line-prot)# exitRP/0/RP0/CPU0:router(config-track)# track IPSec2RP/0/RP0/CPU0:router(config-track)# type line-protocol stateRP/0/RP0/CPU0:router(config-track-line-prot)# interface ATM0/2/0.1RP/0/RP0/CPU0:router(config-track-line-prot)# exitRP/0/RP0/CPU0:router(config)# track PREFIX1RP/0/RP0/CPU0:router(config-track)# type route reachabilityRP/0/RP0/CPU0:router(config-track-route)# route ipv4 7.0.0.0/24RP/0/RP0/CPU0:router(config-track-route)# exitRP/0/RP0/CPU0:router(config-track)# interface service-ipsec 1RP/0/RP0/CPU0:router(config-if)# vrf 1RP/0/RP0/CPU0:router(config-if)# ipv4 address 70.0.0.2 255.255.255.0RP/0/RP0/CPU0:router(config-if)# profile vrf_1_ipsecRP/0/RP0/CPU0:router(config-if)# line-protocol track LIST2RP/0/RP0/CPU0:router(config-if)# tunnel source 80.0.0.2RP/0/RP0/CPU0:router(config-if)# tunnel destination 80.0.0.1RP/0/RP0/CPU0:router(config-if)# service-location preferred-active 0/2/0RP/0/RP0/CPU0:router(config-if)# commitRelated Commands
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 arguments or keywords.
Defaults
No default behavior or values
Command Modes
Track configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
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
Examples
The following example shows how to track for route reachability:
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track track22RP/0/RP0/CPU0:router(config-track)# type route reachabilityRelated Commands
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
Defaults
No default behavior or values
Command Modes
Route tracking configuration
Command History
Release ModificationRelease 3.6.0
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
Release 3.7.0
No modification.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Task ID
Examples
The following example displays the use of the vrf command:
RP/0/RP0/CPU0:router# configureRP/0/RP0/CPU0:router(config)# track track22RP/0/RP0/CPU0:router(config-track)# type route reachabilityRP/0/RP0/CPU0:router(config-track-route)# vrf vrf1Related Commands