IP SLA Static Route

Goal : When primary-link unreachable, secondary link will take over automatically. Use static route as routing protocol with track object & IP SLA.

IP SLA can be used for many operations; ICMP echo, HTTP operation, DNS query and many more, and it will give us some informations about those services, and also help us to analyze & make sure the SLA.  How do we know service provider guarantee their links with SLA 99.9 % ?? IP SLA can help us to make sure the service operation works properly. For example we can make IP SLA to generate ICMP echo ping to gateway provider every ‘x’ second. and IP SLA will give us a report.

For this lab, I had combined IP SLA with track object, and use this to static route. When we use static route track object with IP SLA, it will help network admin to detect whether next-hop primary link address is reachable or not by generated ICMP echo ping to destination & automagically switch to secondary link if primary link address is unreachable.


Normal static route configuration in R1

ip route

ip route 10

With this configuration if the next-hop primary ip-address has failed, administrator need to configure manually to switch to secondary link by change the distance.


Note : this lab is use GNS3 with IOS image 3700 Software (C3745-ADVENTERPRISEK9-M), Version 12.4(25), RELEASE SOFTWARE (fc2)


Configuration : (All configuration is done in R1) 


First, lets configure IP SLA instance.

 ip sla monitor 1

 type echo protocol ipIcmpEcho source-interface Loopback0

 frequency 5


ip sla monitor schedule 1 life forever start-time now

Secondly, I have created  tracking object number 100, combined with ip sla monitor 1, don’t forget to add ‘reachability’ command.

track 100 rtr 1 reachability

and the last, we use those track object in our static route & put the track object 100 to primary route, When the track object detect ip sla monitor down, it will not install primary route

ip route track 100

ip route 10


Verify :


-          show ip sla monitor configuration

show ip sla monitor config


-          show ip sla monitor statistic

show ip sla monitor statistic


-          show track

show track


-          show ip route

show ip route

As you can see in the topology picture, to go to network via primary link with next-hop


-          ping to from source lo0

When ping is running, I had shutdown the fa0/1 interface in R2, to see if the configuration is works. And you can see a couples timeout and also you have noticed tracking state log is changed from up->down,and then ping is back running again.


-          show ip route & show track

From here we can confirm the configuration is works by look at ‘show ip route’ & ‘show track command. The route has changed to secondary link, without network administrator intervention.