Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
Hall of Fame Super Gold

EEM to track a route on Nexus 7K

I have a customer who is converting from a 6509 to Nexus 7K as their core switch. On the 6509 they have a floating static route and use the track function to detect loss of connectivity over the primary static default route and to fail over to the floating static route. Unfortunately Nexus 7K seems that track does not provide the functionality of controlling a static route or really of detecting loss of connectivity over the route. So I am wondering if it is possible to write something in EEM that would provide this function. What I think that I need to do is to ping some host over the primary route on a periodic basis. If I get x consecutive failures the script should change the config to remove the primary default route and allow the floating static to take over. When ping is successful y number of times the script should insert the primary static default route.

Has anyone done something like this? Any pointers on how to do this?

Thanks for your help.


Cisco Employee

EEM to track a route on Nexus 7K

This requires more capability in NX-OS EEM than exists today.  IOS supports IPSLA with object tracking whereas NX-OS does not.  While you could write a Tcl script to do the pinging, there is no timer event detector in NX-OS to trigger it.  This could be executed from the scheduler feature of NX-OS (similar to kron on IOS), but calling scripts from scheduler is not officially supported yet.  If you have new enough code, it will work, though.

If you do want to go this route, the trick will be storing the ping results to obtain your x/y numbers.  It might be easiest to do this in a file on flash.  I do have a sample NX-OS Tcl script at you can use as a guide, at least for the CLI execution piece.

Hall of Fame Super Gold

EEM to track a route on Nexus 7K


Thank you for the response. It confirms what I thought about the lack of support in NX-OS for what we want to do for tracking the route. I had hoped for a more supported option through EEM. The switch is running 6.1(2) so I will have a try at scheduler/tcl.



CreatePlease to create content