[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


Cisco IP SLA for failover

Published on
15,892 Points
3 Endorsements
Last Modified:
While it is possible to put two routes in place with the secondary having a higher metric, this may not always work. In the event of a failure that does not bring down the physical interface on the router the primary route is not removed. There is also the situation where the primary interface takes too long to change status. The way around these limitations is simple; IP SLA

Here's how to do it

ip sla 1   < The number 1 here is arbitrary, used only to identify this sla. It is otherwise knows as the operation number>

icmp-echo  < is a DNS server that responds to pings out on the internet>

timeout 500  < This is how long to wait for a response from the ping>

frequency 3 < This is the repeat rate for the SLA>

ip sla schedule 1 start-time now life forever < This command says  "start SLA 1 now and keep it running forever>

track 1 rtr 1 reachability   < This comand creates the track object "1" and monitors the SLA 1>

now for the routing, we need to change the default route and associate it with the tracker

no ip route

and then put it back with the tracking

ip route track 1  

Then we need to add our secondary route

ip route 10

Now when the ping to fails the primary route is removed and the secondary route with the higher metric becomes the default. The route will be reinstated when the connectivity is restored.

With the 12.4 and higher releases the commands have changed slightly but the "?" is your friend. If I receive requests for the syntax I will post it as well, but it is pretty easy to convert.

Here is the reference to the Cisco IP SLA documentation


LVL 16

Expert Comment

by:Aaron Street
If you have HSRP set up for not only route redundancy, but also router redundancy.

You can use the same IP SLA commands, to set up a tracking object that HSRP can be set to monitor.

Like wingatesl says normally you can only see if links are up that are directly connected. the IP SLA gives you a way to test the entire link end to end.

however one thing to be careful of!! when the second route becomes active, the IP SLA will be able to see!!! so will straight away reinstate the primary link as you have restored connectivity via the back up route!

to get around this you need to add a static route for to force it to always use the primary router.. or insure the IPS SLA traffic is only sent to the primary route. if not you can end up with links flapping!

LVL 15

Author Comment

YOu also need to set the routes as permanent to ensure a link failure does not remove them.

Expert Comment

To overcome the link flapping, because you can reach after your link is restored over the next link, you can use "source-interface" command:

icmp-echo source-interface INTERFACE

Open in new window


Featured Post

Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Join & Write a Comment

After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month