How to automatically repair network connection when it goes down?

1

2

I'm using Windows XP.

Every hour or so my wireless router goes down, and everyone can't connect to Internet for a couple of minutes. If I right click on my network connection, and choose Repair, I usually get Internet back quicker.

Is there a way I can automatically have it try to repair the connection once it goes down? Can I write a program to do this if there isn't a built-in setting?

EDIT: My router is a Linksys WRT110 with firmware version 1.0.04. I have cable Internet. The signal is 100%. I live in an apartment complex, and there are about 15 other Wi-Fi networks visible to me, not sure if that makes any difference.

Kyle

Posted 2010-02-07T07:03:14.723

Reputation: 251

2Somebody's going to ask, so... what's wrong with your router? Wouldn't it be better to fix that? – Nathaniel – 2010-02-10T06:56:36.980

@nathaniel Yea, I would like to fix that preferably, I don't know whats wrong with it though. I had this problem, then I bought a new router and still have the same problem. I don't know if its because they are cheap routers or if its something else. And I know its not my computer because my roommate's computers get disconnected too. – Kyle – 2010-02-10T17:03:45.310

"Cheap routers" is a good starting point. You have several options, and a few things you should do anyways. Options: buy a better router (we don't what you have), upgrade your router firmware to something like Tomato or DD-WRT, and whatever router you use, make sure that it is configured, secured, and physically located (nothing blocking signal, good antennas) correctly. – Joe Internet – 2010-02-10T20:49:23.387

Maybe your router have a "Keep Alive" option, this option reboots the router every given time. Also the memory of the router can be full so it reboots automatically.

As Joe Internet says you could upgrade the firmware to DD-WRT so you can have more control over what happens with the router. – octa – 2010-02-10T22:09:52.443

@Octa I checked and I don't use a Keep Alive setting. – Kyle – 2010-02-12T15:58:08.767

Answers

3

In my experience, Windows machines 'hiccuping' regularly is due to DHCP lease renewals.

I imagine your router (Linksys WRT110) has the DHCP server renew lease timeout set at 1 hour or 'infinite'.

Windows has a 'quirk' in that when the lease expires, it DROPS all the connections, then goes looking for a new lease.

If the router lease renewal timeout is set to 'infinite', then it sets the value to a 32 bit UNSIGNED MAX_INT...(0xFFFFFFFF), which Microsoft products process as a SIGNED value. (-1).

The RFC2131 describes the proper interpretation of the values used, and the router is doing things properly! Windows is interpreting the 'expires' time of the lease as '-1', or 'one second ago', which again, makes it drop all the network connections.

The fix for this is again to set the router's DHCP renewal time to 7 days (168 hours) or something. Even 24 hours will work, although 23 or 25 would be better so the 'blink' wouldn't be continuously in the middle of your surfing, instead drifting slowly throughout the days.

lornix

Posted 2010-02-07T07:03:14.723

Reputation: 9 633