cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3284
Views
0
Helpful
4
Replies

EEM Scripts on a Catalyst 3750G

MARTIN HUERTER
Level 1
Level 1

Does anyone know if I can run EEM scripts on a Catalyst 3750G switch? If so, what version of IOS do I need to make it work?

Thanks!    

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

Yes, you can.  For all feature sets, you want 12.2(52)SE or higher to get EEM.  For IPSERVICES, you can use 12.2(44)SE or higher.

Thanks! I'll get it downloaded and get it cofigured.

Joseph,

I want to create a simple EEM script on a Catalyst 3750G running ipservices IOS on it. All I want to do is monitor interfaces GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4. If either of these interfaces go down, I wan the EEM script to shutdown interface GigabitEthernet 1/0/26. Here is what I put together so far. I haven't tried it yet, but do you think this will work?

Thanks!

event manager session cli username "root"

event manager applet Stop_Announcing_BGP

event syslog pattern "Interface GigabitEthernet1/0/3, changed state to down"

event syslog pattern "Interface GigabitEthernet1/0/4, changed state to down"

action 1.0 cli command "enable"

action 1.1 cli command "configure terminal"

action 1.2 cli command "interface gig1/0/26"

action 1.3 cli command "shut"

Martin,

In order to link the 2 events and act on either one of them you should change your event trigger to something like this:

event manager applet Stop_Announcing_BGP

event tag event1 syslog pattern "Interface GigabitEthernet1/0/3, changed state to down"

event tag event2 syslog pattern "Interface GigabitEthernet1/0/4, changed state to down"

trigger

  correlate event event1 or event event2

I would also recommend to consider:

- Add another action to send a syslog msg so that whatever happened is documented.

- If you are shutting down a BGP session, maybe it would be better to shut the BGP session, and not the interface

- You can shut down the BGP session using "router bgp... neighbor x.x.x.x shutdown"