# Reliable Static Routing with IP SLA

**URL:** <https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011>\
**Category:** Lessons Discussion\
**Created:** [December 26, 2016, 6:07pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011 "2016-12-26T18:07:32Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![johnfrades](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/j/e0b2c6/32.png) [@johnfrades](https://forum.networklessons.com/u/johnfrades)\
**Post date:** [July 27, 2015, 8:01pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/21 "2015-07-27T20:01:38Z")

</div>

awesome, it works. thanks!

---

<div class="post-metadata">

**Author:** ![willniceman](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/w/ec9cab/32.png) [@willniceman](https://forum.networklessons.com/u/willniceman)\
**Post date:** [September 15, 2015, 12:34am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/22 "2015-09-15T00:34:43Z")

</div>

Hi Rene,  
Is there a way to delay fail-back for more than 30 minutes or some timer to Primary ISP to avoid flapping connections? Or anyway to make it NO FAIL BACK like config?

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [September 24, 2015, 10:05pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/23 "2015-09-24T22:05:03Z")

</div>

Hi Will,

The “track” command has a delay option but it has a maximum of 180 seconds. I think if you want to delay it for 30 minutes that your best bet is a simple script created with EEM.

Rene

---

<div class="post-metadata">

**Author:** ![sahari6767](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@sahari6767](https://forum.networklessons.com/u/sahari6767)\
**Post date:** [January 25, 2016, 6:18am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/24 "2016-01-25T06:18:35Z")

</div>

Hi rene,

From your experience when you use bfd protocol over ip-sla and the opposite?

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [January 25, 2016, 7:58pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/25 "2016-01-25T19:58:19Z")

</div>

Hi Sahar,

BFD is useful for local networks where you use protocols like OSPF or EIGRP. IP SLA is more useful for WAN connections, you can use it to check if your Internet connection is operational.

Rene

---

<div class="post-metadata">

**Author:** ![abuidiris01](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/a/77aa72/32.png) [@abuidiris01](https://forum.networklessons.com/u/abuidiris01)\
**Post date:** [March 28, 2016, 10:37am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/26 "2016-03-28T10:37:19Z")

</div>

Hi rene,

sla configure does not accept "timeout 100 ". It shows error "timeout is less than treshold 5000.

Thanks

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [March 28, 2016, 11:30am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/27 "2016-03-28T11:30:01Z")

</div>

You should configure the threshold first before setting the timeout.

---

<div class="post-metadata">

**Author:** ![srinivas2324](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/779978/32.png) [@srinivas2324](https://forum.networklessons.com/u/srinivas2324)\
**Post date:** [May 27, 2016, 4:15pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/28 "2016-05-27T16:15:08Z")

</div>

Hello,

1)Getting following error when defining timeout:  
%Error: timeout value is less than threshold 5000

So the threshold and timeout should be same as follows:

```auto
R1(config-ip-sla-echo)#threshold 300
R1(config-ip-sla-echo)#timeout 300

```

2)Configure Tracking Object.

track 1 rtr 1 ------ Don’t accept  
R1(config)#track 1 ip sla 1 reachability ---- works

---

<div class="post-metadata">

**Author:** ![Fabian\_Martinez1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/f/8797f3/32.png) [@Fabian\_Martinez1](https://forum.networklessons.com/u/Fabian_Martinez1)\
**Post date:** [September 13, 2016, 12:52am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/29 "2016-09-13T00:52:50Z")

</div>

Hello,

I need some advice here. In my lab I have 2 Ibgp routers going to the make believe web, I have 1 being prefered over the the other. My core isn’t participating in bgp, so Im trying to dynamically fail over when my primary goes down. the issue im running into is that when I bring up the primary router the default route isn’t pointing to the primary but staying on the secondary.In other words not failing over back to the primary. Is this a good method for this situation?

Here’s the config:

```
ip sla monitor 2
 type echo protocol ipIcmpEcho 8.8.8.8 source-ipaddr 208.1.1.2
 frequency 10
ip sla monitor schedule 2 life forever start-time now

core1#sh run | sec track
track 1 rtr 2
ip route 0.0.0.0 0.0.0.0 208.1.1.1 track 2

```

Thanks

---

<div class="post-metadata">

**Author:** ![andrew](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/andrew/32/645_2.png) [@andrew](https://forum.networklessons.com/u/andrew)\
**Post date:** [September 13, 2016, 11:06pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/30 "2016-09-13T23:06:02Z")

</div>

Fabian,  
It generally looks like you have the right idea, but if I am understanding your situation, you are also going to need a what is called a floating static route using a higher administrative distance. So general terms, this is how it works:

For your primary ISP, create a static default route which references a track object. It looks like you have done this.

For your secondary ISP, create a static default route, but define the administrative distance as being something higher than default (1). It would look like this:

ip route 0.0.0.0 0.0.0.0 \<secondary gateway ip\> 2

The number “2” above is defining the administrative distance. What will happen is that when your track object fails, the primary default route will be withdrawn, but unless you have a floating static route, nothing will replace it. By doing that second ip route statement, that route will only pop in after your primary route drops out because of the tracked object failure.

---

<div class="post-metadata">

**Author:** ![Fabian\_Martinez1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/f/8797f3/32.png) [@Fabian\_Martinez1](https://forum.networklessons.com/u/Fabian_Martinez1)\
**Post date:** [September 14, 2016, 6:42am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/31 "2016-09-14T06:42:34Z")

</div>

Hi Andrew,

Thanks for your reply. I added my floating route like below:

```auto
core1#sh run | i ip route
ip route 0.0.0.0 0.0.0.0 208.1.1.1 track 2
ip route 0.0.0.0 0.0.0.0 208.1.1.3 250

```

now I’m seeing some peculiar things, when i shut down the primary router’s interface, my default route from isp is pointing to back up router. But when i bring up the primary, the back router points to the primary but my core is still pointing to my secondary router. Im going to try tracking another ip and see what happens.

I’ll let you know what I see.

---

<div class="post-metadata">

**Author:** ![rafael.tirado2](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/r/e274bd/32.png) [@rafael.tirado2](https://forum.networklessons.com/u/rafael.tirado2)\
**Post date:** [December 2, 2016, 9:51am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/32 "2016-12-02T09:51:55Z")

</div>

Isnt this the same as hsrp? Im not understanding the difference and the actual application of these two seem the same.

---

<div class="post-metadata">

**Author:** ![andrew](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/andrew/32/645_2.png) [@andrew](https://forum.networklessons.com/u/andrew)\
**Post date:** [December 2, 2016, 7:43pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/33 "2016-12-02T19:43:52Z")

</div>

Rafa,  
They are a bit different in both scope and purpose.

HSRP devices monitor each other to determine who should be the gateway, whereas IP SLA allows you to monitor just about anything. With HSRP, it is an all or nothing affair, meaning that upon a failure detection, the HSRP partner would completely take over the virtual IP and MAC address that other devices are using as a gateway. IP SLA can be more granular in its actions. For example, you could control whether a single route is published based on some failure condition being watched by an SLA monitor.

---

<div class="post-metadata">

**Author:** ![shantel](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/shantel/32/360_2.png) [@shantel](https://forum.networklessons.com/u/shantel)\
**Post date:** [December 26, 2016, 6:07pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/34 "2016-12-26T18:07:48Z")

</div>

Split this topic on December 26, 2016, 6:07pm UTC

19 posts were merged into an existing topic: [Reliable Static Routing with IP SLA](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011)

---

<div class="post-metadata">

**Author:** ![Zaman.rubd](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/z/45deac/32.png) [@Zaman.rubd](https://forum.networklessons.com/u/Zaman.rubd)\
**Post date:** [February 2, 2017, 12:37pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/35 "2017-02-02T12:37:13Z")

</div>

Hi Rene,  
I am little bit confused about timers of IP SLA .

threshold 100  
timeout 1000  
frequency 3

Could you please make it clear about all above timers in your simple way .Thanks

br//  
zaman

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [February 3, 2017, 6:31am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/36 "2017-02-03T06:31:48Z")

</div>

Hello Mohammad

The three parameters that you mention above are used like so:

- The **threshold** is the amount of time in milliseconds above which an ip sla is activated. In other words, if the response is less than the threshold, the network is functioning normally. If it is above the threshold, statistics are gathered and some action that is configured takes place.
- The **timeout** is the number of milliseconds the system waits for a response. If this time is exceeded, the attempt is considered lost.
- The **frequency** is how often the SLA operation takes place.

For example, if you create an IP sla where a specific IP address is pinged, and you set the threshold to be 500, the timeout to be 2000 and the frequency to be 10, then the following will occur:

- A ping will be sent out every **10** seconds.
- If the response is below the **threshold** , it is considered normal network behaviour
- If the response is above the **threshold** but below the **timeout** , statistics are updated and the configured action takes place
- If the response is above the **timeout** , the attempt is considered lost, statistics are gathered and the system no longer waits for a response.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![mrleeiian](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@mrleeiian](https://forum.networklessons.com/u/mrleeiian)\
**Post date:** [March 9, 2017, 11:54pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/37 "2017-03-09T23:54:05Z")

</div>

Hi Rene/Moderators,

When 8.8.8.8 is not reachable from dialer0, default route via cellular takes over.  
The traffic is not failing back from cellular to dialer, would it be because timeout and threshold have not been defined?

```
track 234 ip sla 1 reachability

ip sla 1
 icmp-echo 8.8.8.8 source-interface Dialer0
 frequency 5

ip sla schedule 1 life forever start-time now

ip route 0.0.0.0 0.0.0.0 Dialer0 track 234
ip route 0.0.0.0 0.0.0.0 Cellular0 254

```

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [March 10, 2017, 11:03am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/38 "2017-03-10T11:03:17Z")

</div>

Hi @mrleeiian

Your IP SLA configuration looks fine, even if you haven’t configured a timeout/threshold, there are default values:

```
R1#show ip sla configuration 
IP SLAs Infrastructure Engine-III
Entry number: 1
Owner: 
Tag: 
Operation timeout (milliseconds): 5000
Type of operation to perform: icmp-echo
Target address/Source interface: 4.4.4.4/GigabitEthernet0/1
Type Of Service parameter: 0x0
Request size (ARR data portion): 28
Data pattern: 0xABCDABCD
Verify data: No
Vrf Name: 
Schedule:
   Operation frequency (seconds): 5 (not considered if randomly scheduled)
   Next Scheduled Start Time: Start Time already passed
   Group Scheduled : FALSE
   Randomly Scheduled : FALSE
   Life (seconds): Forever
   Entry Ageout (seconds): never
   Recurring (Starting Everyday): FALSE
   Status of entry (SNMP RowStatus): Active
Threshold (milliseconds): 5000
Distribution Statistics:
   Number of statistic hours kept: 2
   Number of statistic distribution buckets kept: 1
   Statistic distribution interval (milliseconds): 20
Enhanced History:
History Statistics:
   Number of history Lives kept: 0
   Number of history Buckets kept: 15
   History Filter Type: None 

```

Rene

---

<div class="post-metadata">

**Author:** ![kuochkimsenga](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/cdc98d/32.png) [@kuochkimsenga](https://forum.networklessons.com/u/kuochkimsenga)\
**Post date:** [July 6, 2018, 5:25pm UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/39 "2018-07-06T17:25:07Z")

</div>

Hi Rene  
I have read this !

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/1/194020e55e5961d567408ab0c4eff0f7f45eea4a.png)  
You recommend to ping something on internet and i have try 8.8.8.8 and apply IP SLA on my primary static route, so when some thing wrong with my first static route to ISP1 it can’t reach 8.8.8.8. Then it will show %TRACKING-5-STATE: 1 rtr 1 state Up-\>Down, then it will pick up the secondary static route install in routing table then mean it can reach 8.8.8.8. It make my IP sla keep up and down up and down.  
Can you help me on this, Thank you!

---

<div class="post-metadata">

**Author:** ![hengsovandara1345](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/hengsovandara1345/32/1331_2.png) [@hengsovandara1345](https://forum.networklessons.com/u/hengsovandara1345)\
**Post date:** [July 10, 2018, 6:40am UTC](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011/40 "2018-07-10T06:40:14Z")

</div>

Hi Rene  
I have read this !

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/8/8635082a9a6c4ac7553e1a2e609e0f12ac8b9750.png)  
You recommend to ping something on internet and i have try 8.8.8.8 and apply IP SLA on my primary static route, so when some thing wrong with my first static route to ISP1 it can’t reach 8.8.8.8. Then it will show %TRACKING-5-STATE: 1 rtr 1 state Up-\>Down, then it will pick up the secondary static route install in routing table then mean it can reach 8.8.8.8. It make my IP sla keep up and down up and down.  
Can you help me on this.  
Thank you so much  
Sovandara !

[Previous page](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011.md?page=1)

[Next page](https://forum.networklessons.com/t/reliable-static-routing-with-ip-sla/1011.md?page=3)
