I'm trying to troubleshoot a situation where a router frequently loses the path to both its DMVPN headends, and I want to figure out where on the path to the headends the problem is happening.
I'd like to fire off two traceroutes (one to each headend) every time I lose an EIGRP neighbor, and save the results in a way that I can view later, even if the router's uplink to the rest of the world is down.
Is there a way to do this? From a brief skim of the documentation, it doesn't look like I can write the result to flash?
Edited to add:
I'm trying to do this with an EEM TCL script that detects the EIGRP neighbor change, then starts a traceroute.
This should be fine. I'm kind of confused as to what you're having trouble with. It sounds like you may already have the beginnings of an EEM Tcl policy but you may need help writing out the output? If so, you can absolutely save data to files on flash. For example:
set fd [open "flash:dmvpn_results.txt" a]
puts $fd $traceroute_output1
puts $fd $traceroute_output2
This will append the results of the traceroutes (stored in the traceroute_output1 and traceroute_output2 variables) to the file "flash:dmvpn_results.txt".
Thanks Joe. So far I've written an EEM applet that sends the traceroute results to syslog, which works perfectly (albeit making for weird looking syslog messages).
I then ran that through the applet-to-tcl converter on your webpage, and I've gotten stuck after adding in the code to try writing the results to a file. Bear in mind that I'm learning tcl as I go along... this is what I have (I changed the "a" to "w" from your example, since I want to overwrite the file):
[toc:faq]The ProblemOn traditional switches whenever we have a trunk
interface we use the VLAN tag to demultiplex the VLANs. The switch needs
to determine which MAC Address table to look in for a forwarding
decision. To do this we require the switch to do...
[toc:faq]Introduction:Netdr is a tool available on a RSP720, Sup720 or
Sup32 that allows one to capture packets on the RP or SP inband. The
netdr command can be used to capture both Tx and Rx packets in the
software switching path. This is not a substitut...
IntroductionOSPF, being a link-state protocol, allows for every router
in the network to know of every link and OSPF speaker in the entire
network. From this picture each router independently runs the Shortest
Path First (SPF) algorithm to determine the b...