01-15-2010 06:02 PM
Hi
Please teach me. How to implementation EEM.
I want use EEM this situation.
When gi1/1 detect down EEM scripts enable.
In case gi1/1 is up within 3 seconds then finish the EEM scripts.
Another case gi1/1 down time is over 3 seconds, Then shutdown gi1/2 and gi1/3.
IOS version 12.2(46)SG.
Solved! Go to Solution.
01-15-2010 11:15 PM
You have a tight time margin here, but these EEM applet policies should work:
event manager environment quote "
event manager applet int-down
event syslog pattern "LINEPROTO-5-UPDOWN.*GigabitEthernet1/1.*changed state to down"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "event manager applet int-down-countdown"
action 3.1 cli command "event timer countdown time 3"
action 3.2 cli command "action 1.0 cli command enable"
action 3.3 cli command "action 2.0 cli command $quote config t$quote"
action 3.4 cli command "action 3.0 cli command $quote int gi1/2$quote"
action 3.5 cli command "action 4.0 cli command $quote shutdown$quote"
action 3.6 cli command "action 5.0 cli command $quote int gi1/3$quote"
action 3.7 cli command "action 6.0 cli command $quote shutdown$quote"
action 3.8 cli command "action 7.0 cli command $quote no event manager applet int-down-countdown$quote"
action 3.9 cli command "action 8.0 cli command $quote end$quote"
action 4.0 cli command "end"
event manager applet int-up
event syslog pattern "LINEPROTO-5-UPDOWN.*GigabitEthernet1/1.*changed state to up"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "no event manager applet int-down-countdown"
action 4.0 cli command "end"
01-15-2010 11:15 PM
You have a tight time margin here, but these EEM applet policies should work:
event manager environment quote "
event manager applet int-down
event syslog pattern "LINEPROTO-5-UPDOWN.*GigabitEthernet1/1.*changed state to down"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "event manager applet int-down-countdown"
action 3.1 cli command "event timer countdown time 3"
action 3.2 cli command "action 1.0 cli command enable"
action 3.3 cli command "action 2.0 cli command $quote config t$quote"
action 3.4 cli command "action 3.0 cli command $quote int gi1/2$quote"
action 3.5 cli command "action 4.0 cli command $quote shutdown$quote"
action 3.6 cli command "action 5.0 cli command $quote int gi1/3$quote"
action 3.7 cli command "action 6.0 cli command $quote shutdown$quote"
action 3.8 cli command "action 7.0 cli command $quote no event manager applet int-down-countdown$quote"
action 3.9 cli command "action 8.0 cli command $quote end$quote"
action 4.0 cli command "end"
event manager applet int-up
event syslog pattern "LINEPROTO-5-UPDOWN.*GigabitEthernet1/1.*changed state to up"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "no event manager applet int-down-countdown"
action 4.0 cli command "end"
01-16-2010 02:46 AM
It's Perfect! Many thanks
01-16-2010 10:45 AM
There is a slight change I would make to prevent the regular expressions from matching interfaces such as Gi1/10, 1/11, etc.:
event manager environment quote "
event manager applet int-down
event syslog pattern "LINEPROTO-5-UPDOWN.*GigabitEthernet1/1,.*changed state to down"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "event manager applet int-down-countdown"
action 3.1 cli command "event timer countdown time 3"
action 3.2 cli command "action 1.0 cli command enable"
action 3.3 cli command "action 2.0 cli command $quote config t$quote"
action 3.4 cli command "action 3.0 cli command $quote int gi1/2$quote"
action 3.5 cli command "action 4.0 cli command $quote shutdown$quote"
action 3.6 cli command "action 5.0 cli command $quote int gi1/3$quote"
action 3.7 cli command "action 6.0 cli command $quote shutdown$quote"
action 3.8 cli command "action 7.0 cli command $quote no event manager applet int-down-countdown$quote"
action 3.9 cli command "action 8.0 cli command $quote end$quote"
action 4.0 cli command "end"
event manager applet int-up
event syslog pattern "LINEPROTO-5-UPDOWN.*GigabitEthernet1/1,.*changed state to up"
action 1.0 cli command "enable"
action 2.0 cli command "config t"
action 3.0 cli command "no event manager applet int-down-countdown"
action 4.0 cli command "end"
01-21-2010 10:25 PM
Thank you. And another question about How to enable EEM.
SwitchA And SwitchB directly connected each other.
Trunkport(g1/1) of SwitchA connected to Trunkport(g1/1) of SwitchB.
When tracking interface(g1/2) is down in SwitchA, SwitchB enable EEM.
Interface(g1/2) is not directly connected each other.
Interface g1/2 is L2 accessport.
Can't assign ip address.
Dou you have good idea?
01-22-2010 09:10 AM
Start a new thread for this question. Also, it would help if you try and explain exactly what you want to do in more details.
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