Maeglin (maeglin73) wrote,
Maeglin
maeglin73

  • Mood:

Cable modem outage... and recovery

First, a little background information. I have a script on my Linux router that runs nightly to reset my DHCP lease with Road Runner. The reason I do this is because, whenever they renumber their cable modem networks (which occurs quite often in this area), I get connection problems after a while. The normal DHCP request/deny method of changing a client's IP address doesn't work either... I keep the one I have even though it's wrong. Because of that, I have to manually reset my DHCP lease to make sure I'm current.

Recently, my friend wizzu had a network card freeze up on his router. I had the same thing happen, but all it took was bringing the card down and back up, and resetting the DHCP lease... my script already does this, so I ran it and that fixed the problem. Since I'm not always home to do that, though, and my home machine acts as my mail/web server, I have to be able to automate that. This is especially important if I'm on vacation, since I can't get back home quickly to fix it. I wrote a script that runs every hour, which tests the connection (by pinging my default gateway through the modem) and, if it's down, it runs the DHCP reset script. If that script can't get an IP address right away, it keeps trying until it does.

Anyway, this afternoon that effort paid off. Around 3pm, my connection fell over (I could tell this when my login from work froze). I didn't know what it was, but I did notice that it came back up around 4:15. I check the logs and it's been trying to get a DHCP lease almost that entire time. Apparently, the script I had written ran at 3:30, tested the connection, then ran the DHCP reset script. Since the cable connection was definitely down, it couldn't get an IP address until things were working again.

In short, my cable connection went down, and my auto-recovery worked!
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment