09-24-2019 07:54 AM
Hello
We have a pair of Nexus 5000 switches which run a script as follows, due to the switches not running IP SLA:
event manager applet track-next-hop
event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-op ge entry-val 0 poll-interval 30
action 1.0 cli command "source RouteTrack.py 0.0.0.0/0 Next_Hop IP_To_Track"
The idea of the script is that it monitors IP_To_Track every 30 seconds to see if it's available. If it is, then it adds a static route into the routing table for 0.0.0.0/0. If the IP_To_Track doesn't respond, it takes the route out of the routing table and it follows the advertised default route from our WAN.
This seems to have worked perfectly fine when we first put it in. However, it only ran approximately 50 times before it stopped running. Now, the route is still in the routing table and if IP_To_Track isn't contactable, the traffic fails.
Does anyone have any experience of this? Or know what I should be looking for?
The switches are on software version 7.3(0)N1(1).
This runs on a 2nd pair on another site as well which are Nexus 6000 on version 7.3(5)N1(1), which also has the same issue.
Any help would be greatly appretiated.
Thanks
Paul
Solved! Go to Solution.
10-08-2019 03:15 AM
We have now resolved this issue.
It appears that although the script only took a couple of seconds to run, at some point it had taken too long to run. We had to reboot the cores in order to get them to clear the history out, and added a 'maxrun' timer of 40 seconds and made the script run every 60 seconds instead of 30.
event manager applet track-next-hop
event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-op ge entry-val 0 poll-interval 60
maxrun 40
action 1.0 cli command "source RouteTrack.py 0.0.0.0/0 Next_Hop IP_To_Track"
The script has now run over 8000 times since implementing it
09-24-2019 08:30 AM
Can you post the contect of python script you calling inside the EEM script
Best practice, is there any reason you can run same script of information inside EEM, instead of calling external python script ?
09-24-2019 08:43 AM
10-08-2019 03:15 AM
We have now resolved this issue.
It appears that although the script only took a couple of seconds to run, at some point it had taken too long to run. We had to reboot the cores in order to get them to clear the history out, and added a 'maxrun' timer of 40 seconds and made the script run every 60 seconds instead of 30.
event manager applet track-next-hop
event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-op ge entry-val 0 poll-interval 60
maxrun 40
action 1.0 cli command "source RouteTrack.py 0.0.0.0/0 Next_Hop IP_To_Track"
The script has now run over 8000 times since implementing it
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide