Implementing Object Tracking on the Cisco IOS XR Software

Implementing Object Tracking on the
Cisco IOS XR Software
This module describes the configuration of object tracking on your Cisco IOS XR network. For complete
descriptions of the commands listed in this module, see Related Documents, on page 10. To locate
documentation for other commands that might appear in the course of performing a configuration task, search
online in Cisco IOS XR Commands Master List for the Cisco XR 12000 Series Router.
Table 1: Feature History for Implementing Object Tracking
Release
Modification
Release 3.6.0
This feature was introduced.
Release 4.0.0
IP SLA tracking was added.
Release 4.2.1
The ability to create a tracked list based on a threshold percentage or weight was
added.
This module contains the following topics:
• Prerequisites for Implementing Object Tracking, page 1
• Information About Object Tracking, page 2
• How to Implement Object Tracking, page 2
• Configuration Examples for Configuring Object Tracking, page 9
• Additional References, page 10
Prerequisites for Implementing Object Tracking
You must be in a user group associated with a task group that includes the proper task IDs. The command
reference guides include the task IDs required for each command. If you suspect user group assignment is
preventing you from using a command, contact your AAA administrator for assistance.
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
OL-24770-03
1
Implementing Object Tracking on the Cisco IOS XR Software
Information About Object Tracking
Information About Object Tracking
Object tracking is a mechanism to track an object and to take an action on another object with no relationship
to the tracked objects, based on changes to the properties of the object being tracked.
Each tracked object is identified by a unique name specified on the tracking command-line interface (CLI).
Cisco IOS XR processes then use this name to track a specific object.
The tracking process periodically polls the tracked object and reports any changes to its state in terms of its
being up or down, either immediately or after a delay, as configured by the user.
Multiple objects can also be tracked by means of a list, using a flexible method for combining objects with
Boolean logic. This functionality includes:
• Boolean AND function—When a tracked list has been assigned a Boolean AND function, each object
defined within a subset must be in an up state, so that the tracked object can also be in the up state.
• 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 also be in an up state, so that the tracked object can also
be in the up state.
How to Implement Object Tracking
This section describes the various object tracking procedures.
Tracking the Line Protocol State of an Interface
Perform this task in global configuration mode to track the line protocol state of an interface.
A tracked object is considered up when a line protocol of the interface is up.
After configuring the tracked object, you may associate the interface whose state should be tracked and specify
the number of seconds to wait before the tracking object polls the interface for its state.
SUMMARY STEPS
1. configure
2. track track-name
3. type line-protocol state
4. interface type interface-path-id
5. exit
6. (Optional) delay {up seconds|down seconds}
7. Use one of the following commands:
• end
• commit
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
2
OL-24770-03
Implementing Object Tracking on the Cisco IOS XR Software
Tracking the Line Protocol State of an Interface
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/0/CPU0:router# configure
Step 2
track track-name
Enters track configuration mode.
• track-name—Specifies a name for the object to be tracked.
Example:
RP/0/0/CPU0:router(config)# track track1
Step 3
type line-protocol state
Creates a track based on the line protocol of an interface.
Example:
RP/0/0/CPU0:router(config-track)# type
line-protocol state
Step 4
interface type interface-path-id
Specifies the interface to track the protocol state.
• type—Specifies the interface type. For more information, use
the question mark (?) online help function.
Example:
RP/0/0/CPU0:router(config-track-line-prot)#
interface atm 0/2/0/0.1
• interface-path-id—Identifies a physical interface or a virtual
interface.
Note
Note
Step 5
Use the show interfaces command to see a list of all
possible interfaces currently configured on the router.
The loopback and null interfaces are always in the up state
and, therefore, cannot be tracked.
Exits the track line protocol configuration mode.
exit
Example:
RP/0/0/CPU0:router(config-track-line-prot)#
exit
Step 6
delay {up seconds|down seconds}
Example:
(Optional)
Schedules the delay that can occur between tracking whether the
object is up or down.
RP/0/0/CPU0:router(config-track)# delay up
10
Step 7
Use one of the following commands:
• end
• commit
Saves configuration changes.
• When you issue the end command, the system prompts you to
commit changes:
Uncommitted changes found, commit them
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
OL-24770-03
3
Implementing Object Tracking on the Cisco IOS XR Software
Tracking IP Route Reachability
Command or Action
Purpose
before exiting(yes/no/cancel)?
[cancel]:
Example:
RP/0/0/CPU0:router(config-track)# end
or
RP/0/0/CPU0:router(config-track)# commit
◦Entering yes saves configuration changes to the running
configuration file, exits the configuration session, and
returns the router to EXEC mode.
◦Entering no exits the configuration session and returns
the router to EXEC mode without committing the
configuration changes.
◦Entering cancel leaves the router in the current
configuration session without exiting or committing the
configuration changes.
• Use the commit command to save the configuration changes
to the running configuration file and remain within the
configuration session.
Tracking IP Route Reachability
When a host or a network goes down on a remote site, routing protocols notify the router and the routing table
is updated accordingly. The routing process is configured to notify the tracking process when the route state
changes due to a routing update.
A tracked object is considered up when a routing table entry exists for the route and the route is accessible.
SUMMARY STEPS
1. configure
2. track track-name
3. type route reachability
4. Use one of the following commands:
• vrf vrf-table-name
• route ipv4 IP-prefix/mask
5. exit
6. (Optional) delay {up seconds|down seconds}
7. Use the commit or end command.
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
4
OL-24770-03
Implementing Object Tracking on the Cisco IOS XR Software
Tracking IP Route Reachability
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/0/CPU0:router# configure
Step 2
track track-name
Enters track configuration mode.
• track-name—Specifies a name for the object to be tracked.
Example:
RP/0/0/CPU0:router(config)# track track1
Step 3
type route reachability
Configures the routing process to notify the tracking process when
the state of the route changes due to a routing update.
Example:
RP/0/0/CPU0:router(config-track)# type route
reachability vrf internet
Step 4
Use one of the following commands:
• vrf vrf-table-name
• route ipv4 IP-prefix/mask
Configures the type of IP route to be tracked, which can consist
of either of the following, depending on your router type:
• vrf-table-name—A VRF table name.
• IP-prefix/mask—An IP prefix consisting of the network and
subnet mask (for example, 10.56.8.10/16).
Example:
RP/0/0/CPU0:router(config-track-route)# vrf
vrf-table-4
or
RP/0/0/CPU0:router(config-track-route)#
route ipv4 10.56.8.10/16
Step 5
Exits the track line protocol configuration mode.
exit
Example:
RP/0/0/CPU0:router(config-track-line-prot)#
exit
Step 6
delay {up seconds|down seconds}
Example:
(Optional)
Schedules the delay that can occur between tracking whether the
object is up or down.
RP/0/0/CPU0:router(config-track)# delay up
10
Step 7
Use the commit or end command.
commit—Saves the configuration changes, and remains within
the configuration session.
end—Prompts user to take one of these actions:
• Yes— Saves configuration changes and exits the
configuration session.
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
OL-24770-03
5
Implementing Object Tracking on the Cisco IOS XR Software
Building a Track Based on a List of Objects
Command or Action
Purpose
• No—Exits the configuration session without committing the
configuration changes.
• Cancel—Remains in the configuration mode, without
committing the configuration changes.
Building a Track Based on a List of Objects
Perform this task in the global configuration mode to create a tracked list of objects (which, in this case, are
lists of interfaces or prefixes) using 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 calculations 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.
Note
An object must exist before it can be added to a tracked list.
The NOT operator is specified for one or more objects and negates the state of the object.
After configuring the tracked object, you must associate the interface whose state should be tracked and you
may optionally specify the number of seconds to wait before the tracking object polls the interface for its
state.
SUMMARY STEPS
1. configure
2. track track-name
3. type list boolean { and | or }
4. object object-name [ not ]
5. exit
6. (Optional) delay {up seconds|down seconds}
7. Use one of the following commands:
• end
• commit
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
6
OL-24770-03
Implementing Object Tracking on the Cisco IOS XR Software
Building a Track Based on a List of Objects
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/0/CPU0:router# configure
Step 2
track track-name
Enters track configuration mode.
• track-name—Specifies a name for the object to be tracked.
Example:
RP/0/0/CPU0:router(config)# track track1
Step 3
type list boolean { and | or }
Example:
RP/0/0/CPU0:router(config-track-list)# type
list boolean and
Configures a Boolean list object and enters track list configuration
mode.
• boolean—Specifies that the state of the tracked list is based on
a Boolean calculation.
• 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-name [ not ]
• obect-name—Name of the object to track.
Example:
RP/0/0/CPU0:router(config-track-list)#
object 3 not
Step 5
Specifies the object to be tracked by the list
• not—Negates the state of the object.
Exits the track line protocol configuration mode.
exit
Example:
RP/0/0/CPU0:router(config-track-line-prot)#
exit
Step 6
delay {up seconds|down seconds}
Example:
(Optional)
Schedules the delay that can occur between tracking whether the
object is up or down.
RP/0/0/CPU0:router(config-track)# delay up
10
Step 7
Use one of the following commands:
• end
• commit
Saves configuration changes.
• When you issue the end command, the system prompts you to
commit changes:
Uncommitted changes found, commit them
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
OL-24770-03
7
Implementing Object Tracking on the Cisco IOS XR Software
Tracking IPSLA Reachability
Command or Action
Purpose
before exiting(yes/no/cancel)?
[cancel]:
Example:
◦Entering yes saves configuration changes to the running
configuration file, exits the configuration session, and
returns the router to EXEC mode.
RP/0/0/CPU0:router(config-track)# end
or
RP/0/0/CPU0:router(config-track)# commit
◦Entering no exits the configuration session and returns
the router to EXEC mode without committing the
configuration changes.
◦Entering cancel leaves the router in the current
configuration session without exiting or committing the
configuration changes.
• Use the commit command to save the configuration changes
to the running configuration file and remain within the
configuration session.
Tracking IPSLA Reachability
Use this task to enable the tracking of the return code of IP service level agreement (SLA) operations.
SUMMARY STEPS
1. configure
2. track track-name
3. type rtr ipsla-no reachability
4. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/0/CPU0:router# configure
Step 2
track track-name
Enters track configuration mode.
Example:
RP/0/0/CPU0:router(config)# track t1
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
8
OL-24770-03
Implementing Object Tracking on the Cisco IOS XR Software
Configuration Examples for Configuring Object Tracking
Step 3
Command or Action
Purpose
type rtr ipsla-no reachability
Specifies the IP SLA operation ID to be tracked for reachability. Values
for the ipsla-no can range from1 to 2048.
Example:
RP/0/0/CPU0:router(config-track)# type
rtr 100 reachability
Step 4
Use the commit or end command.
commit—Saves the configuration changes and remains within the
configuration session.
end—Prompts user to take one of these actions:
• Yes— Saves configuration changes and exits the configuration
session.
• No—Exits the configuration session without committing the
configuration changes.
• Cancel—Remains in the configuration mode, without committing
the configuration changes.
Configuring IPSLA Tracking: Example
This example shows the configuration of IPSLA tracking:
RP/0/0/CPU0:router(config)# track
RP/0/0/CPU0:router(config-track)#
RP/0/0/CPU0:router(config-track)#
RP/0/0/CPU0:router(config-track)#
track1
type rtr 1 reachability
delay up 5
delay down 10
Configuration Examples for Configuring Object Tracking
Configuring IPSLA Tracking: Example
This example shows the configuration of IPSLA tracking, including the ACL and IPSLA configuration:
ACL configuration:
RP/0/0/CPU0:router(config)# ipv4 access-list abf-track
RP/0/0/CPU0:router(config-ipv4-acl)# 10 permit any any nexthop track track1 1.2.3.4
Object tracking configuration:
RP/0/0/CPU0:router(config)# track
RP/0/0/CPU0:router(config-track)#
RP/0/0/CPU0:router(config-track)#
RP/0/0/CPU0:router(config-track)#
track1
type rtr 1 reachability
delay up 5
delay down 10
IPSLA configuration:
RP/0/0/CPU0:router(config)# ipsla
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
OL-24770-03
9
Implementing Object Tracking on the Cisco IOS XR Software
Additional References
RP/0/0/CPU0:router(config-ipsla)# operation 1
RP/0/0/CPU0:router(config-ipsla-op)# type icmp echo
RP/0/0/CPU0:router(config-ipsla-icmp-echo)# source address 2.3.4.5
RP/0/0/CPU0:router(config-ipsla-icmp-echo)# destination address 1.2.3.4
RP/0/0/CPU0:router(config-ipsla-icmp-echo)# frequency 60
RP/0/0/CPU0:router(config-ipsla-icmp-echo)# exit
RP/0/0/CPU0:router(config-ipsla-op)# exit
RP/0/0/CPU0:router(config-ipsla)# schedule operation 1
RP/0/0/CPU0:router(config-ipsla-sched)# start-time now
RP/0/0/CPU0:router(config-ipsla-sched)# life forever
Additional References
The following sections provide references related to implementing object tracking for IPSec network security.
Related Documents
Related Topic
Document Title
IP SLA configuration information
Implementing IP Service Level Agreements on the
Cisco IOS XR Software module in Cisco IOS XR
System Monitoring Configuration Guide for the
Cisco XR 12000 Series Router
IP SLA commands
IP Service Level Agreement Commands on the
Cisco IOS XR Software module in Cisco IOS XR
System Monitoring Command Reference for the
Cisco XR 12000 Series Router
Object tracking commands
Object Tracking Commands on the Cisco IOS XR
Software module in Cisco IOS XR System
Management Command Reference for the
Cisco XR 12000 Series Router
Standards
Standards
Title
No new or modified standards are supported by this —
feature, and support for existing standards has not
been modified by this feature.
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
10
OL-24770-03
Implementing Object Tracking on the Cisco IOS XR Software
Additional References
MIBs
MIBs
MIBs Link
—
To locate and download MIBs using Cisco IOS XR
software, use the Cisco MIB Locator found at the
following URL and choose a platform under the
Cisco Access Products menu: http://cisco.com/public/
sw-center/netmgmt/cmtk/mibs.shtml
RFCs
RFCs
Title
RFC 2401
Security Architecture for the Internet Protocol
Technical Assistance
Description
Link
The Cisco Technical Support website contains
http://www.cisco.com/cisco/web/support/index.html
thousands of pages of searchable technical content,
including links to products, technologies, solutions,
technical tips, and tools. Registered Cisco.com users
can log in from this page to access even more content.
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
OL-24770-03
11
Implementing Object Tracking on the Cisco IOS XR Software
Additional References
Cisco IOS XR System Management Configuration Guide for the Cisco XR 12000 Series Router, Release 4.1
12
OL-24770-03
Download PDF
Similar pages