4.4 Configure and verify IP SLA

ENCOR 350-401 v1.2 · 4.0 Network Assurance

IP SLA makes a router send test traffic itself (pings, UDP jitter probes, HTTP or DNS requests) and measure the answer: reachability, round-trip time, loss and jitter. Its real power is the link to object tracking: a static route, an HSRP priority or a policy can depend on whether a probe through the path still succeeds, so failover happens when the ISP fails, not only when the cable does.

What you must know

Probes

Each IP SLA operation has a type and a target. icmp-echo needs nothing on the far end. udp-jitter measures delay, jitter and loss in each direction for voice and needs ip sla responder on a Cisco device at the far end. Others include udp-echo, tcp-connect, http and dns.

ip sla 1
 icmp-echo 192.0.2.53 source-interface GigabitEthernet0/0
 frequency 10
 timeout 2000
 threshold 1000
ip sla schedule 1 life forever start-time now

Tracking and failover

A track object turns the probe's result into up or down. reachability is up while the probe gets answers (even slow ones); state is up only while the return code is OK, so an answer above the threshold counts as down. Add delay so a single lost ping does not move traffic.

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 198.51.100.1 5
ip route 192.0.2.53 255.255.255.255 203.0.113.1

While the target answers through ISP A (1), the tracked route is in the table. When ISP A's network fails, the probe times out, track 1 goes down after the delay, the tracked route is removed and traffic takes the AD 5 route to ISP B (2). The host route keeps the probe itself on ISP A, so it notices when ISP A recovers.

The same track object can drive HSRP (standby 1 track 1 decrement 20), so a distribution switch whose upstream path fails hands the gateway role to its peer.

Commands

show ip sla configuration 1The operation's type, target, frequency, timeout and threshold.
show ip sla statistics 1The latest result: return code (OK, Timeout, Over threshold), RTT and success and failure counts.
show track 1The track's state, how many times it changed, and which routes or groups use it.
show ip route staticWhether the tracked route or the floating route is installed.
ip sla responderOn the far device: answers udp-jitter and similar probes.

Exam traps

Check yourself

You configured ip sla 1 but show ip sla statistics shows no results. What is missing?
ip sla schedule 1 life forever start-time now.
Why add a host route for the probe target via ISP A?
So the probe always tests ISP A. Otherwise, once the default route moves to ISP B, the probe succeeds through ISP B and the primary route comes back while ISP A is still down.
Which tracking type counts a slow (over-threshold) answer as down?
track … ip sla … state.
Which probe type needs a responder on the far end?
udp-jitter (and other UDP operations to Cisco targets): ip sla responder on that device.

Labs

Try it live: HSRPv2 with object tracking and IP SLA

More topics in 4.0 Network Assurance