Static Route Object Tracking

Feature History for Static Route 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

Static Route Object Tracking: Static routing support with enhanced object tracking allows a device to use ICMP pings to detect when a pre-configured static route or a DHCP route becomes unavailable.

Cisco C9350 Series Smart Switches

Cisco C9610 Series Smart Switches

Static Route Object Tracking

Static routing support with enhanced object tracking allows a device to use ICMP pings to detect when a pre-configured static route or a DHCP route becomes unavailable. When tracking is enabled, the system monitors the status of the route and notifies the client whenever there is a change in state. This functionality leverages IP SLAs to generate ICMP pings, enabling continuous monitoring of the connection to the primary gateway and ensuring timely updates if the route goes down.

Configure Static Route Object Tracking

Follow these tasks to configure static route object tracking.

Procedure


Step 1

Configure a primary interface for static routing

Step 2

Configure a primary interface for DHCP

Step 3

Configure IP SLAs monitoring agent

Step 4

Configure a routing policy and a default route


Configure a primary interface for static routing

Perform this task to configure a primary interface for static routing.

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

interface interface-id

Example:

Device(config)# interface vlan10

Selects a primary or secondary interface and enters interface configuration mode.

Step 4

description string

Example:

Device(config-vlan)# description ip-sla

Adds a description to the interface.

Step 5

ip address ip-address mask [secondary]

Example:

Device(config-vlan)# ip address 192.168.1.2 255.255.255.0

Sets the primary or secondary IP address for the interface.

Step 6

exit

Example:

Device(config-vlan)# exit

Returns to global configuration mode.


Configure a primary interface for DHCP

Perform this task to configure a primary interface for DHCP.

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

interface interface-id

Example:

Device(config)# interface vlan10

Selects a primary or secondary interface and enters interface configuration mode.

Step 4

description string

Example:

Device(config-vlan)# description ip-sla

Adds a description to the interface.

Step 5

ip dhcp client route track number

Example:

Device(config-vlan)# ip dhcp client route track 2

Configures the DCHP client to associate any added routes with the specified track number.

The range is from 1 to 500.

Step 6

exit

Example:

Device(config-track)# exit

Returns to global configuration mode.


Configure IP SLAs monitoring agent

You can configure an IP SLAs agent to ping an IP address using a primary interface and a track object to monitor the state of the agent.

Perform this task to configure IP SLAs monitoring agent.

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

ip sla operation-number

Example:

Device(config)# ip sla 1

Starts IP SLAs operation and enters IP SLA configuration mode.

Step 4

icmp-echo {destination ip-address | destination hostname [source - ipaddr {ip-address | hostname source-interface interface-id]

Example:

Device(config-ip-sla)# icmp-echo 172.16.1.1 source-ip 10.0.0.1

Configures a Cisco IP SLAs end-to-end ICMP echo response time operation and enter IP SLAs ICMP echo configuration mode.

Step 5

timeout milliseconds

Example:

Device(config-ip-sla)# timeout 1000

Sets the amount of time for which the operation waits for a response from its request packet.

Step 6

frequency seconds

Example:

Device(config-ip-sla)# frequency 5

Sets the rate at which the operation is sent into the network.

Step 7

threshold milliseconds

Example:

Device(config-ip-sla)# threshold 1000

Sets the rising threshold (hysteresis) that generates a reaction event and stores history information for the operation.

Step 8

exit

Example:

Device(config-ip-sla)# exit

Exits IP SLAs ICMP echo configuration mode.

Step 9

ip sla schedule operation-number [life {forever | seconds}] start-time time | pending | now | after time] ageout seconds] [recurring]

Example:

Device(config)# ip sla schedule 1 life forever start-time now

Configures the scheduling parameters for a single IP SLAs operation.

  • object-number : The range is from 1 to 500.

  • operation-number : The range is from 1 to 2147483647.

Step 10

track object-number rtr operation-number state reachability

Example:

Device(config)# track 10 rtr 1 state reachability

Tracks the state of a Cisco IOS IP SLAs operation and enter tracking configuration mode.

Step 11

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 12

show track object-number

Verifies that the specified objects are being tracked.

Step 13

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.


Configure a routing policy and a default route

Peform this task to configure a routing policy and a default route.

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

access-list access-list-number

Example:

Device(config)# access-list 101

Defines an extended IP access list. Configure any optional characteristics.

Step 4

route-map map tag [permit | deny] [sequence-number]

Example:

Device(config)# route-map PBR_OUT permit 10

Enters route-map configuration mode and define conditions for redistributing routes from one routing protocol to another.

Step 5

match ip address {access-list number [permit| deny] [sequence-number]

Example:

Device(config-route-map)# match ip address 101

Distribute any routes that have a destination network number address that is permitted by a standard or extended access list or performs policy routing on packets. You can enter multiple numbers or names.

Step 6

set ip next-hop dynamic dhcp

Example:

Device(config-route-map)#  set ip next-hop dynamic dhcp

For DHCP networks only. Sets the next hop to the gateway that was most recently learned by the DHCP client.

Step 7

set interface interface-id

Example:

Device(config-route-map)#  set interface gigabitethernet 1/0/1

For static routing networks only. Indicates where to send output packets that pass a match clause of a route map for policy routing.

Step 8

exit

Example:

Device(config-route-map)#  exit

Returns to global configuration mode.

Step 9

ip local policy route-map map tag

Example:

Device(config)# ip local policy route-map PBR_OUT

Identifies a route map to use for local policy routing.

Step 10

ip route prefix mask {ip address | interface-id [ip-address]} [distance] [name] [permanent | track track-number] [tag tag]

Example:

Device(config)# ip route 172.16.1.0 255.255.255.0 10.0.1.2

For static routing networks only. Establishes static routes. Entering tracktrack-number specifies that the static route is installed only if the configured track object is up.

Step 11

end

Example:

Device(config)# exit

Returns to privileged EXEC mode.

Step 12

show ip route track table

Example:

Device# show ip route track table

Displays information about the IP route track table.

Step 13

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.