Skip to content
Study CCNP

Configure And Verify

4.4 Configure and verify IPSLA

3 min read ENCOR 350-401 v1.2

Aligned to Cisco's 350-401 ENCOR v1.2 exam topics.

On this page

IP SLA lets a Cisco device test the network on purpose.

A user ping tells you what happened once from a user device. IP SLA can test every few seconds from a router or switch, record statistics, and trigger tracking. That makes it useful for reachability monitoring, WAN failover, voice-quality testing, and service-level checks.

The core idea

An IP SLA operation has three parts:

Operation = what probe to send
Schedule = when to run it
Tracking = optional object that turns result into up/down state

The probe source matters. A test sourced from the wrong interface can prove the router can reach the target while proving nothing about the path the protected traffic actually uses. In failover labs, source the operation from the same interface, VRF, or address family that makes the decision meaningful.

The most common ENCOR examples are ICMP echo and UDP jitter.

ICMP echo operation

This operation sends ping-like probes to a target.

conf t
ip sla 10
 icmp-echo 10.10.20.1 source-interface Loopback0
 frequency 5
 ip sla schedule 10 life forever start-time now
 end

Verify:

show ip sla configuration 10
show ip sla statistics 10

Example output shape:

Latest RTT: 4 milliseconds
Latest operation start time: 12:15:04 UTC
Latest operation return code: OK
Number of successes: 44
Number of failures: 0

Use tracking for route failover

IP SLA becomes more powerful when paired with object tracking.

conf t
ip sla 10
 icmp-echo 198.51.100.1 source-interface GigabitEthernet0/0
 frequency 5
 ip sla schedule 10 life forever start-time now
!
track 10 ip sla 10 reachability
delay down 15 up 30
!
ip route 0.0.0.0 0.0.0.0 198.51.100.1 track 10
ip route 0.0.0.0 0.0.0.0 203.0.113.1 250
end

This configuration says:

  • Use the primary default route only while track object 10 is up.
  • Track object 10 depends on IP SLA operation 10.
  • If the probe fails, the primary route is removed.
  • The floating static route with administrative distance 250 becomes the backup.
  • The delay dampens route flapping so one bad probe does not immediately churn the default route.

Verify:

show track 10
show ip route static
show ip sla statistics 10

If the static route does not withdraw, check the track object first. If the track object is stuck up, the routing table is doing exactly what you configured.

UDP jitter operation

UDP jitter is useful for voice and real-time traffic because it measures delay variation and packet loss.

On the destination device, enable the responder when required.

conf t
ip sla responder
end

On the source device:

conf t
ip sla 20
 udp-jitter 10.10.20.2 16384 source-ip 10.10.10.1 codec g711ulaw
 frequency 30
 ip sla schedule 20 life forever start-time now
 end

Verify:

show ip sla statistics 20
show ip sla statistics 20 details

Focus on:

  • Round-trip time.
  • Jitter source-to-destination and destination-to-source.
  • Packet loss.
  • Return code.

Thresholds and reaction logic

IP SLA can measure. Tracking can turn measurements into state. Routing, HSRP, EEM, or other features can react to that state.

Keep the chain straight:

IP SLA operation
track object -> routing or policy action

A common mistake is configuring IP SLA and expecting routing to change automatically. It will not, unless you connect it to tracking or another reaction mechanism.

Lab: Static route failover with IP SLA

Topology

ISP1 · 198.51.100.1
R1
ISP2 · 203.0.113.1

Goal

Use ISP1 as the primary default route. Fail over to ISP2 when an IP SLA probe to ISP1 fails.

Configuration

conf t
interface GigabitEthernet0/0
 description ISP1
 ip address 198.51.100.2 255.255.255.252
!
interface GigabitEthernet0/1
 description ISP2
 ip address 203.0.113.2 255.255.255.252
!
ip sla 10
 icmp-echo 198.51.100.1 source-interface GigabitEthernet0/0
 frequency 5
 ip sla schedule 10 life forever start-time now
!
track 10 ip sla 10 reachability
delay down 10 up 5
!
ip route 0.0.0.0 0.0.0.0 198.51.100.1 track 10
ip route 0.0.0.0 0.0.0.0 203.0.113.1 250
end

Verification before failure

show ip sla statistics 10
show track 10
show ip route 0.0.0.0

Expected:

Track 10
IP SLA 10 reachability
 Reachability is Up
 S* 0.0.0.0/0 1/0 via 198.51.100.1

Simulate failure

Shut the ISP1 next-hop interface in the lab or block ICMP to 198.51.100.1. Then check again.

show track 10
show ip route 0.0.0.0

Expected:

Track 10
IP SLA 10 reachability
 Reachability is Down
 S* 0.0.0.0/0 250/0 via 203.0.113.1

Restore service

Bring ISP1 back and verify the primary route returns after the delay up timer.

Troubleshooting checklist

If tracking never comes up:

  • Can the source interface reach the target?
  • Is the target replying to ICMP or the selected probe?
  • Is the IP SLA scheduled?
  • Is the operation number correct in the track object?

If routing does not change:

  • Is the static route tied to the track object?
  • Is the backup route present with a higher administrative distance?
  • Is another route overriding the default route?

Exam takeaways

  • IP SLA measures synthetic probes.
  • ip sla schedule is required to run the operation.
  • Tracking connects probe state to routing or policy.
  • ICMP echo is common for reachability.
  • UDP jitter is useful for delay, jitter, and loss.