threshold metric through track timer

threshold metric

To set a threshold metric, use the threshold metric command in tracking configuration mode. To remove the threshold metric value, use the no form of this command.

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

no threshold metric

Syntax Description

up

Specifies the up threshold. The state is up if the scaled metric for that route is less than or equal to the up threshold.

number

Threshold value. The range is from 0 to 255. The up threshold default is 254, and the down threshold default is 255.

down

Specifies the down threshold. The state is down if the scaled metric for that route is greater than or equal to the down threshold.

Command Default

No threshold metric is set.

Command Modes

Tracking configuration (config-track)

Command History

Release

Modification

12.2(15)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.

15.3(3)M

This command was integrated into Cisco IOS Release 15.3(3)M.

Cisco IOS XE 3.3SE

This command was implemented in Cisco IOS XE Release 3.3SE.

Usage Guidelines

This command is available only for IP-route threshold metric objects tracked by the track ip route metric threshold command in global configuration mode.

The default up and down threshold values are 254 and 255, respectively. With these values, IP-route threshold tracking gives the same result as IP-route reachability tracking.

Examples

In the following example, the tracking process is tracking the IP-route threshold metric. The threshold metric is set to 16 for the up threshold and to 20 for the down threshold. The delay period to communicate the changes of a down event of the tracked object to the client process is set to 20 seconds.

Router(config)# track 1 ip route 10.22.0.0/16 metric threshold
Router(config-track)# threshold metric up 16 down 20 
Router(config-track)# delay down 20

Related Commands

Command

Description

track ip route

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

track

To configure an interface to be tracked where the Gateway Load Balancing Protocol (GLBP) weighting changes based on the state of the interface, use the track command in global configuration mode. To remove the tracking, use the no form of this command.

track object-number interface type number { line-protocol | ip routing }

no track object-number interface type number { line-protocol | ip routing }

Syntax Description

object-number

Object number in the range from 1 to 1000 representing the interface to be tracked.

interface type number

Interface type and number to be tracked.

line-protocol

Tracks whether the interface is up.

ip routing

Tracks whether IP routing is enabled, an IP address is configured on the interface, and the interface state is up, before reporting to GLBP that the interface is up.

Command Default

The state of the interfaces is not tracked.

Command Modes

Global configuration (config)

Command History

Release

Modification

12.2(14)S

This command was introduced.

12.2(15)T

This command was integrated into Cisco IOS Release 12.2(15)T.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

15.1(3)T

This command was modified. The valid range of the object-number argument increased to 1000.

15.1(1)S

This command was modified. The valid range for the object-number argument increased to 1000.

12.2(50)SY

This command was modified. The valid range for the object-number argument increased to 1000.

Cisco IOS XE 3.3SE

This command was implemented in Cisco IOS XE Release 3.3SE.

Usage Guidelines

Use the track command in conjunction with the glbp weighting and glbp weighting track commands to configure parameters for an interface to be tracked. If a tracked interface on a GLBP router goes down, the weighting for that router is reduced. If the weighting falls below a specified minimum, the router will lose its ability to act as an active GLBP virtual forwarder.

As of Cisco IOS Release 15.1(3)T, 15.1(1)S and 12.2(50)SY, a maximum of 1000 objects can be tracked. Although 1000 tracked objects can be configured, each tracked object uses CPU resources. The amount of available CPU resources on a router is dependent upon variables such as traffic load and how other protocols are configured and run. The ability to use 1000 tracked objects is dependent upon the available CPU. Testing should be conducted on site to ensure that the service works under the specific site traffic conditions.

Examples

In the following example, Fast Ethernet interface 0/0 tracks whether serial interfaces 2/0 and 3/0 are up. If either serial interface goes down, the GLBP weighting is reduced by the default value of 10. If both serial interfaces go down, the GLBP weighting will fall below the lower threshold and the router will no longer be an active forwarder. To resume its role as an active forwarder, the router must have both tracked interfaces back up, and the weighting must rise above the upper threshold.

Router(config)# track 1 interface serial 2/0 line-protocol 
Router(config-track)# exit
Router(config)# track 2 interface serial 3/0 line-protocol 
Router(config-track)# exit
Router(config)# interface FastEthernet 0/0 
Router(config-if)# ip address 10.21.8.32 255.255.255.0 
Router(config-if)# glbp 10 weighting 110 lower 95 upper 105 
Router(config-if)# glbp 10 weighting track 1 
Router(config-if)# glbp 10 weighting track 2

In the following example, Fast Ethernet interface 0/0 tracks whether serial interface 2/0 is enabled for IP routing, whether it is configured with an IP address, and whether the state of the interface is up. If serial interface 2/0 goes down, the GLBP weighting is reduced by a value of 20.

Router(config)# track 2 interface serial 2/0 ip routing 
Router(config-track)# exit
Router(config)# interface FastEthernet 0/0 
Router(config-if)# ip address 10.21.8.32 255.255.255.0 
Router(config-if)# glbp 10 weighting 110 lower 95 upper 105 
Router(config-if)# glbp 10 weighting track 2 decrement 20 

Related Commands

Command

Description

glbp weighting

Specifies the initial weighting value of a GLBP gateway.

glbp weighting track

Specifies an object to be tracked that affects the weighting of a GLBP gateway.

track interface

To track an interface and to enter tracking configuration mode, use the track interface command in global configuration mode. To remove the tracking, use the no form of this command.

track object-number interface type number { line-protocol | ip routing | ipv6 routing }

no track object-number interface type number { line-protocol | ip routing | ipv6 routing }

Syntax Description

object-number

Object number that represents the interface to be tracked. The range is from 1 to 1000.

type number

Interface type and number to be tracked. No space is required between the values.

line-protocol

Tracks the state of the interface line protocol.

ip routing

Tracks whether IP routing is enabled, whether an IP address is configured on the interface, and whether the interface state is up before reporting to the tracking client that the interface is up.

ipv6 routing

Tracks whether IPv6 routing is enabled, whether an IPv6 address is configured on the interface, and whether the interface state is up before reporting to the tracking client that the interface is up.

Command Default

No interface is tracked.

Command Modes

Global configuration (config)

Command History

Release

Modification

12.2(15)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.3(11)T

This command was enhanced to allow the tracking of an IP address on an interface that was acquired through DHCP or PPP IPCP.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(18)SXF

This command was introduced on the Supervisor Engine 720.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.

15.1(3)T

This command was modified. The valid range of the object-number argument increased to 1000.

15.1(1)S

This command was integrated into Cisco IOS Release 15.1(1)S.

12.2(50)SY

This command was integrated into Cisco IOS Release 12.2(50)SY.

15.3(3)M

This command was modified. The ipv6 routing keyword was added.

Cisco IOS XE 3.3SE

This command was implemented in Cisco IOS XE Release 3.3SE.

Usage Guidelines

This command reports a state value to clients. A tracked IP or IPv6 routing object is considered up when the following criteria exist:

  • IP or IPv6 routing is enabled and active on the interface.

  • The state of the interface line protocol is up.

  • The interface address is known. The address is configured or received through the Dynamic Host Configuration Protocol (DHCP) or IP Control Protocol (IPCP) negotiation.

Interface IP or IPv6 routing goes down when one of the following criteria exist:

  • IP or IPv6 routing is disabled globally.

  • The state of the interface line protocol is down.

  • The interface address is unknown. The address is not configured or received through DHCP or IPCP negotiation.

A space is not required between the type and numbervalues.

Tracking the IP or IPv6 routing state of an interface can be more useful in some situations than tracking the interface-line-protocol state, 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, which means that Link Control Protocol negotiated successfully, but IP could be down, which means that IPCP negotiation failed.

The track interface command supports the tracking of an interface with an IP or IPv6 address acquired through any of the following methods:

  • Conventional IP address configuration

  • PPP/IPCP

  • DHCP

  • Unnumbered interface

Examples

In the following example, the tracking process is configured to track the IP-routing capability of serial interface 1/0:

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

In the following example, the tracking process is configured to track the IPv6-routing capability of a GigabitEthernet interface 1/0/0:

Router(config)# track 1 interface GigabitEthernet 1/0/0 ipv6 routing
Router(config-track)#

Related Commands

Command

Description

show track

Displays HSRP tracking information.

track ip route

To track the state of an IP route and to enter tracking configuration mode, use the track ip route command in global configuration mode. To remove the tracking, use the no form of this command.

track object-number { ip | ipv6 } route address /prefix-length { reachability | metric threshold }

no track object-number { ip | ipv6 } route address /prefix-length { reachability | metric threshold }

Syntax Description

object-number

Object number that represents the object to be tracked. The range is from 1 to 1000.

ip

Tracks an IP route.

ipv6

Tracks an IPv6 route.

address

IP or IPv6 subnet address to the route that is being tracked.

/prefix-length

Number of bits in the address prefix. A forward slash (/) is required.

reachability

Tracks whether the route is reachable.

metric threshold

Tracks the threshold metric. The default up threshold is 254, and the default down threshold is 255.

Command Default

The route to the subnet address is not tracked.

Command Modes

Global configuration (config)

Command History

Release

Modification

12.2(15)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.

15.1(3)T

This command was modified. The valid range of the object-number argument increased to 1000.

15.1(1)S

This command was integrated into Cisco IOS Release 15.1(1)S.

12.2(50)SY

This command was integrated into Cisco IOS Release 12.2(50)SY.

15.3(3)M

This command was modified. The ipv6 keyword was added.

Cisco IOS XE 3.3SE

This command was implemented in Cisco IOS XE Release 3.3SE.

Usage Guidelines

A tracked IP-route or IPv6-route object is considered up and reachable when a routing-table entry exists for the route and the route is not inaccessible.

To provide a common interface for tracking clients, route metric values are normalized to the range of 0 to 255, where 0 is connected and 255 is inaccessible. The resulting value is compared against threshold values to determine the tracking state as follows:

  • State is up if the scaled metric for the route is less than or equal to the up threshold.

  • State is down if the scaled metric for the route is greater than or equal to the down threshold.

The tracking process uses a per-protocol configurable resolution value to convert the real metric to the scaled metric. The metric value communicated to clients is always such that a lower metric value is better than a higher metric value.

Use the threshold metric tracking configuration command to specify a threshold metric.

As of Cisco IOS Release 15.1(3)T, 15.1(1)S, and 12.2(50)SY, a maximum of 1000 objects can be tracked. Although 1000 tracked objects can be configured, each tracked object uses CPU resources. The amount of available CPU resources on a router depends on variables such as traffic load and how other protocols are configured and run. The ability to use 1000 tracked objects depends on available CPU resources. Testing should be conducted to ensure that the service works under the specific site-traffic conditions.

Examples

In the following example, the tracking process is configured to track the reachability of 10.22.0.0/16:

Router(config)# track 1 ip route 10.22.0.0/16 reachability

In the following example, the tracking process is configured to track the threshold metric using the default threshold metric values:

Router(config)# track 1 ip route 10.22.0.0/16 metric threshold

In the following example, the tracking process is configured to track the threshold metric using the default threshold metric values for an IPv6 route:

Router(config)# track 2 ipv6 route 2001:DB8:0:ABCD::1/10 metric threshold

Related Commands

Command

Description

show track

Displays HSRP tracking information.

threshold metric

Sets a threshold metric.

track resolution

To specify resolution parameters for a tracked object, use the track resolution command in global configuration mode. To disable this functionality, use the no form of this command.

track resolution { ip route | ipv6 route | { bgp | eigrp | isis | ospf | static } | resolution-value }

no track resolution { ip route | ipv6 route | { bgp | eigrp | isis | ospf | static } | resolution-value }

Syntax Description

ip route

IP route for metric resolution for a specified track. The keywords and arguments are as follows:

  • bgp —BGP routing protocol. The resolution-value argument has a range from 256 to 40000000.

  • eigrp —EIGRP routing protocol. The resolution-value argument has a range from 256 to 40000000.

  • isis —ISIS routing protocol. The resolution-value argument has a range from 1 to 1000.

  • ospf —OSPF routing protocol. The resolution-value argument has a range from 1 to 1562.

  • static —Static route. The resolution-value argument has a range from 1 to 100000.

ipv6 route

IPv6 route for metric resolution for a specified track. The keywords and arguments are as follows:

  • bgp —BGP routing protocol. The resolution-value argument has a range from 256 to 40000000. The default value is 2560.

  • eigrp —EIGRP routing protocol. The resolution-value argument has a range from 256 to 40000000. The default value is 2560.

  • isis —ISIS routing protocol. The resolution-value argument has a range from 1 to 1000.

    The default value is 10.

  • ospf —OSPF routing protocol. The resolution-value argument has a range from 1 to 1562. The default value is 1.

  • static —Static route. The resolution-value argument has a range from 1 to 100000. The default value is 10.

Command Default

The default threshold metric values are used.

Command Modes

Global configuration (config)

Command History

Release

Modification

12.3(8)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(31)SB2

This command was integrated into Cisco IOS Release 12.2(31)SB2.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

15.3(3)M

This command was modified. The ipv6 route keyword was added.

Cisco IOS XE 3.3SE

This command was implemented in Cisco IOS XE Release 3.3SE.

Usage Guidelines

The track ip route command causes tracking of a route in the routing table. If a route exists in the table, the metric value is converted into a number in the range of 0 to 255. The metric resolution for the specified routing protocol is used to do the conversion. There are default values for metric resolution, but the track resolution command can be used to change them.

Examples

In the following example, the EIGRP routing protocol has a resolution value of 280.

Router(config)# track resolution ip route eigrp 280

Related Commands

Command

Description

show track

Displays tracking information.

threshold percentage

Specifies a threshold percentage for a tracked list.

threshold weight

Specifies a threshold weight for a tracked list.

track list threshold percentage

Specifies a percentage threshold for a tracked list.

track list threshold weight

Specifies a weight threshold for a tracked list.

track timer

To specify the interval that a tracking process polls a tracked object, use the track timer command in global configuration mode. To reset to the default polling interval, use the no form of this command.

track timer { application | interface | ip | { route | sla } | ipv6 route | list | stub-object } { seconds | msec milliseconds }

no track timer { application | interface | ip | { route | sla } | ipv6 route | list | stub-object } { seconds | msec milliseconds }

Syntax Description

application

Tracks the mobile IP application polling timer.

interface

Tracks the specified interface.

ip

Tracks the specified IP protocol.

route

Tracks the route polling timer.

sla

Tracks the route polling timer.

ipv6 route

Tracks the specified IPv6 protocol.

list

Tracks the boolean list polling timer.

stub-object

Tracks the Embedded Event Manager (EEM) stub polling timer.

seconds

Polling interval, in seconds. The range is from 1 to 3000. The default for interface polling is 1 second, and the default for IP-route polling is 15 seconds.

msec milliseconds

Specifies the polling interval in milliseconds. The range is 500 to 5000.

All polling frequencies can be configured down to 500 milliseconds, overriding the minimum 1 second interval configured previously.

Command Default

If you do not use the track timer command to specify a polling interval, a tracked object will be tracked at the default polling interval, as described in the table below:
Object Default Polling Interval (seconds)

Application

5

Interface

1

IP route

15

IP SLA

5

IPv6 route

15

List

1

Stub-object

1

Command Modes

Global configuration (config)

Command History

Release

Modification

12.2(15)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SRE

This command was modified. The list and sla keywords were added.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.

Cisco IOS XE Release 2.1

This command was integrated into Cisco IOS XE Release 2.1.

15.0(1)M

This command was modified. The application and msec keywords and the milliseconds argument were added.

12.2(33)SXI4

This command was integrated into Cisco IOS Release 12.2(33)SXI4.

15.3(3)M

This command was modified. The ipv6 keyword was added.

Cisco IOS XE 3.3SE

This command was implemented in Cisco IOS XE Release 3.3SE.

Examples

In the following example, the tracking process polls the tracked interface every 3 seconds:

Router# configure terminal
Router(config)# track timer interface 3

In the following example, the tracking process polls the tracked IPv6 route every 5 seconds:
Router# configure terminal
Router(config)# track timer ipv6 route 5