Interface Watchdog script
Posted: Fri Jun 16, 2017 2:06 am
Time and again has it been brought up that the Netwatch tool should include a interface parameter as the ping tool does. I've been living without this feature but recently we've added a new ISP to our corporate network. We run a load balancing system with ping checking routes. Our dedicated lines are of very low bandwidth so we hired a 30 mbit home line that runs over DSL (using a pppoe client). The problem is that sometimes for some (extremely annoying) reason the connection hangs at the ISPs side. You can usually still ping the gateway but nothing else. Really annoying. So the pppoe stays connected and the routes stay up so we're dropping most of our http traffic. Did I mention how annoying this is?
Anyways, the problem, as annoying as it is, only happens about once a week and when I'm in the office. But today I wasn't and sure enough, got a call from the boss that "the internet isn't working".
Long story short, I've had it with this so I wrote a script. Should've done that in the first place, I know. But even though annoying, the problem wasn't really high priority. QoS ensured that critical traffic still went over the dedicated lines. I've tested this afternoon and it's now in production. Doesn't mean it's bug free, and as usual is provided as is, no warranties, and yada yada yada. You guys know the drill. I just wanted to share since many shared scripts on here saved me time and again from doing most of the brain work.
Script is composed of three parts that I'll post consecutively since there seems to be a maximum number of characters allowed per post. Schedule the first at startup, and the second to run at your preferred interval (8-10 minutes will mean between 24 and 30 minutes if before final action is taken if required).
Comments, bugs, mods, complaints, advice, free beer, etc. all welcome!
Anyways, the problem, as annoying as it is, only happens about once a week and when I'm in the office. But today I wasn't and sure enough, got a call from the boss that "the internet isn't working".
Long story short, I've had it with this so I wrote a script. Should've done that in the first place, I know. But even though annoying, the problem wasn't really high priority. QoS ensured that critical traffic still went over the dedicated lines. I've tested this afternoon and it's now in production. Doesn't mean it's bug free, and as usual is provided as is, no warranties, and yada yada yada. You guys know the drill. I just wanted to share since many shared scripts on here saved me time and again from doing most of the brain work.
Script is composed of three parts that I'll post consecutively since there seems to be a maximum number of characters allowed per post. Schedule the first at startup, and the second to run at your preferred interval (8-10 minutes will mean between 24 and 30 minutes if before final action is taken if required).
Comments, bugs, mods, complaints, advice, free beer, etc. all welcome!