cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6386
Views
15
Helpful
12
Replies

IP SLA for two public IP's

NetMonkey
Level 1
Level 1

Hi, I want to set up an IP SLA on a MLS so that when "both" hosts are unreachable the default route is changed to the backup listed below.

 

ip sla 1
icmp-echo 62.172.38.00
timeout 1000
frequency 3
ip sla schedule 1 life forever start-time now

 

ip sla 2
icmp-echo 62.172.38.01
timeout 1000
frequency 3
ip sla schedule 2 life forever start-time now

 

track 1 ip sla 1 reachability
track 2 ip sla 2 reachability

 

ip route 0.0.0 0.0.0.0 10.189.16.245 name ASA track 1 (Primary default route)
ip route 0.0.0 0.0.0.0 10.189.16.248 name MPLS 10 (Back up route)

 

Can anyone help with the missing configuration?

 

Thank you..

 

 

1 Accepted Solution

Accepted Solutions

Hello,

on a side note, you could use a boolean operator to track both routes. If both are down, the default route gets installed:

 

ip sla 1
icmp-echo 62.172.38.00
timeout 1000
frequency 3
ip sla schedule 1 life forever start-time now

ip sla 2
icmp-echo 62.172.38.01
timeout 1000
frequency 3
ip sla schedule 2 life forever start-time now

track 1 ip sla 1 reachability
track 2 ip sla 2 reachability

 

track 3 list boolean and
object 1
object 2

 

ip route 0.0.0 0.0.0.0 10.189.16.245 name ASA track 3 (Primary default route)
ip route 0.0.0 0.0.0.0 10.189.16.248 name MPLS 10 (Back up route)

View solution in original post

12 Replies 12

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi

You could include an EEM Script to remove the primary route automatically and leave the backup. Like:

 

event manager applet FAILOVER
event tag prim syslog occurs 1 pattern "%TRACKING-5-STATE: 1 rtr 1 state Up- >Down"
event tag sec syslog occurs 1 pattern "%TRACKING-5-STATE: 1 rtr 1 reachabili ty Up->Down"
trigger
correlate event prim or event sec
action 1.0 cli command "enable"

action 2.0 cli command "conf terminal"
action 3.0 cli command "ip route 0.0.0 0.0.0.0 10.189.16.245 name ASA track 1"

 

 

Note the messages in blue should match, usually these messages are generated by the SLA and track once an event is detected. Check the message you receive. 

 

Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

I'm looking to use object tracking to monitor two public IP's.

If both are not reachable then I would like a secondary default route to take over..

Hi

Your config looks fine but could you please provide a show ip sla statistics, in order to see if you are able to make ping from this device to the destination IP included into the icmp-echo. also you could include under the track 1 the following to test it:

 

track 1 ip sla 1 reach

delay down 3




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

I haven't actually input the configuration yet as I am working on a live network.

Just trying to build the config first..

 

Am I not missing the object track part?

Everything looks fine, you can take as reference the following link, but you should check if your SLA is able to reach the destination IP configured with icmp-echo (also you could set up a source IP)

To check the SLA:

show ip sla statistics

 

https://www.cisco.com/c/en/us/support/docs/ip/ip-routing/200785-ISP-Failover-with-default-routes-using-I.html




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Thanks for your help.

It was a pleasure Michael, you can reach me if you need additional assistance with configurations.

Have a good day. 

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hello,

on a side note, you could use a boolean operator to track both routes. If both are down, the default route gets installed:

 

ip sla 1
icmp-echo 62.172.38.00
timeout 1000
frequency 3
ip sla schedule 1 life forever start-time now

ip sla 2
icmp-echo 62.172.38.01
timeout 1000
frequency 3
ip sla schedule 2 life forever start-time now

track 1 ip sla 1 reachability
track 2 ip sla 2 reachability

 

track 3 list boolean and
object 1
object 2

 

ip route 0.0.0 0.0.0.0 10.189.16.245 name ASA track 3 (Primary default route)
ip route 0.0.0 0.0.0.0 10.189.16.248 name MPLS 10 (Back up route)

This is exactly what I was after, thanks.

 

Why is it track 3 list boolean and

 

"3" is it because it is the 3rd track being created?

 

Would it be ok to remove the track 1 and 2 then, or are they still needed?

I'm thinking the objects then link to the tracks...

 

Hello,

track 1 and track 2 correspond to object 1 and object 2, track 3 is used to 'bind' both tracked objects to the boolean condition.

Does that make sense ? Either way, you need all 3 of them for this to work...

I know this is an old post, but I found this useful and learnt about the IP SLA boolean options, so thanks very much.

However, while I was testing this, I've noticed that use of the "AND" operator in this case is wrong.  As you can see from the below outputs, if one of the monitored objects is down the status changes to "DOWN".

If we want to trigger an event when BOTH monitored objects are down, then the "OR" operator should be used.

With the "AND" operator, status changes to "Down" when one of the monitored objects is in Down state:

List boolean and
Boolean AND is Down
3 changes, last change 00:00:06
object 11 Down
object 12 Up

With the "OR" operator, status is "Up" when only one of the monitored objects is in Down state:

List boolean or
Boolean OR is Up
4 changes, last change 00:00:12
object 11 Down
object 12 Up

and the status is "Down" when both monitored objects are in Down state:  

List boolean or
Boolean OR is Down
5 changes, last change 00:00:02
object 11 Down
object 12 Down

 

Found these useful materials explaining more in details if anyone is interested:

IP SLA “AND OR” Boolean Options – Kerry Cordero

Dual ISP Redundancy: IP SLA, Boolean Object Tracking & Longest Match Routing | HOWtoRouteSwitch

Thanks,

joshklee
Level 1
Level 1

Additionally, if you are using the boolean statement for track 3 and you want to stay UP if ANY of the objects are up, then use the OR keywork. The AND keyword will bring the object down if either 1 or 2 go down.

 

track 3 list boolean or
object 1
object 2