Octet

What is IP SLA, and how do you use it to fail over a default route?

Show the answer

Say this first

IP SLA is Cisco's built-in probe engine. The router sends synthetic traffic on a schedule (ICMP echo, UDP jitter, TCP connect, HTTP, DNS and more) and records reachability, latency, jitter and loss. Paired with object tracking it drives decisions: a track object follows the probe result, a static route tied to that track is withdrawn when the probe fails, and a floating static route to a backup ISP takes over.

Go deeper

Configuration

Cisco IOS
ip sla 1
 icmp-echo 198.51.100.200 source-interface GigabitEthernet0/0/0
 timeout 2000
 threshold 1000
 frequency 10
ip sla schedule 1 life forever start-time now
!
track 1 ip sla 1 reachability
 delay down 10 up 30
!
ip route 0.0.0.0 0.0.0.0 203.0.113.1 track 1
ip route 0.0.0.0 0.0.0.0 192.0.2.9 250
ip route 198.51.100.200 255.255.255.255 203.0.113.1
  • The probe target 198.51.100.200 sits beyond ISP1's first hop. ISP1's router at 203.0.113.1 can answer while its upstream is broken.
  • timeout and threshold are in milliseconds, frequency in seconds. The defaults are 5000 ms, 5000 ms and 60 seconds.
  • delay down 10 up 30 stops a flapping path from flapping the route.
  • The host route keeps the probe on ISP1. Without it, after failover the probe would follow the backup default, succeed, and bring the primary route back: a loop of flaps.
  • The backup default to ISP2 (192.0.2.9) has distance 250, so it only installs when the tracked route is gone.

Other probes

udp-jitter measures one-way jitter, loss and latency for voice and needs ip sla responder on the far Cisco device. With a codec option it also estimates a MOS score.

Verify

show ip sla statistics 1, show track 1, show ip route static. On Junos the equivalent is RPM (real-time performance monitoring) probes with ip-monitoring.

Traps

  • Forgetting ip sla schedule. Without it the probe is defined but never runs.
  • Probing the ISP next hop on the directly connected link.
How did you do?Book 3.4 Routing