IP SLA - Routing & Tracking
What is IP SLA?
IP SLA (Service Level Agreement) is a feature in Cisco networking devices that allows us to monitor the status of specific network operations or parameters and use the results of these operations to track the availability or reachability of a target.
Topology
Here’s the topology of this lab, where XE1 has a default static to 8.8.8.8 going through XE2 (98.0.0.2)
And if we try going to 8.8.8.8 from XE4, it will use the route to XE2
The plan is to put a tracker on 98.0.0.2, and if the connection is down we reroute the traffic to XE3 (99.0.0.3)
Configuring IP SLA on XE1
First we create the IP SLA instance
1
2
3
4
5
ip sla 1
icmp-echo 98.0.0.2 source-ip 98.0.0.1
timeout 1000
frequency 4
ip sla schedule 1 life forever start-time now
- icmp-echo meaning we use ping as a method to check connection availability
- timeout (miliseconds) is sets the amount of time an IP SLAs operation waits for a response from its request packet.
- frequency (seconds) is sets the rate at which a specified IP SLAs operation repeats.
- ip sla schedule 1 life forever start-time now meaning this will run indefinely and starts immidiately
Next we configure the tracking
1
track 1 ip sla 1 reachability
And then we put the track on the IP Route rule going to 8.8.8.8
1
ip route 8.8.8.8 255.255.255.255 98.0.0.2 track 1
This configuration meaning this ip route will be used so long the tracking to 98.0.0.2 is up, otherwise this ip route will be dropped
We need to add another route for when the primary route is down
1
ip route 8.8.8.8 255.255.255.255 99.0.0.3 2
This route has a higher administrative distance (AD) of 2, meaning it wont be used so long the one with lower AD is present.
Validating IP SLA Configuration
Running “show ip sla configuration” shows the config that we have applied
Runnig “show track” shows the reachability of the tracked target
Testing IP SLA Configuration
Now if we shutdown the XE2, we should see our track detecting its reachability becoming down
And checking on the ip route, it now uses the route going through XE3
And testing it from XE4 shows that it indeed goes through the secondary route