09-13-2017 01:39 AM - edited 03-05-2019 09:07 AM
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..
Solved! Go to Solution.
09-13-2017 09:25 AM
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)
09-13-2017 04:37 AM - edited 09-13-2017 04:49 AM
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
:-)
09-13-2017 04:43 AM
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..
09-13-2017 04:58 AM - edited 09-13-2017 05:00 AM
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
09-13-2017 05:19 AM
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?
09-13-2017 05:24 AM
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
09-13-2017 05:44 AM
Thanks for your help.
09-13-2017 05:47 AM
It was a pleasure Michael, you can reach me if you need additional assistance with configurations.
Have a good day.
:-)
09-13-2017 09:25 AM
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)
09-13-2017 09:28 AM
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...
09-13-2017 10:25 AM
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...
09-06-2023 01:02 AM
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,
11-03-2022 03:58 AM - edited 11-03-2022 03:59 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide