Why Do We Have To Restart Routers? 936
jaypaulw writes "I've owned a WRT54G, some cheap D-Link home Wi-Fi/firewall/routers, and now an Apple Airport Extreme (100/10 ethernet ports). In the context of the discussion about the worst uses of Windows — installation in places where an embedded device is superior — I've gotten to wondering why it's necessary to reboot these devices so frequently, like every few days. It seems like routers, purpose-built with an embedded OS, should be the most stable devices on my network."
My theory... (Score:3, Interesting)
I base this on absolutely nothing, but my primary suspect is the cheapskate power supplies that these devices come with. However I've never cared enough to test it out.
My router (Score:2, Interesting)
Its still going good and strong though!
It shouldn't be... (Score:5, Interesting)
It's cheap, fast development... Not bothering to pay attention to correctness, not watching for memory leaks, etc., etc.
It shouldn't be that way, of course. I got an old K6-2 system, underclocked it to 100MHz, removed CPU fan and replaced the PSU fan with a very slow and quiet model to make a nearly-silent 8watt system. Then installed OpenBSD on a 32MB CF card (stripped of unnecessary binaries for size, but otherwise completely normal), and have been using that for years. It will run indefinitely, without a reboot. My record for uptime so far is 5 months, and it's only that short because of power outages, and I don't feel the need for a UPS for my router...
There's nothing about being "an embedded OS" that should make it any more or less stable.
BitTorrent?? (Score:4, Interesting)
I had a WRT54GX for years that never needed a reset, until I started using BitTorrent. Then its 4KB (?) connections table would fill up and the device would hang. Had to build an OpenBSD firewall to handle the many active and inactive connections you get with BT.
You're doing it wrong? (Score:4, Interesting)
Now I've got an old PII with a CF as HDD running monowall and maximum uptime so far is about two months. It would appear that the modem is more flaky than the router so I've restarted it needlessly a few times. I'm inclined to think it's hardware causing problems when the router crashes on its own. It's a bare motherbord sitting ontop a cabinet with four NIC's (I had an abundance of NIC's but no switch) and it gets a bit jangled from time to time in its exposed position. I'm amazed that it works at all.
Try to limit the amount of open connections if you're running bittorrent and maybe the bandwidth too. If that doesn't help you should probably build your own router. m0n0wall works for me and I've heard good things about IPCop.
Ironic Connection Sharing (Score:3, Interesting)
I just use a cheap Pentium 2 running Windows XP with Internet Connection Sharing. Disabled the automatic updates and firewalled it properly over 18 months ago, and haven't had to touch the machine since.
Re:TCP Timeout (Score:4, Interesting)
Poor Programming && Poor Hardware Design (Score:1, Interesting)
This is due to a combination of poor programming, and poor hardware designs.
Most properly designed routers have a hardware watchdog timer, which must be periodically written to in order to prevent an automatic reboot.
When I cut my teeth on Embedded/Small system programming, decades ago, we were taught the reboot button is a bad thing.
In fact, for our final project , we had to design a "mission critical" system, where the reset button was DISABLED. Instructors would initiate a prohibited condition, and the software had to automatically reboot and restart from a SAFE [not default] state.
Any system which did not enter a SAFE state, FAILED [and so did the student].
They don't teach classes like that anymore, in favor of things like Java, which lets students forget about the "hard" stuff.
Its all fine and dandy to have a nice real-time OS, but it isn't worth anything if the core programs its running are programmed by a bunch of java jockeys used to letting other people do the "hard stuff".
Re:Resets aren't necessary. (Score:1, Interesting)
I also have a buffalo router with dd-wrt which I have never rebooted. To add to that, I have two WRT54G's at my parents place that used to give them trouble (and they would call me) all the time. Since I installed dd-wrt on them I have not heard about any issues.
But really, I can't say im surprised as it runs on Linux.
The most likely causes (Score:4, Interesting)
Ok, the router software - likely ripd, xorp, quagga or zebra for any domestic ADSL router - might crash, but the worst that will happen then is that you don't learn new routes. Since DSL providers don't tend to switch their internal IP addresses very often, that should not impact any existing subnet. It means tunnels can't be generated on-the-fly, it also means your next-door neighbor can't connect their LAN party to your wireless connection, but it shouldn't impact you in the slightest.
The next question, however, is how on Earth are you noticing the router needs rebooting? The kernel is quite capable of rebooting itself under many (but not all) soft lockups. Linux provides several such mechanisms for doing just that. A simple watchdog circuit, using a bistable circuit, a couple of capacitors, a relay and a trigger line that has to change state, could be added by a manufacturer for maybe a couple of dollars. It probably doesn't even need to be that complex.
When it does reboot, LinuxBIOS is under 3 seconds and I don't imagine OpenBIOS is that much slower. Intel's Tiano probably is, but it's open source so you can rip out anything that's useless. Therefore, recovery times should be barely detectable to an end user. (Most websites vary in download times by more than 3 seconds between visits. Unless you're playing Netrek or WoW at that precise moment, I seriously doubt you'll notice a 3 second outage.)
Finally, however, why isn't the router using carrier-grade software? Again, carrier-grade Linux exists, which should give you 5N uptimes in the worst possible case. Domestic routers are not worst-possible. Even data centers rarely get the kind of stress that could be expected to force an unrecoverable state. If your router is not overheating, has plenty of RAM, and needs rebooting more than once every other year, there is something seriously defective in the software or hardware.
Re:Install OpenWRT. (Score:1, Interesting)
Uh... is there an open source driver for the broadcom chipsets the linksys uses then? I got a wrt54gl thinking it was a good choice - it had "linux" written on it! - but turns out there wasn't any open source driver for it, so openwrt was using linux 2.4 and the closed binary, which really sucked. Shrug.
Re:The most likely reason (Score:5, Interesting)
mod parent up, as I came here to say that.
Also, the Linksys WRT54G up to version 4 was a fine router, plenty of memory, ran Linux, was very stable. Then Linksys decided that quality wasn't nearly as important as driving me batshit insane, and we started getting tons of complaints about users needing to reboot Linksys routers, which came _highly_ recommended from the geek squad over at worst buy.
The modern WRT54G, and anything past version 4, that doesn't have an 'L' in the name is an utter piece of crap, firmware revisions to the VXworks OS they now run have helped, but they are still lockup city.
Re:The most likely reason (Score:4, Interesting)
Re:The most likely reason (Score:5, Interesting)
Also, the Linksys WRT54G up to version 4 was a fine router, plenty of memory, ran Linux, was very stable.
Yeah, I have a 1.1, which I didn't even know until right now (checked the sticker), and I don't think I've rebooted that thing once in the entire time I've owned it. It's been running continuously right now for at least six months 24/7, and before that had a stint of probably 2 years uninterrupted. (I was forced to use Verizon's POS FiOS router for a little while.)
I was about to leave a comment wondering what the hell the submitter was talking about, because to me the WRT54G is probably the most stable router that exists. It really couldn't *be* anymore stable. But I didn't realize there were such problems with version 4 and above.
Re:The most likely reason (Score:5, Interesting)
All the Linux-based ones (decidedly few, admittedly) I have seen use the same DNS proxy (dnsmasq). I guess it's just not perfectly stable but I haven't seen a reboot anymore than once every few months.
I gave up on mine and turned it into a dumb PPPoE bridge. An OpenBSD box at the border handles the dirty guff of PPP sessions and NAT. Now my connection is perfectly stable and the modem never needs to be rebooted. To top it all off I trust the BSD box and the firewall I created on it more than I trust the router to do it properly.
Re:My theory... (Score:4, Interesting)
Yes and no. Yes, a power supply the size of 2 US quarters can (and does) generate stable 5VDC@3A forever provided you never exceed specs (lightning, bath tubs, overheating, etc.) However, these things cost more than the pennies cheap hardware makers are willing to put into the process. They go as cheap as possible... huge coil of chinese wire (read: transformer), a diode, capacitor, and regulator (ala 7805) (if it's a "good" one.) [Note: most cheap hardware has the regulator in the unit, not the wall-wart.] [Note 2: USR/3com is even cheaper... the wall-wart is 100% transformer. It turns 120AC into 20AC.]
Re:The most likely reason (Score:2, Interesting)
My router (D-link) used to require rebooting at odd intervals till I found out my dual 2.4 mhz cordless phone set was locking it up. Got a 5.8 gig phone set, no further problems (except for power outages).
Re:embedded network devices (Score:5, Interesting)
Funny, I think everyone here has had to reboot their router to solve problems in the past. But, in typical slashdot fashion, 99.9 percent of the posts are people telling the author of the question that he is stupid, lacks intellectual ability, must be a high school drop out, or has some bastardized sexual persuasion that prevents his router from working.
As you say, it could be an unrelated issue that resetting the state machine fixes. In this case though I guess I superior device could do this on its own.
Re:The most likely reason (Score:3, Interesting)
Sometimes comcast flips my IP and the modem can't keep up with it.
Re:The most likely reason (Score:3, Interesting)
I have a Netgear WNR834B and have never had to reboot it. I really don't know what we're doing right, but the damn thing just works, wired or wireless. Our old Linksys WRT54G worked pretty well; we gave that to my in-laws and it's been good to them, too.
Come to think of it, we had a cheap-assed Dell wireless router that worked ok, too.
Do other people generally have to screw around with their networks a lot?
Re:The most likely reason (Score:3, Interesting)
I used to have that problem, but DD-WRT on my WRT54GL fixed it. I can run torrents day and night, tons of connections, and it never gets upset. It tends to run out of memory like you said, it tries to manage state incorrectly or something, the connections don't time out soon enough.
If you have an older WRT54G (pre v4), you can just load DD-WRT, or I'd highly recommend the investment in a WRT54GL so you can run DD-WRT.
Re:The most likely reason (Score:3, Interesting)
Re:The most likely reason (Score:2, Interesting)
Re:The most likely reason (Score:2, Interesting)
Re:The most likely reason (Score:3, Interesting)
I have a WRT54G v8 here as well, and I don't think I've had to reboot the thing since around the first of the year (2008). Very stable, works just fine with Linux, WinXP, Win2k, Win95 OSR2, OS/2 Warp 4, eCS, and my Nokia 770's running OS2006. w00t! :-)
Re:The most likely reason (Score:3, Interesting)
It required periodic reboots, which I eventually narrowed down to being most likely router DNS table problems. Now, we are using a Zyxel wireless router provided by our new ISP, on a much better network (real switches, a rack, everything).
Yeah, it's pretty much a consumer grade router on a pro-grade setup but it does the job of being a WAP and a firewall, and hasn't been flaking out. I'll take it.
Re:The most likely reason (Score:5, Interesting)
Is that OpenBSD on a 12W device that sits silently on a shelf?
Personally I prefer to use a decent modem. I have a SpeedTouch DSL modem that seems to be more functional than most consumer routers, as well as being one of the more stable modems I've used on a marginal line. I connect my wireless devices to my network just on the switch side (use them as wireless access points and not routers). Very stable set up.
Linksys WRT54GS v6 crappiness solved, sorta (Score:2, Interesting)
I have to agree, the current Linksys routers are LOUSY. I have a WRT54GS v6 that came with VxWorks and I've installed DD-WRT micro on. In both OSes it was crap -- Wi-Fi randomly dropping out, occasional crashes. It was especially bad on hot days and during heavy network traffic.
Apparently the Broadcom chip inside it was overheating. I ticky-tackied a PC fan to the table next to the router and powered it with a GameCube power brick (12v DC). The problem went away almost entirely, leaving me with a reliable but somewhat noisy router.
Later, I opened the router and placed an old heatsink off a Pentium on the offending chip (run it a while, see which one is hot), and used a piece of plastic wedged into the router's shell to press the heatsink down on the chip. The heatsink had some of that heat-conductive foam glue stuff some OEMs stick it to the CPU with on the bottom. Now (almost a year later) I have no fan next to it and it hasn't crashed or dropped the network yet.
I'm still stuck in the wimpy v6 flash and RAM though...
Re:The most likely reason (Score:3, Interesting)
Mine isn't, but it could be: http://www.soekris.com/ [soekris.com]
Re:The most likely reason (Score:3, Interesting)
Bottom line is that after three hard drive failures in the course of a little over a month (yes, I have a third Seagate drive misbehaving massively, randomly corrupting data)
Are you /sure/ your power supply is sufficient and your drive(s) are sufficiently cooled?
Re:The most likely reason (Score:3, Interesting)
Re:The most likely reason (Score:3, Interesting)