Eric,
Thanks for doing this. I am on version 5.26. I haven't upgraded yet because I'm not sure of the stability of the newer versions. Do I need to upgrade to make this work?
Next, is the script going through all of the ip address on the network, or just the static ip addresses?
Next, does this script work with net watch, or is it stand alone? I didn't see any email output in the script.
Thanks Eric.
1) Yes, it requires 6.6 (or something) or higher. It uses associative arrays and functions. You could get rid of the functions, but it won't really help you because it still uses the associative arrays and that will be much harder to get rid of.
2) Basically the script looks for dhcp-leases that are BOTH STATIC and have a comment that looks like +DPD+<SOME STRING>. DPD meaning Dead Peer Detection. What it does is finds those hosts... pings them... if they are down it adds one to the counter, if they are up it doesn't... and then once a host has three sequential dead pings it triggers the linkDown function with the string. Once it recovers it triggers the linkUp function with the string.
3) You are correct. Just add whatever you want into the linkUp and LinkDown functions... e.g. swap put for /tools email etc...
-Eric