OcNOS SP : Layer 3 Guide : Layer 3 Unicast Configuration : Static Route Object Tracking using IP SLA
Static Route Object Tracking using IP SLA
Overview
Static Route Object Tracking feature tracks the state of an object's reachability using IP SLA. Client processes like Virtual Router Redundancy Protocol (VRRP) or RIB can register their interest in tracking objects and receive notifications when a state change occurs.
IP Service-Level Assurance (SLA) is a protocol used for analyzing IP service levels in applications and services. It employs active traffic-monitoring technology to continuously monitor network traffic. IP SLA utilizes Internet Control Message Protocol (ICMP) pings to detect link failures and notifies registered clients of such events.
The Object Tracking feature ensures clear separation between the objects to be tracked and the actions taken by clients when a tracked object's state changes. Multiple clients, including VRRP and RIB, can register their interest in tracking the same object, each with distinct actions upon state changes. This Tracking feature is available in OAMD.
Each tracked object is assigned a unique number in the tracking command, which client processes use to monitor specific objects. The tracking process monitors events from these tracked objects and records value changes. Any changes in tracked object values are communicated to interested client processes, either immediately or with a specified delay. The object values are reported as either up or down.
Topology
Figure 6-7 represents a sample network topology featuring RTR1, RTR2, RTR3, and RTR4, used to demonstrate the static route object tracking feature.
 
Static Route Object Tracking
IPv4 Configuration
The following configuration commands provide an illustrative example of setting up various network parameters on the routers (RTR1, RTR2, RTR3, and RTR4). These commands showcase the configuration of IPv4 addresses, the implementation of IP SLA for network monitoring, the establishment of static routes, and the use of time ranges. Each command serves a specific purpose in configuring and fine-tuning the router's behavior within the network. This example demonstrates a basic network setup with key components for efficient network management and monitoring.
RTR1
 
RTR1#configure terminal
Enter Configure mode.
RTR1(config)#interface ce52
Enter interface mode.
RTR1(config-if)#ip address 2.2.2.1/24
Configure IPv4 address.
RTR1(config-if)#exit
Exit interface mode.
RTR1(config)#interface xe45
Enter interface mode.
RTR1(config-if)#ip address 4.4.4.1/24
Configure IPv4 address.
RTR1(config-if)#exit
Exit interface mode.
RTR1(config)#ip sla 1
Configure IP SLA with a unique number.
RTR1(config-ip-sla)#icmp-echo ipv4 2.2.2.2 source-interface ce52
Configure the ICMP-echo using destination IPv4 address and source interface name.
RTR1(config-ip-sla-echo)#threshold 1000
Configure the threshold value.
RTR1(config-ip-sla-echo)#timeout 1000
Configure the timeout value.
RTR1(config-ip-sla-echo)#frequency 5
Configure the frequency value.
RTR1(config-ip-sla-echo)#exit
Exit IP SLA echo mode.
RTR1(config-ip-sla)#exit
Exit IP SLA mode.
RTR1(config)#time-range tr1
Configure a time-range.
RTR1(config-tr)#start-time 11:22 3 july 2021
Configure a start-time.
RTR1(config-tr)#end-time after 200
Configure end-time.
RTR1(config-tr)#exit
Exit time-range mode.
RTR1(config)#ip sla schedule 1 time-range tr1
Schedule an IP SLA measurement.
RTR1(config)#track 1 ip sla 1 reachability
Configure the track ID for IP SLA.
RTR1(config-object-track)#exit
Exit object track mode.
RTR1(config)#ip route 3.3.3.0/24 2.2.2.2 track 1
Configure the static route with the nexthop address.
RTR1(config)#ip route 5.5.5.0/24 4.4.4.2
Configure the static route with the nexthop address.
RTR1(config)#ip route 6.6.6.0/24 2.2.2.2 track 1
Configure the static route with the nexthop address and track ID.
RTR1(config)#ip route 6.6.6.0/24 4.4.4.2 10
Configure the static route with the nexthop address and delay.
RTR1(config)#commit
Commit the candidate configuration to the running configuration.
RTR1(config)#exit
Exit configure mode.
RTR2
 
RTR2#configure terminal
Enter configure mode.
RTR2(config)#interface ce50
Enter interface mode.
RTR2(config-if)#ip address 3.3.3.1/24
Configure IPv4 address.
RTR2(config-if)#exit
Exit interface mode.
RTR2(config)#interface ce52
Enter interface mode.
RTR2(config-if)#ip address 2.2.2.2/24
Configure IPv4 address.
RTR2(config-if)#exit
Exit interface mode.
RTR2(config)#ip route 6.6.6.0/24 3.3.3.2
Configure the static route with the nexthop address.
RTR2(config)#commit
Commit the candidate configuration to the running configuration.
RTR2(config)#exit
Exit configure mode.
RTR3
 
RTR3#configure terminal
Enter configure mode.
RTR3(config)#interface xe7
Enter interface mode.
RTR3(config-if)#ip address 5.5.5.1/24
Configure IPv4 address.
RTR3(config-if)#exit
Exit interface mode.
RTR3(config)#interface xe14
Enter interface mode.
RTR3(config-if)#ip address 4.4.4.2/24
Configure IPv4 address.
RTR3(config-if)#commit
Commit the candidate configuration to the running configuration.
RTR3(config-if)#exit
Exit interface mode.
RTR3(config)#ip route 6.6.6.0/24 5.5.5.2
Configure the static route with the nexthop address.
RTR3(config)#commit
Commit the candidate configuration to the running configuration.
RTR3(config)#exit
Exit configure mode.
RTR4
 
RTR4#configure terminal
Enter configure mode.
RTR4(config)#interface ce0
Enter interface mode.
RTR4(config-if)#ip address 3.3.3.2/24
Configure IPv4 address.
RTR4(config-if)#exit
Exit interface mode.
RTR4(config)#interface xe1
Enter interface mode.
RTR4(config-if)#ip address 6.6.6.6/24
Configure IPv4 address.
RTR4(config-if)#exit
Exit interface mode.
RTR4(config)#interface xe7
Enter interface mode.
RTR4(config-if)#ip address 5.5.5.2/24
Configure IPv4 address.
RTR4(config-if)#commit
Commit the candidate configuration to the running configuration.
RTR4(config-if)#exit
Exit interface mode.
RTR4(config)#ip route 2.2.2.0/24 3.3.3.1
Configure the static route with the nexthop address.
RTR4(config)#ip route 4.4.4.0/24 5.5.5.1
Configure the static route with the nexthop address.
RTR4(config)#commit
Commit the candidate configuration to the running configuration.
RTR4(config)#exit
Exit configure mode.
Validation
RTR1
Below is the routing and tracking information for RTR1, which includes details about its IP SLA reachability tracking and static routes.
RTR1#show track
TRACK Id: 1
IP SLA 1 reachability
Reachability is UP
4 changes, last change : 2019 Mar 14 14:53:47
 
RTR1#show ip route track-table
ip route 3.3.3.0 255.255.255.0 2.2.2.2 track 1 state is [up]
ip route 6.6.6.0 255.255.255.0 2.2.2.2 track 1 state is [up]
 
RTR1#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
C 1.1.1.0/24 is directly connected, xe1, 00:55:39
C 2.2.2.0/24 is directly connected, ce52, 00:55:38
S 3.3.3.0/24 [1/0] via 2.2.2.2, ce52, 00:00:03
C 4.4.4.0/24 is directly connected, xe45, 00:49:50
S 5.5.5.0/24 [1/0] via 4.4.4.2, xe45, 00:08:12
S 6.6.6.0/24 [1/0] via 2.2.2.2, ce52, 00:00:03
C 127.0.0.0/8 is directly connected, lo, 6d23h24m
 
Gateway of last resort is not set
RTR2
RTR2#show running-config interface ce52
!
interface ce52
ip address 2.2.2.2/24
!
Now remove the IPv4 address configuration from interface ce52 on RTR2 and commit the changes made in the configuration to the running configuration.
RTR2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RTR2(config)#interface ce52
RTR2(config-if)#no ip address
RTR2(config-if)#commit
RTR1
The following output from RTR1 routing table and tracking details indicates changes in the reachability of certain routes and related IP SLA measurements:
RTR1#sh ip route track-table
2019 Mar 14 14:55:14.350 : R1 : OAM : CRITI : [IPSLA_ICMP_ECHO_THRESHOLD_CROSSED_2]: IP SLA 1, response packet 15 exceeds the threshold 10000 ms
2019 Mar 14 14:55:14.351 : R1 : OAM : CRITI : [IPSLA_ICMP_ECHO_TIMEOUT_2]: IP SLA 1, response packet 15 exceeds the timeout 10000 ms
2019 Mar 14 14:55:14.351 : R1 : OAM : CRITI : [IPSLA_ICMP_ECHO_DISCONNECT_2]: Stopping IP SLA measurement for sla(1) as timeout(10000) observed for packet(15)
 
ip route 3.3.3.0 255.255.255.0 2.2.2.2 track 1 state is [down]
ip route 6.6.6.0 255.255.255.0 2.2.2.2 track 1 state is [down]
The IP SLA measurement for SLA 1 experienced threshold exceedances and timeouts, resulting in changes to the reachability status of the tracked routes. The routes associated with IP SLA tracking, such as 3.3.3.0/24 and 6.6.6.0/24, are marked as DOWN.
RTR1#show track
TRACK Id: 1
IP SLA 1 reachability
Reachability is DOWN
5 changes, last change : 2019 Mar 14 14:55:14
 
2019 Mar 14 14:55:19.352 : R1 : OAM : CRITI : [IPSLA_ICMP_ECHO_THRESHOLD_CROSSED_2]: IP SLA 1, response packet 16 exceeds the threshold 10000 ms
2019 Mar 14 14:55:19.353 : R1 : OAM : CRITI : [IPSLA_ICMP_ECHO_TIMEOUT_2]: IP SLA 1, response packet 16 exceeds the timeout 10000 ms
2019 Mar 14 14:55:19.353 : R1 : OAM : CRITI : [IPSLA_ICMP_ECHO_DISCONNECT_2]: Stopping IP SLA measurement for sla(1) as timeout(10000) observed for packet(16)
 
RTR1#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
C 1.1.1.0/24 is directly connected, xe1, 00:56:16
C 2.2.2.0/24 is directly connected, ce52, 00:56:15
C 4.4.4.0/24 is directly connected, xe45, 00:50:27
S 5.5.5.0/24 [1/0] via 4.4.4.2, xe45, 00:08:49
S 6.6.6.0/24 [10/0] via 4.4.4.2, xe45, 00:00:07
C 127.0.0.0/8 is directly connected, lo, 6d23h24m
 
Gateway of last resort is not set
When the IP SLA operation determines that 6.6.6.6 is reachable, the route appears in the routing table, allowing traffic to be routed to that destination. This mechanism provides dynamic routing based on the real-time reachability of the specified IPv4 address.
RTR1#ping 6.6.6.6
Press CTRL+C to exit
PING 6.6.6.6 (6.6.6.6) 56(84) bytes of data.
64 bytes from 6.6.6.6: icmp_seq=1 ttl=63 time=0.713 ms
64 bytes from 6.6.6.6: icmp_seq=2 ttl=63 time=0.658 ms
64 bytes from 6.6.6.6: icmp_seq=3 ttl=63 time=0.531 ms
64 bytes from 6.6.6.6: icmp_seq=4 ttl=63 time=0.505 ms
 
RTR1#show ip route database
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
> - selected route, * - FIB route, p - stale info
 
IP Route Table for VRF "default"
C *> 1.1.1.0/24 is directly connected, xe1, 00:56:58
C *> 2.2.2.0/24 is directly connected, ce52, 00:56:57
S 3.3.3.0/24 [1/0] via 2.2.2.2, ce52, 00:01:22
C *> 4.4.4.0/24 is directly connected, xe45, 00:51:09
S *> 5.5.5.0/24 [1/0] via 4.4.4.2, xe45, 00:09:31
S *> 6.6.6.0/24 [10/0] via 4.4.4.2, xe45, 00:00:49
S 6.6.6.0/24 [1/0] via 2.2.2.2, ce52, 00:01:22
C *> 127.0.0.0/8 is directly connected, lo, 6d23h25m
 
 
RTR1#show ip sla summary
IP SLA Operation Summary
Codes: * active, ^ inactive
 
ID Type Destination Stats Return Last
(usec) Code Run
-------------------------------------------------------------------
*1 icmp-echo 2.2.2.2 14000 OK 2019 Mar 14 14:56:26
RTR2
Now configure the IPv4 address from interface ce52 on RTR2 and commit the changes made in the configuration to the running configuration.
RTR2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTR2(config)#interface ce52
RTR2(config-if)#ip address 2.2.2.2/24
RTR2(config-if)#commit
RTR1
By configuring the IPv4 address on RTR2 interface ce52 brings up the interface and allows RTR1 to reach RTR2 via the IPv4 address 2.2.2.2/24, leading to the change in the IP SLA tracking state and the associated static route states to UP.
RTR1#show track
TRACK Id: 1
IP SLA 1 reachability
Reachability is UP
10 changes, last change : 2019 Mar 14 14:56:32
 
RTR1#show ip route track-table
ip route 3.3.3.0 255.255.255.0 2.2.2.2 track 1 state is [up]
ip route 6.6.6.0 255.255.255.0 2.2.2.2 track 1 state is [up]
 
RTR1#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
C 1.1.1.0/24 is directly connected, xe1, 00:57:39
C 2.2.2.0/24 is directly connected, ce52, 00:57:38
S 3.3.3.0/24 [1/0] via 2.2.2.2, ce52, 00:00:11
C 4.4.4.0/24 is directly connected, xe45, 00:51:50
S 5.5.5.0/24 [1/0] via 4.4.4.2, xe45, 00:10:12
S 6.6.6.0/24 [1/0] via 2.2.2.2, ce52, 00:00:11
C 127.0.0.0/8 is directly connected, lo, 6d23h26m
 
RTR1#show ip route database
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
> - selected route, * - FIB route, p - stale info
 
IP Route Table for VRF "default"
C *> 1.1.1.0/24 is directly connected, xe1, 01:14:49
C *> 2.2.2.0/24 is directly connected, ce52, 01:14:48
S *> 3.3.3.0/24 [1/0] via 2.2.2.2, ce52, 00:17:21
C *> 4.4.4.0/24 is directly connected, xe45, 01:09:00
S *> 5.5.5.0/24 [1/0] via 4.4.4.2, xe45, 00:27:22
S *> 6.6.6.0/24 [1/0] via 2.2.2.2, ce52, 00:17:21
S 6.6.6.0/24 [10/0] via 4.4.4.2, xe45, 00:17:25
C *> 127.0.0.0/8 is directly connected, lo, 6d23h43m
IPv6 Configuration
The following configuration commands provide an illustrative example of setting up various network parameters on the routers (RTR1, RTR2, RTR3, and RTR4). These commands showcase the configuration of IPv6 addresses, the implementation of IP SLA for network monitoring, the establishment of static routes, and the use of time ranges. Each command serves a specific purpose in configuring and fine-tuning the router's behavior within the network. This example demonstrates a basic network setup with key components for efficient network management and monitoring.
RTR1
 
RTR1#configure terminal
Enter Configure mode.
RTR1(config)#interface ce52
Enter interface mode.
RTR1(config-if)#ip address 1000::1/64
Configure IPv6 address.
RTR1(config-if)#exit
Exit interface mode.
RTR1(config)#interface xe45
Enter interface mode.
RTR1(config-if)#ip address 4000::2/64
Configure IPv6 address.
RTR1(config-if)#exit
Exit interface mode.
RTR1(config)#ip sla 1
Configure IP SLA with a unique number.
RTR1(config-ip-sla)#icmp-echo ipv6 2000::1 source-interface ce52
Configure the ICMP-echo using destination IPv6 address and source interface name.
RTR1(config-ip-sla-echo)#threshold 1000
Configure the threshold value.
RTR1(config-ip-sla-echo)#timeout 1000
Configure the timeout value.
RTR1(config-ip-sla-echo)#frequency 5
Configure the frequency value.
RTR1(config-ip-sla-echo)#exit
Exit IP SLA echo mode.
RTR1(config-ip-sla)#exit
Exit IP SLA mode.
RTR1(config)#time-range tr1
Configure a time-range.
RTR1(config-tr)#start-time 11:22 3 july 2021
Configure a start-time.
RTR1(config-tr)#end-time after 200
Configure end-time.
RTR1(config-tr)#exit
Exit time-range mode.
RTR1(config)#ip sla schedule 1 time-range tr1
Schedule an IP SLA measurement.
RTR1(config)#track 1 ip sla 1 reachability
Configure the track ID for IP SLA.
RTR1(config-object-track)#exit
Configure object track mode.
RTR1(config)#ipv6 route 3000::0/64 1000::2 track 1
Configure the static route with the nexthop address.
RTR1(config)#ipv6 route 3333::1/128 1000::2 track 1
Configure the static route with the nexthop address and track ID.
RTR1(config)#ipv6 route 3333::1/128 1000::2 10
Configure the static route with the nexthop address and delay.
RTR1(config)#commit
Commit the candidate configuration to the running configuration
RTR1(config)#exit
Exit configure mode
RTR2
 
RTR2#configure terminal
Enter configure mode.
RTR2(config)#interface ce50
Enter interface mode.
RTR2(config-if)#ipv6 address 1000::2/64
Configure IPv6 address.
RTR2(config-if)#exit
Exit interface mode.
RTR2(config)#interface ce52
Enter interface mode.
RTR2(config-if)#ipv6 address 2000::1/64
Configure IPv6 address.
RTR2(config-if)#exit
Exit interface mode.
RTR2(config)#ipv6 route 3000::0/64 2000::2
Configure the static route with the nexthop address.
RTR2(config)#commit
Commit the candidate configuration to the running configuration.
RTR2(config)#exit
Exit configure mode.
RTR3
 
RTR3#configure terminal
Enter configure mode.
RTR3(config)#interface xe7
Enter interface mode.
RTR3(config-if)#ipv6 address 2000::2/64
Configure IPv6 address.
RTR3(config-if)#exit
Exit interface mode.
RTR3(config)#interface xe14
Enter interface mode.
RTR3(config-if)#ipv6 address 3000::1/64
Configure IPv6 address.
RTR3(config-if)#commit
Commit the candidate configuration to the running configuration.
RTR3(config-if)#exit
Exit interface mode.
RTR3(config)#ipv6 route 4000::0/64 3000::2
Configure the static route with the nexthop address.
RTR3(config)#ipv6 route 1000::0/64 2000::1
Configure the static route with the nexthop address.
RTR3(config)#commit
Commit the candidate configuration to the running configuration.
RTR3(config)#exit
Exit configure mode.
RTR4
 
RTR4#configure terminal
Enter configure mode.
RTR4(config)#interface ce0
Enter interface mode.
RTR4(config-if)#ipv6 address 3000::2/64
Configure IPv6 address.
RTR4(config-if)#exit
Exit interface mode.
RTR4(config)#interface xe1
Enter interface mode.
RTR4(config-if)#ipv6 address 4000::1/64
Configure IPv6 address.
RTR4(config-if)#exit
Exit interface mode.
RTR4(config)#interface xe7
Enter interface mode.
RTR4(config-if)#ipv6 address 5000::2/64
Configure IPv6 address.
RTR4(config-if)#commit
Commit the candidate configuration to the running configuration.
RTR4(config-if)#exit
Exit interface mode.
RTR4(config)#ipv6 route 1000::0/64 4000::2
Configure the static route with the nexthop address.
RTR4(config)#ipv6 route 2000::0/64 3000::1
Configure the static route with the nexthop address.
RTR4(config)#commit
Commit the candidate configuration to the running configuration.
RTR4(config)#exit
Exit configure mode.
Validation
RTR1
Below is the routing and tracking information for RTR1, which includes details about its IP SLA reachability tracking and static routes.
RTR1#sh track
TRACK Id: 1
IP SLA 1 reachability
Reachability is UP
4 changes, last change : 2019 Mar 14 14:53:47
 
RTR1#sh ip route track-table
ipv6 route 3000::0/64 1000::2 track 1 state is [up]
ipv6 route 3333::1/128 1000::2 track 1 state is [up]
 
RTR1#sh ip sla summary
IP SLA Operation Summary
Codes: * active, ^ inactive
 
ID Type Destination Stats Return Last
(usec) Code Run
-------------------------------------------------------------------
*1 icmp-echo 2000::2 16000 OK 2019 Mar 11 1
6:11:40
-------------------------------------------------------------------
 
RTR1#sh ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
C 1000::/64 via ::, ce52, 00:00:15
C 4000::/64 via ::, ce0, 00:00:15
S 2000::/64 [1/0] via 1000::2, ce52, 00:00:15
S 3333::1/128 [1/0] via 1000::2, ce52, 00:00:15
 
Gateway of last resort is not set