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

EEM/TCL on router to automate tasks on connected switch on switch events (using SNMP)

Dear community,

 

I have yet another challenge and as much as I admire the possibilities with EEM and TCL. I am learning everyday and this technology is fairly new to me.

 

Goal:

I would like to have a policy or applet running on the router, as the switch does not support EEM, which detects a specific 'port down' on the switch. When this specific port comes back up automate a shut and no shut on a range of switch ports. 

 

Hardware and software:

Router - C891F-K9 - 15.3(3)M4

Switch - C2960X (does not support EEM!) - 15.0(2a)EX5

 

Theory:

Now since the switch does not support EEM I have to use the router for running the EEM policy/applet.

The idea is that the switch sends traps/informs to the router (snmp server manager) and when the 'port down' is detected, the EEM policy automates tasks (shut/no shut) based on SNMP write commands. 

 

First of all, i'd like to ask: is this even possible? If so, does anyone have any experience with this and are you able to pinpoint me to the right direction?

 

As always, your help is highly appreciated! Any alternatives or suggestions are more than welcome! :-)

 

Kind regards,

 

Vincent

 

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

This is very possible.  You can configure the switch with an SNMP trap destination of the router, and then configure an EEM policy on the router to look for the specific trap OID.  From there, you can automate either doing SNMP sets to change ifAdminStatus from up to down and back or SSH to the switch from the router and do this using CLI.

You'll use the snmp-notification event detector on the router to spot the interface coming back up.  Something like:

event snmp-notification oid 1.3.6.1.2.1.2.2.1.8.1 oid-val "1" op eq src-ip-address "SWITCH-IP"

 

View solution in original post

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

This is very possible.  You can configure the switch with an SNMP trap destination of the router, and then configure an EEM policy on the router to look for the specific trap OID.  From there, you can automate either doing SNMP sets to change ifAdminStatus from up to down and back or SSH to the switch from the router and do this using CLI.

You'll use the snmp-notification event detector on the router to spot the interface coming back up.  Something like:

event snmp-notification oid 1.3.6.1.2.1.2.2.1.8.1 oid-val "1" op eq src-ip-address "SWITCH-IP"

 

Review Cisco Networking for a $25 gift card