Cisco IP SLA Track Delay

Cisco IP SLA delay is an option that facilitates the failover and fallback of links when you have multiple of them. A common complaint among network engineers is that a primary link flaps up and down, and with it flaps the secondary links too.

In order to avoid flapping back and forth between the primary and the secondary links, and assuming there is Cisco IP SLA configuration with tracking (see a sample configuration for IP SLA tracking applied to Policy-based Routing), you can tell the IOS to wait a certail delay before declaring an tracked object officially down or up.

Cisco IP SLA delay configuration

The delay command is a subcommand of the track command. It is not a subcommand of the IP SLA as you might have thought. The syntax is as follow:

track {TRACKED-OBJ} ip sla {IP-SLA-OP} reachability

delay up {UP-DLY} down {DOWN-DLY}

Cisco IP SLA Tracking with Delay: example

Topology

This simple topology is enough to understand the concept of delay in IP SLA tracking. The topology consists of two routers R2 and R4.

cisco-ip-sla-track-delay-000714

R2 is configured with IP SLA operation number 1

cisco-ip-sla-track-delay-2

R2 IP SLA and tracking with delay configuration

ip sla 1
icmp-echo 192.168.100.5 source-interface FastEthernet0/0
frequency 10
ip sla schedule 1 life forever start-time now ageout 3600

!

track 11 ip sla 1 reachability
delay down 20 up 10

R2(config)#do sh ip sla config
IP SLAs Infrastructure Engine-III
Entry number: 1
Owner:
Tag:
Operation timeout (milliseconds): 5000
Type of operation to perform: icmp-echo
Target address/Source interface: 192.168.100.5/FastEthernet0/0
Type Of Service parameter: 0x0
Request size (ARR data portion): 28
Verify data: No
Vrf Name:
Schedule:
Operation frequency (seconds): 10 (not considered if randomly scheduled)
Next Scheduled Start Time: Start Time already passed
Group Scheduled : FALSE
Randomly Scheduled : FALSE
Life (seconds): Forever
Entry Ageout (seconds): 3600
Recurring (Starting Everyday): FALSE
Status of entry (SNMP RowStatus): Active
Threshold (milliseconds): 5000
Distribution Statistics:
Number of statistic hours kept: 2
Number of statistic distribution buckets kept: 1
Statistic distribution interval (milliseconds): 20
Enhanced History:
History Statistics:
Number of history Lives kept: 0
Number of history Buckets kept: 15
History Filter Type: None

We make sure that the IP SLA operation works correctly

R2#sh ip sla stat
IPSLAs Latest Operation Statistics

IPSLA operation id: 1
        Latest RTT: 51 milliseconds
Latest operation start time: 13:19:42 UTC Mon Nov 13 2017
Latest operation return code: OK
Number of successes: 9
Number of failures: 1
Operation time to live: Forever


R2#sh ip sla stat
IPSLAs Latest Operation Statistics

IPSLA operation id: 1
        Latest RTT: 19 milliseconds
Latest operation start time: 13:19:52 UTC Mon Nov 13 2017
Latest operation return code: OK
Number of successes: 10
Number of failures: 1
Operation time to live: Forever

and the track object is correctly set up with the delay feature:

R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Up
    1 change, last change 00:01:52
  Delay up 10 secs, down 20 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 20

Testing IP SLA and tracking with delay

Now we test the delay feature. We shut down the R4 interface that is being monitored by IP SLA. And we observe the tracked object:

R4(config)#interf f0/0
R4(config-if)#shut
R2#sh ip sla statistics 1
IPSLAs Latest Operation Statistics

IPSLA operation id: 1
        Latest RTT: 20 milliseconds
Latest operation start time: 13:21:42 UTC Mon Nov 13 2017
Latest operation return code: OK
Number of successes: 21
Number of failures: 1
Operation time to live: Forever


R2#sh ip sla statistics 1
IPSLAs Latest Operation Statistics

IPSLA operation id: 1
        Latest RTT: NoConnection/Busy/Timeout
Latest operation start time: 13:21:52 UTC Mon Nov 13 2017
Latest operation return code: Timeout
Number of successes: 21
Number of failures: 2
Operation time to live: Forever

The track object on R2 will remain in the up state. However, the delay counter for the down state fires up:

R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Up, delayed Down (18 secs remaining)
    3 changes, last change 00:00:36
  Delay up 10 secs, down 20 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 11
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Up, delayed Down (14 secs remaining)
    3 changes, last change 00:00:40
  Delay up 10 secs, down 20 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 11
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Up, delayed Down (9 secs remaining)
    3 changes, last change 00:00:45
  Delay up 10 secs, down 20 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 11
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Up, delayed Down (5 secs remaining)
    3 changes, last change 00:00:50
  Delay up 10 secs, down 20 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 11
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Up, delayed Down (3 secs remaining)
    3 changes, last change 00:00:51
  Delay up 10 secs, down 20 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 11
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Up, delayed Down (2 secs remaining)
    3 changes, last change 00:00:52
  Delay up 10 secs, down 20 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 11
R2#
*Nov 13 13:24:54.895: %OSPF-5-ADJCHG: Process 11, Nbr 192.168.100.5 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down
    4 changes, last change 00:00:01
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#
*Nov 13 13:24:58.347: %TRACK-6-STATE: 11 ip sla 1 reachability Up -> Down

It took 20 seconds for the Track object to be considered really down. And that is good, because in the real world the service provider link could flap for a couple of seconds and then stabilize itself again.


Let us see now the behaviour of the tracked object, when R4 interface reachability is restored.

R4(config)#interf f0/0
R4(config-if)#no shut
R2#
*Nov 13 13:25:50.903: %OSPF-5-ADJCHG: Process 11, Nbr 192.168.100.5 on FastEthernet0/0 from LOADING to FULL, Loading Done
R2#sh ip sla statistics 1
IPSLAs Latest Operation Statistics

IPSLA operation id: 1
        Latest RTT: 31 milliseconds
Latest operation start time: 13:25:52 UTC Mon Nov 13 2017
Latest operation return code: OK
Number of successes: 26
Number of failures: 21
Operation time to live: Forever


R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (9 secs remaining)
    4 changes, last change 00:00:55
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (7 secs remaining)
    4 changes, last change 00:00:57
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (6 secs remaining)
    4 changes, last change 00:00:58
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (5 secs remaining)
    4 changes, last change 00:00:59
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (4 secs remaining)
    4 changes, last change 00:01:00
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (3 secs remaining)
    4 changes, last change 00:01:01
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (2 secs remaining)
    4 changes, last change 00:01:02
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (1 sec remaining)
    4 changes, last change 00:01:03
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Down, delayed Up (1 sec remaining)
    4 changes, last change 00:01:04
  Delay up 10 secs, down 20 secs
  Latest operation return code: Timeout
R2#sh track 11
Track 11
  IP SLA 1 reachability
  Reachability is Up
    5 changes, last change 00:00:00
  Delay up 10 secs, down 20 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 7
R2#
R2#
*Nov 13 13:26:03.359: %TRACK-6-STATE: 11 ip sla 1 reachability Down -> Up
R2#

It took 10 seconds of delay before the tracked object state is considered officially UP.

Top Courses in IT & Software 300x250

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Adsense black background: