Cisco IP SLA for failover

AID: 194
  • Status: Published

5310 points

  • Bywingatesl
  • TypeGeneral
  • Posted on2008-11-20 at 17:14:08
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 4.2.2.2  < 4.2.2.2 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 0.0.0.0 0.0.0.0 1.1.1.1

and then put it back with the tracking

ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 1  

Then we need to add our secondary route

ip route 0.0.0.0 0.0.0.0 1.1.1.2 10 <we set this route with a higher metric than the tracked route>

Now when the ping to 4.2.2.2 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

http://www.cisco.com/en/US/products/ps6350/products_configuration_guide_chapter09186a0080441845.html  

 

Asked On
2008-11-20 at 17:14:08ID194
Tags

Cisco

,

Dual

,

ISP

Topic

Network Routers

Views
4518

Comments

Expert Comment

by: DevilWAH on 2009-08-05 at 10:56:11ID: 2527

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 4.2.2.2!!! 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 4.2.2.2 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!

Author Comment

by: wingatesl on 2009-08-05 at 11:00:42ID: 2528

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

Add your Comment

Please Sign up or Log in to comment on this article.

Join Experts Exchange Today

Gain Access to all our Tech Resources

Get personalized answers

Ask unlimited questions

Access Proven Solutions

Search 3.2 million solutions

Read In-Depth How-To Guides

1000+ articles, demos, & tips

Watch Step by Step Tutorials

Learn direct from top tech pros

And Much More!

Your complete tech resource

See Plans and Pricing

30-day free trial. Register in 60 seconds.

Loading Advertisement...

Top Routers Experts

  1. nazsky

    155,823

    Guru

    0 points yesterday

    Profile
    Rank: Wizard
  2. donjohnston

    86,006

    Master

    1,336 points yesterday

    Profile
    Rank: Genius
  3. mat1458

    60,486

    Master

    0 points yesterday

    Profile
    Rank: Master
  4. Soulja

    60,398

    Master

    0 points yesterday

    Profile
    Rank: Genius
  5. erniebeek

    59,140

    Master

    0 points yesterday

    Profile
    Rank: Genius
  6. Darr247

    57,778

    Master

    0 points yesterday

    Profile
    Rank: Genius
  7. giltjr

    55,813

    Master

    0 points yesterday

    Profile
    Rank: Genius
  8. fgasimzade

    45,402

    0 points yesterday

    Profile
    Rank: Wizard
  9. TimotiSt

    35,398

    0 points yesterday

    Profile
    Rank: Master
  10. craigbeck

    35,011

    0 points yesterday

    Profile
    Rank: Sage
  11. lrmoore

    34,850

    0 points yesterday

    Profile
    Rank: Savant
  12. eeRoot

    34,782

    0 points yesterday

    Profile
    Rank: Wizard
  13. Syed_M_Usman

    29,786

    0 points yesterday

    Profile
    Rank: Wizard
  14. mattvmotas

    28,979

    0 points yesterday

    Profile
    Rank: Sage
  15. fmarshall

    27,995

    10 points yesterday

    Profile
    Rank: Wizard
  16. thinkpads_user

    24,468

    0 points yesterday

    Profile
    Rank: Genius
  17. harbor235

    24,400

    0 points yesterday

    Profile
    Rank: Genius
  18. Kvistofta

    24,218

    0 points yesterday

    Profile
    Rank: Sage
  19. ArneLovius

    23,976

    0 points yesterday

    Profile
    Rank: Wizard
  20. lruiz52

    22,801

    300 points yesterday

    Profile
    Rank: Guru
  21. jodylemoine

    21,900

    0 points yesterday

    Profile
    Rank: Sage
  22. rigan123

    21,548

    0 points yesterday

    Profile
    Rank: Guru
  23. ikalmar

    21,466

    0 points yesterday

    Profile
    Rank: Genius
  24. The_Warlock

    20,568

    0 points yesterday

    Profile
    Rank: Wizard
  25. getzjd

    20,368

    800 points yesterday

    Profile
    Rank: Wizard

Hall Of Fame