I'm using this EEM script to shut down a port when a cable is pulled or port goes down for any other reason. It works to shut down the port but I'm facing the following problem
1. If I attempt to re-enable the port manually it immedeately shuts it down using the EEM unless I remove the event manager configuration, re-enable the port and re-apply EEM config.
2. I have a "wait 120"configured but it never re-enable the port after 120 seconds
Any help would be greatly appreciated.
event manager applet interface_down
event syslog pattern ".*UPDOWN.*FastEthernet0/4.* changed state to down"
action 1.0 syslog msg "Interface FastEthernet0/4 has gone down"
action 1.1 cli command "enable"
action 1.2 cli command "conf t"
action 1.3 cli command "Interface FastEthernet0/4"
action 1.4 cli command "shut"
action 1.5 cli command "end"
action 1.6 syslog msg "Interface FastEthernet0/4, changed state to administratively down"
action 1.7 wait 120
action 2.1 cli command "enable"
action 2.2 cli command "conf t"
action 2.3 cli command "Interface FastEthernet0/4"
action 2.4 cli command "no shut"
action 2.5 cli command "end"