Teach Your Router New Tricks With DD-WRT

Today's Best Tech Deals

Picked by PCWorld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

1 2 Page 2
Page 2 of 2

Flashing a Router With DD-WRT

If you've picked up a router preloaded with DD-WRT, find out which version of the DD-WRT firmware it's currently running and see if it needs updating. If you're using a router that has a DD-WRT build supplied by the manufacturer, look for an update from the manufacturer first. The manufacturer may have hardware-specific adaptations of DD-WRT that you can't find anywhere else, or (like Buffalo) it may have firmware that is encrypted and can run only on that router.

The exact way to check if you need an update varies between routers, but the short version goes something like this:

  • In the router's manual, look up how to access the router's properties/administration pages. This usually involves connecting to a local address (for example, via a Web browser.
  • Look there for the revision number of the loaded firmware. This might be listed either as a build number (say, 14998), a date (May 25, 2011), or both at once.
  • Go to the router manufacturer's website and look up the download page for that exact model of router. Router manufacturers often use abominably confusing naming conventions, so read carefully and look for all the details you can. For instance, Actiontec's MI424WR router comes in three hardware flavors: revisions A, C, and D. The most definitive way to find out which router hardware you have to is to check the underside or the back, and look for a label that describes the model number.
  • Check the date on the firmware available for that router against the firmware already loaded. If the available firmware is newer than the preloaded firmware, it's time to upgrade.

The process for flashing a router with DD-WRT firmware will depend on whether the manufacturer supports DD-WRT directly. If so, you can simply download and flash the firmware they provide. The DD-WRT firmware's management page includes a Web interface for uploading and automatically flashing the router, so the process is little more than a couple of clicks. Just make sure you're feeding the router the correct firmware file. Also, if there's an option to reset the router to its default settings, use that to make sure no legacy settings are lingering and might create initialization problems.

If the manufacturer does not support DD-WRT, you'll need to look up your router in the DD-WRT wiki and hunt for specific instructions on how to do this. Here things can get complicated. Some devices require a "TFTP flash" technique, where you connect to the router via the network and use a Trivial File Transfer Protocol client to upload the firmware. Or consider the flashing directions for the D-Link DIR-615 Rev. C [26] router, which requires some hackwork involving a hex editor on the firmware image. Those who have no fear of a command line and can follow directions closely shouldn't have a problem with the more advanced flashing techniques. If you don't count yourself in that category, you're best off either getting a local guru to do it for you or, once again, dropping the money on a router that has DD-WRT out of the box.

A number of routers -- such as my Buffalo AirStation -- ship with the manufacturer's own, customized version of DD-WRT, in which case you can update the firmware via DD-WRT's Web interface. Be sure the "After flashing, reset to default settings" option is enabled.

Recovering From a Bad Flash

Occasionally, a flashing attempt goes bad, leaving the router "bricked" -- it seems to be starting up, but otherwise doesn't provide network access and the management pages are unreachable. Another common symptom: The power light on the front panel of the router flashes nonstop.

Fortunately, a flash problem is rare, and there are ways to recover from it. The first thing to do is try a hard reset, or a "30/30/30" as the DD-WRT folks call it:

  1. Unplug the router from the network (but not the power) and hold the hardware reset button for 30 seconds.
  2. Keep the reset button held down and remove the power cord for 30 seconds.
  3. Plug the power back in and keep holding reset for 30 seconds.
  4. Let go of the reset button and unplug the power one last time for a minute or so. Restore power.

This resets the router to its factory default state, which is sometimes needed to get it to boot properly after a flash. If that doesn't work, then you'll need to look into one of the more advanced recovery procedures listed on the DD-WRT wiki. These include recovering via TFTP (as mentioned above) or using a JTAG cable -- a physical cable connected directly to the router -- for repair. If that sounds hairy, it is. JTAG involves hardware hacking, so is probably best suited for the hardcore and those who have absolutely no other choice. A truly wizardly DD-WRT hacker may also add his own boot logic (such as Micro Redboot), especially if he plans on trying out a variety of different firmwares.

DD-WRT Features and Functions

Once you have your DD-WRT router booted up and configured, log into the router's administration page (be sure to change the default password!) and find out which features your router supports. A full breakdown of all the features in DD-WRT would require a book and might well be redundant since many of the features are common to most routers. However, here's a sampling of features included with DD-WRT but that might not be present on other routers you've worked with. (Note that not all routers support these options.)

  • AOSS. Short for AirStation One-Touch Secure System, AOSS is supported in some clients and routers (they'll have some statement to the effect in their documentation). If your router supports it, you'll be able to press a button on the face of the device to allow an AOSS-enabled client to connect without the need for a password. Many portable game consoles, like Sony's PSP, use AOSS.
  • Boot wait. When enabled, the router pauses for five seconds at boot time to allow the user to connect remotely and flash a new firmware if the current one is bricked. Leave this on, as you never know when it'll be useful -- and what's five measly seconds out of a reboot cycle?
  • Logging. DD-WRT can maintain running logs of its most crucial events and behaviors. The log can either be kept locally or be written to a remote IP address that has a syslog daemon listening on the appropriate port. This can be left off by default, but it's useful to toggle it on if you need to do any detailed troubleshooting (for instance, to find out if some specific action is messing things up).
  • NTP client. With this, you can specify a remote timeserver that the router will use to synchronize its own clock. This is a good idea generally, since it saves you the trouble of having to set the clock by hand, and it allows for more accurate deployment of scheduled reboots (see below).
  • Overclocking. Some routers support the ability to overclock, or they run the CPU faster than the manufacturer normally recommends. There are few cases where this is needed, especially since overclocking any hardware often leads to instability.
  • Scheduled reboot. You can force the router to reset itself at a given time of day, after a certain interval, or on a specific day of the week. Some claim this improves performance, although in my own experience it doesn't seem to make much difference. The documentation (linked above) shows you how to do this via a command line, but some builds -- including the one in my Buffalo router -- let you set this in the GUI under Administration/Keep Alive. Note that in order to use this, you'll need to enable the Cron option as well.
  • Telnet. The telnet daemon should be running if you plan on connecting via telnet to perform administration (such as to manually flash new firmware). If you're worried about the security implications of leaving telnet running, you can shut it off until you need it.
  • Trasmit power and antenna gain. These let you control the power to the wireless antenna and the amount of gain or "focus" used to single out weaker signals. Most of the time these options should be left as-is -- especially if they're already specified by your router's manufacturer in its DD-WRT stock firmware -- but you can experiment with the gain function to see if it improves reception in your environment. Note that raising transmit power can cause some routers to overheat, so don't fool with it and then forget about it.
  • Watchdog. If enabled, the router will attempt to ping other computers regularly and will reboot itself if it doesn't receive a response. This should not normally be needed, but it can be useful if you have a flaky network gateway. Just be sure to use sane intervals for the pings -- anything less than five minutes is probably overkill -- and make sure you're pinging something whose inaccessibility will be a sure sign of trouble (Google, for instance, or your ISP's home page).

Last Words for the DD-WRT User

Once you have things running the way you want, keep a few final details in mind for smooth sailing in the future:

Back up your router settings every so often. DD-WRT lets you save your router's settings to a file that can be stored on a PC, then reloaded into the router if needed. If you make a lot of elaborate custom settings -- port forwardings, for instance -- and then have to do a 30/30/30 reset, it's good to have all that stuff backed up so that you don't have to manually punch it in again.

Set passwords. Not just for your wireless connection -- and be sure to use WPA2 if your clients can support it -- but also for the administration panel itself. Pick a different username and password for the admin panel than the out-of-the-box settings, as both are trivially easy to crack if you leave them as-is.

Check for updates about once a month. Bookmark the page where your router has updates posted and check it every so often for new versions of the firmware. There's not much point in using DD-WRT if you're not keeping it current.

Finally, if it ain't broke, don't fix it. This may sound counterintuitive, but if your main reason for picking up a DD-WRT-powered router is stability and functionality, don't shoot yourself in the foot by tinkering with it too much. For the most part, DD-WRT should work with the default settings, especially if it's provided out of the box with your new router.

Of course, if you're using DD-WRT explicitly in order to tinker with it, that's another story!

This article, "Teach your router new tricks with DD-WRT," was originally published atInfoWorld.com. Follow the latest developments in networking and open source at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.

Read more about networking in InfoWorld's Networking Channel.

This story, "Teach Your Router New Tricks With DD-WRT" was originally published by InfoWorld.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
1 2 Page 2
Page 2 of 2
Shop Tech Products at Amazon