EEM applet for "no shutdown" of the external interface

Unanswered Question
Aug 21st, 2009


I needed 2 applets for failover;

1)one to down the interface when it finds the DNS interface down.

2) 2nd to Up the interface when it finds the DNS interface up.

Now, The "down applet" works fine, but "Up applet" doesn't.

Can you please check what mistake am i making? Also, If I keep one IP SLA for both EEM applets (for up and down).Will that be ok?

ip sla 443

tcp-connect 443 control disable

frequency 60

ip sla schedule 443 life forever start-time now

track 443 rtr 443 reachability

delay down 60 up 60

event manager applet server_up_example

event track 443 state up

action 01.0 syslog msg "TCP service is available"

action 02.0 cli command "enable"

action 03.0 cli command "config t"

action 03.0 cli command "interface gig0/0"

action 04.0 cli command "no shut"

action 05.0 syslog msg


OUTPUT (somthing like this. It doesn;t Up the interface. while for down it works fine)


Round Trip Time (RTT) for Index 1

Type of operation: icmp-echo

Latest RTT: 1 ms

Latest operation start time: 10:02:15.190 UTC Thu Aug 20 2009

Latest operation return code: OK

Number of successes: 0

Number of failures: 4

Operation time to live: Forever

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
dexterslab Fri, 08/21/2009 - 04:48

I found the problem. I was making it down using cli command for testing purposes. When i tried with physical wire plug in and out, it start working fine.

Joe Clarke Fri, 08/21/2009 - 06:57

The actual state of the IP SLA collector isn't as important as the state of the tracked object. Even if you shutdown an interface manually, if the collector cannot reach, then it will go down, and 60 seconds later, so should the tracked object.

Typically, when I'm testing this kind of thing, I use a black hold route. For example:

ip route null0

This way, I don't lose other connectivity, and I can still check whether or not the IP SLA collector, EOT, and EEM functions are working.

And, yes, one collector, and one tracked object is fine for what you want to do.


This Discussion