cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3194
Views
0
Helpful
7
Replies

EEM script to track IP and admin down port

shaunwhi
Cisco Employee
Cisco Employee

I have a nexus 5500 switch...i need an EEM script that will track an IP address (6.0.0.5)..and if that IP is not reachable, it will admin down a port on the n5k

Thanks in advance!

1 Accepted Solution

Accepted Solutions

XR does not yet support applets.  So you will need to use EEM Tcl policies.  Depending on the release of XR, you do have a track event detector.  You can take this applet to http://www.marcuscom.com/convert_applet to convert the applet to Tcl.  That Tcl policy should then be loadable into XR.

View solution in original post

7 Replies 7

Joe Clarke
Cisco Employee
Cisco Employee

This is not possible on the N5K.  You can track an IP route or an interface, but you cannot track reachability to an IP address like you can with IPSLA on IOS.

Joe

How about if i swap the 5Ks with nexus 4500X switches??

I don't believe any Nexus switch can do this.  Catalyst, yes, but not Nexus.

Sorry typo from my ipad....i meant swap n5k for Catalyst 4500-X...that should be able to do it right? What would my script look like?

On a Cat4K, you can create an IPSLA collector to ping your host, then use tracking to watch it:

event manager applet track-ping

event track 1 state down

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "int gi1/1"

action 4.0 cli command "shut"

action 5.0 cli command "end"

Thanks joe! Last question...if i were to do this on XR (ASR9k) how can i do this...i have the IPSLA setup...but dont see how i trigger off of it to run CLI commands...i dont even see how i run CLI commands

Thanks

XR does not yet support applets.  So you will need to use EEM Tcl policies.  Depending on the release of XR, you do have a track event detector.  You can take this applet to http://www.marcuscom.com/convert_applet to convert the applet to Tcl.  That Tcl policy should then be loadable into XR.

Review Cisco Networking for a $25 gift card