05-15-2012 10:50 PM - edited 03-04-2019 04:22 PM
Hi
I have a problem
On my router I have configured Cisco EEM, which do next
event manager applet BGP_ISP_DOWN
event track 1 state down
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "no ip prefix-list own-prefix seq 10 permit 10.10.10.0/24"
action 1.3 cli command "ip prefix-list own-prefix-bee seq 15 permit 10.10.10.0/24"
action 1.4 syslog msg "BGP peer ISP down 10.10.10.0/24 now through ISP2"
and this simple SLA
ip sla 1
icmp-echo 11.11.11.11 source-interface GigabitEthernet0/1.202
timeout 15000
frequency 15
ip sla schedule 1 life forever start-time now
Sometimes host 11.11.11.11 which outside for me, stops responding ICMP(for some reason), but my ISP have a host 11.11.11.12 which UP and respondinng ICMP.
Is there any way ping both hosts 11.11.11.11&11.11.11.12 in one sla?
Or have two sla's in some group?
thanks
Solved! Go to Solution.
05-16-2012 12:13 AM
Hi,
yes you can use a boolean track with a OR like this:
ip sla 1
icmp-echo 11.11.11.11 source-interface GigabitEthernet0/1.202
timeout 15000
frequency 15
ip sla schedule 1 life forever start-time now
ip sla 2
icmp-echo 11.11.11.12 source-interface GigabitEthernet0/1.202
timeout 15000
frequency 15
ip sla schedule 2 life forever start-time now
track 1 rtr 1
track 2 rtr 2
track 2 list boolean or
object 1
object 2
event manager applet BGP_ISP_DOWN
event track 3 state down
Regards.
Alain
05-16-2012 12:36 AM
Hi Cadet,
I believe the boolean retun has to be an "and" because of the problem the client is facing that IP-SLA decision is based on just one single return, therefore the boolean has to be an "and".
I hope that you would agree with me.
thanks
Rizwan Rafeek
05-16-2012 03:44 AM
Hi,
If you need both hosts down for the tracked object to be down then you need a boolean OR because if you take the truth table for AND it is:
1 and 1 = 1
1 and 0 = 0
0 and 1 = 0
0 and 0 = 0
But the OR is:
1 or 1 = 1
1 or 0 = 1
0 or 1 = 1
0 or 0 = 0
Concerning the syntax it is not the same depending upon IOS version and so surely in yours it should be:
track 1 ip sla 1 reachability
Regards.
Alain
05-16-2012 12:13 AM
Hi,
yes you can use a boolean track with a OR like this:
ip sla 1
icmp-echo 11.11.11.11 source-interface GigabitEthernet0/1.202
timeout 15000
frequency 15
ip sla schedule 1 life forever start-time now
ip sla 2
icmp-echo 11.11.11.12 source-interface GigabitEthernet0/1.202
timeout 15000
frequency 15
ip sla schedule 2 life forever start-time now
track 1 rtr 1
track 2 rtr 2
track 2 list boolean or
object 1
object 2
event manager applet BGP_ISP_DOWN
event track 3 state down
Regards.
Alain
05-16-2012 12:36 AM
Hi Cadet,
I believe the boolean retun has to be an "and" because of the problem the client is facing that IP-SLA decision is based on just one single return, therefore the boolean has to be an "and".
I hope that you would agree with me.
thanks
Rizwan Rafeek
05-16-2012 12:55 AM
Hi,
I think it should be an OR if he wants the tracked object to be down if both pings fail but not if one only fails.
Tell me what you think about it.
Regards.
Alain
05-16-2012 01:42 AM
Thanks, but in my track I need to check that all tracking hosts are down
05-16-2012 01:49 AM
seems I dont have track 1 rtr command
Might be you know why?
r1(config)#track 1 ?
interface Select an interface to track
ip IP protocol
list Group objects in a list
stub-object Stub tracking object
Cisco IOS Software, C3900 Software (C3900-UNIVERSALK9-M), Version 15.2(1)T1, RELEASE SOFTWARE (fc1)
05-16-2012 12:28 AM
Here is an example of tracking two IP-SLA(s) with tracking in boolean "and" otherwise "or" return.
track 1 ip sla 1 reachability
track 2 ip sla 2 reachability
Router(config)# track 12 list boolean and
Router(config-track)# object 1
Router(config-track)# object 2
http://www.cisco.com/en/US/docs/ios/ipapp/configuration/guide/ipapp_eot.html
Hope that helps.
thanks
Rizwan Rafeek
05-16-2012 01:40 AM
Thanks, you're right I need AND
05-16-2012 01:49 AM
seems I dont have track 1 rtr command
Might be you know why?
r1(config)#track 1 ?
interface Select an interface to track
ip IP protocol
list Group objects in a list
stub-object Stub tracking object
Cisco IOS Software, C3900 Software (C3900-UNIVERSALK9-M), Version 15.2(1)T1, RELEASE SOFTWARE (fc1)
05-16-2012 03:44 AM
Hi,
If you need both hosts down for the tracked object to be down then you need a boolean OR because if you take the truth table for AND it is:
1 and 1 = 1
1 and 0 = 0
0 and 1 = 0
0 and 0 = 0
But the OR is:
1 or 1 = 1
1 or 0 = 1
0 or 1 = 1
0 or 0 = 0
Concerning the syntax it is not the same depending upon IOS version and so surely in yours it should be:
track 1 ip sla 1 reachability
Regards.
Alain
05-17-2012 01:15 AM
You was right
Multiple objects can also be tracked by means of a list, using a flexible method for combining objects with Boolean logic. This functionality includes:
•Boolean AND function—When a tracked list has been assigned a Boolean AND function, each object defined within a subset must be in an up state, so that the tracked object can also be in the up state.
•Boolean OR function—When the tracked list has been assigned a Boolean OR function, it means that at least one object defined within a subset must also be in an up state, so that the tracked object can also be in the up state.
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