08-30-2017 10:19 AM - edited 03-08-2019 11:53 AM
Hello,
I have configured the SLA on my router 1 which is connected to the network of the operator so that if the next hob (operator) is down the interface of my router becomes down and when the next hop becomes up the interface must be reactivated.
But the problem when the next hop can be reached, the interface of my router always remains down.
my configuration :
ip sla 1
icmp-echo 10.x.x.x
timeout 100
frequency 2
ip sla schedule 1 life forever start-time now
track 1 rtr 1 reachability
event manager applet interface-shut
event track 1 state down
action 0.0 cli command "enable"
action 0.1 cli command "conf t"
action 1.0 cli command "interface f0/0"
action 2.0 cli command "shut"
action 3.0 syslog msg "interface-shut EEM shut down interface fa0"
event manager applet interface-noshut
event track 1 state up
action 0.0 cli command "enable"
action 0.1 cli command "conf t"
action 1.0 cli command "interface f0/0"
action 2.0 cli command "no shut"
action 3.0 syslog msg "interface EEM brought up interface fa0"
Can you help me ?
Thanks .
08-30-2017 10:25 AM - edited 08-30-2017 10:27 AM
Hi
I usually use the messages generated by events, for example:
event manager applet LINK-BGP-SCRIPT-01
event syslog pattern "%BGP-5-ADJCHANGE: neighbor 1.1.1.1 Down BGP Notification sent"
action 1 cli command "enable"
action 10 cli command "conf t"
action 11 cli command "router bgp 200"
action 12 cli command "neigh 1.1.1.1 shut"
action 13 cli command "end"
action 14 cli command "wr memory"
So once the error message is displayed on the device, the EEM will be triggered and it will run the script.
Also you can use the following debug to see how it is being executed and you could determinate a problem on the script.
debug event manager
Remember do that after business hours to avoid any impact or downtime.
Hope it is useful.
:-)
08-30-2017 10:46 AM
Thank you julio :)
I have already used this command, it displays only the logs relating to the first EEM script but
nothing appears for the second script "event manager applet interface-noshut" :
event manager applet interface-shut
event track 1 state down
action 0.0 cli command "enable"
action 0.1 cli command "conf t"
action 1.0 cli command "interface f0/0"
action 2.0 cli command "shut"
action 3.0 syslog msg "interface-shut EEM shut down interface fa0"
event manager applet interface-noshut
event track 1 state up
action 0.0 cli command "enable"
action 0.1 cli command "conf t"
action 1.0 cli command "interface f0/0"
action 2.0 cli command "no shut"
action 3.0 syslog msg "interface EEM brought up interface fa0"
08-30-2017 10:50 AM
You could try to use: event syslog pattern instead of event track 1 state (I have not used it before). Also could you please the IP SLA config and track?
Thank you in advance.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: