Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

how to shut no shut interface of switch using(EEM) Script

Dear community Member,

I'm new for creating scripting for EEM and below is my situation, need your support.

Present I'm using 3560 switch, one of  the switch port(FA0/1) has added  Cisco Access point(PoE), actually what happening daily this Access point getting struct when I'M doing the switch port (FA0/1) shut  then no shut it is working fine .


So my question is i need script, that should continuously ping the IP off the Access point if the IP will drop 4 packets the switch do shut  and then no shut for that I need the script, Please help me.


if it is not possible please provide the batch file, which will ping the particular IP if 4 packet drops it will telnet the switch and go to the interface do shut no shut 




instead of mentioned 3560, I mentioned 2960 now corrected it  please provide the script.

Cisco Employee

The 2960 series switches do

The 2960 series switches do not support full EEM.  We recently tried to determine a workaround for such switches to do automated tasks like this, but it was not possible.  You'll need a 3560 series switch at least to be able to execute EEM policies.

New Member

instead of mentioning 3560, I

instead of mentioning 3560, I mentioned 2960 now corrected it  please provide the script.

New Member

Check this post out. It's

Check this post out. It's solves almost the same problem that you have:

You'll need to add an additional action to the EEM however. You would need to add an action to have it no shut the interface it just shut. After that, you should be all set.


Side note, something else is causing your link to drop off. An EEM would be a band-aid, not a solution. I'd perform additional testing to see what's causing it. Best of luck on this! :)