cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2344
Views
0
Helpful
1
Replies

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

khaled
Level 1
Level 1

Dear community experts,

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 

 

Note: 

 

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

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

This should work:

 

ip sla 1

 icmp-echo 10.10.10.1

 frequency 15

!

ip sla schedule 1 life forever start now

!

ip sla enable reaction-alerts

!

ip sla reaction-configuration 1 react timeout action-type trapOnly threshold-type consecutive 4

!

event manager applet reset-ap

 event ipsla operation-id 1 reaction-type timeout

 action 1.0 cli command "enable"

 action 2.0 cli command "config t"

 action 3.0 cli command "int fa0/1"

 action 4.0 cli command "shut"

 action 5.0 cli command "no shut"

 action 6.0 cli command "end"