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

EEM script to track IP and admin down port

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
Cisco Employee

EEM script to track IP and admin down port

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.

7 REPLIES
Cisco Employee

EEM script to track IP and admin down port

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.

Cisco Employee

EEM script to track IP and admin down port

Joe

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

Cisco Employee

EEM script to track IP and admin down port

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

Cisco Employee

EEM script to track IP and admin down port

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?

Cisco Employee

EEM script to track IP and admin down port

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"

Cisco Employee

EEM script to track IP and admin down port

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

Cisco Employee

EEM script to track IP and admin down port

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.

734
Views
0
Helpful
7
Replies
CreatePlease to create content