firmware - Why do routers sometimes need to be restarted manually?

07
2014-04
  • Vorac

    Every time I call my ISP with the complaint

    I don't have internet access.

    , they ask me

    Did you unplug the router, wait a couple of minutes and plug it in power again?

    What I cannot understand is why isn't the firmware already doing that for me. It aught to be easy as pie to ping e.g. google every 60 seconds, and on failure, initiate system reset. Do this 3 times in a row, then give up and inform the user of self-diagnostics results.

    Furthermore, in my experience, firmware development benefits heavily from assert() calls, peppered throughout the code. Those usually hang the device (while(1);) during development, in order to point the developers to the problem. Why not do a quick log message and then gracefully reboot, when an aseert() blows at run-time? Routers are soft-realtime machines, so some downtime in the name of fault tolerance (the user doesn't need to restart the router from the power adapter like some kind of savage) would be worthwhile.

    Why is manually restarting a router still such an often needed task?

  • Answers
  • Locutus

    Because it's substandard hardware & software that doesn't handle all failure conditions such as voltage spikes, abrupt link failures or memory leaks. A real router like a Cisco or Juniper will never require a reboot in it's lifetime unless you encounter a rare bug.

  • Chenmunka

    As often as not this is not a fault in the router per se but in the ADSL/Cable modem side.

    It can happen that spikes on the line can cause the modem to go into a lock state such that communications fail. This is why your ISP asks the old chestnut of switch it off and on again. Voltage spikes on the line can be caused my many things, including lightning in the area or faulty connections in the public network. If you are getting a lot of disconnections then it sounds like a dodgy link.

    Most professional grade routers will have some kind of link monitoring within them and will restart locked links. I have written such monitoring into a number of systems over the years. Most domestic grade equipment does not for the reason of cost. They are simply made cheaper - they do not have the ability for the software to pulse the reset pin of the UART or other line driver chip.

    Incidentally, you only need to try to contact the next device along your route. If all the routers in the world pinged someone like Google every couple of minutes, Google would become very upset.


  • Related Question

    What firmware should I use on my router?
  • Questioner

    I've got a Linksys something or other router. I've never had any issues with the default firmware but have always wondered what I'm missing out on by not changing to a 3rd party more configurable firmware.

    What should I consider changing to? What does I gain by switching to it?


  • Related Answers
  • ricbax

    Another alternative: DD-WRT:

    DD-WRT is a Linux based alternative OpenSource firmware suitable for a great variety of WLAN routers and embedded systems. The main emphasis lies on providing the easiest possible handling while at the same time supporting a great number of functionalities within the framework of the respective hardware platform used.

  • Mad Fish

    You can try OpenWRT. It supports a broad range of hardware and has many packages in a repo. It feels like a solid Linux system. There is also a good web configuration interface available.

    I'm using it and think that it is very nice.

  • John T

    I'd recommend Tomato if your router is supported. It's great for a beginner and the interface is fairly easy to navigate and understand. It gives you a bunch of great features.

    To list a few:

    • manage aspects of the router through cron jobs
    • block certain packets based on headers (block flash, java applets, etc)
    • real-time bandwidth monitoring
    • more detailed QoS (set download and upload speeds rather than just prioritizing)
  • Area 51

    I would recommend DD-WRT as well.

    Just note, depending on which version your router is will affect your experience. I've used it on the "gimped" versions (WRT54G v.6+) and IMO it still works great, but the process of installing it is a bit more complicated and the risk for bricking your router is higher.

    Here is a great tutorial on dealing with the complexities of these versions..