Troubleshooting notes · Routing

IP SLA and object tracking: the backup route never takes over

The primary ISP failed upstream, the link stayed up, and the backup default route never took over. Three common mistakes: an IP SLA that was never scheduled, a backup route with the same distance, and a probe that only tests the next hop. Real output from Cisco IOS XE 17.18.

The symptom

ISP-A had an outage in its core. The link to ISP-A stayed up, nothing got through, and the router didn't switch to ISP-B. On normal days, part of the traffic also leaks out through ISP-B.

Mistake 1: the IP SLA operation never runs

R1# show ip sla configuration 1
Type of operation to perform: icmp-echo
Target address/Source interface: 10.0.12.2/Ethernet0/0
   Operation frequency (seconds): 5  (not considered if randomly scheduled)
   Next Scheduled Start Time: Pending trigger
   Status of entry (SNMP RowStatus): notInService

R1# show ip sla statistics 1
Number of successes: Unknown
Number of failures: Unknown

R1# show track 1
Track 1
  IP SLA 1 reachability
  Reachability is Down
  Latest operation return code: Unknown
  Tracked by:
    Static IP Routing 0

R1# show ip route 0.0.0.0
  Known via "static", distance 1, metric 0, candidate default path
  * 10.0.13.3

Pending trigger and notInService mean the operation was configured but never scheduled. The track object stays Down, so the tracked primary route is never installed, and all traffic uses the backup.

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

Mistake 2: the backup isn't a floating route

(after fix 1)
R1# show track 1
  Reachability is Up
  Latest operation return code: OK
R1# show ip route 0.0.0.0
  Known via "static", distance 1, metric 0, candidate default path
  * 10.0.13.3
      Route metric is 0, traffic share count is 1
    10.0.12.2
      Route metric is 0, traffic share count is 1

Both default routes have administrative distance 1, so the router load-shares over both ISPs. A backup route needs a higher distance than the primary:

R1(config)# no ip route 0.0.0.0 0.0.0.0 10.0.13.3
R1(config)# ip route 0.0.0.0 0.0.0.0 10.0.13.3 10

Mistake 3: the probe only tests the next hop

(after fix 2; R4 Ethernet0/0 shut to simulate the outage)
R1# show track 1
  Reachability is Up
  Latest operation return code: OK
R1# show ip route 0.0.0.0
  Known via "static", distance 1, metric 0, candidate default path
  * 10.0.12.2
R1# ping 198.51.100.1 source lo0
Success rate is 0 percent (0/5)

R1(config)# ip sla 1
R1(config-ip-sla)# icmp-echo 198.51.100.1 source-interface Ethernet0/0
Entry already running and cannot be modified

The probe pings ISP-A's own address on the shared link. That address keeps answering while ISP-A's core is down, so the track stays Up and the dead route stays installed. Probe something beyond the ISP instead. Note the error: an IP SLA operation can't be edited while it's scheduled, so delete it and create it again (the track object keeps pointing at operation 1):

R1(config)# no ip sla 1
R1(config)# ip sla 1
R1(config-ip-sla)# icmp-echo 198.51.100.1 source-interface Ethernet0/0
R1(config-ip-sla-echo)# frequency 5
R1(config-ip-sla-echo)# exit
R1(config)# ip sla schedule 1 life forever start-time now

Check it

(outage: R4 Ethernet0/0 shut)
%TRACK-6-STATE: 1 ip sla 1 reachability Up -> Down
R1# show track 1
  Reachability is Down
  Latest operation return code: Timeout
R1# show ip route 0.0.0.0
  Known via "static", distance 10, metric 0, candidate default path
  * 10.0.13.3
R1# traceroute 198.51.100.1 source lo0 numeric
  1 10.0.13.3 1 msec 1 msec 1 msec
  2 10.0.34.4 1 msec *  2 msec

(R4 Ethernet0/0 back up)
%TRACK-6-STATE: 1 ip sla 1 reachability Down -> Up
R1# show ip route 0.0.0.0
  Known via "static", distance 1, metric 0, candidate default path
  * 10.0.12.2
R1# traceroute 198.51.100.1 source lo0 numeric
  1 10.0.12.2 4 msec 0 msec 1 msec
  2 10.0.24.4 1 msec *  3 msec

During the outage the track goes Down and the floating route (distance 10) through ISP-B takes over. When ISP-A recovers, the track goes Up again and the primary route returns.

Practise this fault

This fault is in ENCOR Lab 25 of ENCOR Core Labs: a ready-made GNS3 project where you find and fix it yourself, alongside the other faults in the ticket, with the tested solution.

Or start with 15 free labs (5 each from CCNA, ENARSI and ENCOR), by email:

We’ll email you the download links and occasional lab tips. Unsubscribe with one click, any time. Your address is never shared.