How to setup a wireless router with DD-WRT firmware
After 2 years of using wireless broadband, I decided to sign up for a naked ADSL2+ service.
I would need at least a modem for the connection and I figure these are the minimum features I must have:
- Wireless support for my Dell Vostro notebook, Norah’s Dell Netbook, 2 of our iphones and not forgetting my trusty Dell Axim X51V PDA. Wireless N is desirable but I will make do with Wireless G if required.
- Wireless USB printer support for my Dell 1133 All-in-One printer/scanner combo.
- Solid stability as I intend to run 24/7.
- Hardware must be cheap and cheerful.
I thought it is a good idea to list down all the steps involved so that if I do forget how I setup the whole thing next time, I can always refer to this page again. I am also inclined to think that some of this info may be useful to some of my friends here.
First off, let me list down all the helpful documentation on the internet and give credits where credits due.
- These are the most important website that you must visit
- http://www.polarcloud.com/tomato – maker of the Tomato firmware – another good choice of firmware.
- This is another good info for setting up the ASUS router.
In a nutshell, I am going to get a broadcom based modem for the ADSL connection to the ISP, run it in bridge mode in conjunction with a wireless router which I am going to “jailbreak” to install the DD-WRT firmware. The DD-WRT firmware is extremely powerful and just like a friend used to tell me an iphone is useless without jailbreaking, so is a modem without DD-WRT firmware. Tomato is another variant of the firmware and is just as good. The preference is individual.
These are the hardware I gathered for the setup.
1. TP-Link TD-8840 ADSL2+ modem from MSY for A$45.
I suppose I can get the TD-8810 modem instead of the TD-8840. The advantage of the TD-8840 is that it has 4 output LAN ports whereas the TD-8810 only has 1. The additional LAN ports allows you to use another PC to connect to the modem after you put it in bridge mode. Without the additional LAN port, you will not be able to browse directly to the TP-Link web interface without unplugging the only network link to the router (at least not that I know of). The 8840 is only 10 bucks more expensive than the cheaper 8810.
2. ASUS WL-520GU wireless router with USB print server from MWave for A$50. Delivery charge is A$16.66 in my case.
I could have gotten the legendary Linksys WRT-54GL but this model does not have USB support built-in and I finally ended up with the ASUS WL-520GU which is also a fine router.
3. Some network cables and phone cables.
First Baby Step
First, connect up the TP-Link modem as you normally would. Connect a network cable from the modem to one of the PC. In the web browser, browse to 192.168.1.0.1, login using admin/admin and go to “Quick Setup” on the left panel of the user interface. Input the VPI and VCI values into the box. These values are typically provided by the ISP. The values I used are: VPI = 8, VCI = 35. For connection type, select “PPPoE” for now. Put in the PPP username and password (all of these should be supplied by the ISP). Verify that the modem is actually functioning by plugging a PC into one of the LAN ports.
After this is done, we can put the ASUS into the equation. Connect the ASUS to the TP-Link. Setup the router as you normally would and make sure DHCP server is enabled. Set the WAN IP address as static IP and 192.168.0.11. (again, the choice of IP address is personal). Set the LAN IP address to 192.168.1.1 and gateway address also to 192.168.1.1. Now plug the PC into the ASUS and check if we can access the internet. If everything is working perfectly as it should, we can start the serious modding now.
These are the ingredients you must download from the net to effect the change of firmware for the ASUS.
- Go to DD-WRT website, navigate to “Downloads”, type in “ASUS” in the search term and navigate to WL520GU. Click on the link and a list of firmwares will now appear. We only need 2 of these firmwares. First off, download the “Special ASUS Firmware” named “dd-wrt.v24_mini_asus.trx”. Save this file into a folder. Next we need to download the “Standard Generic” firmware named “dd-wrt.v24_usb_generic.bin”. Save this file into the same folder.
- Then we need a SSH/Telnet client handy. PuTTY is a fine SSH client and I have been using it for years. You can grab this here -> http://www.chiark.greenend.org.uk/~sgtatham/putty/
- Finally, we need the ASUS firmware restoration utility and this can be found on the CD that comes with the router.
Now we have all the files we need.
Learning to Fly
One of the website suggest that we first set the IP address of the PC to static. I think this is a fine idea. So let’s do it. I set my PC to an IP of 192.168.1.111. Leave the gateway and DNS IP address empty for now. We are now ready to flash.
First we have to unplug the power cable to the router. Start up the ASUS firmware restoration utility and navigate to find the “dd-wrt.v24_mini_asus.trx” firmware. Do not flash first. Look at the back of the modem and we will find a black reset button. Press this button and re-connect the power cable to the router at the same time. The power icon on the ASUS router will flash and this simply means that the router is now put into recovery mode. We can now release the reset button and start the flashing. Press the “upload” button and the DD-WRT firmware will be flashed to the ASUS. This takes about 1 min (actually less i think) in my case. When this is done, browse to 192.168.1.1 and the user interface should now change from the default ASUS one to the cool DD-WRT one. Now setup the username and password again. I use admin as username and password respectively.
Now we can further upgrade the firmware to one with USB support. Browse to DD-WRT interface and under “Administration” click on “Firmware Management”. Select the firmware “dd-wrt.v24_usb_generic.bin” and flash away. The firmware upgrade of the ASUS is now complete. Now change the IP address on the PC to dynamic again.
Bridging the Modem
We can now proceed to the next step where we put the TP-LINK in bridge mode in conjunction with the ASUS router. Basically what this does is that the modem will no longer be responsible to dial up to the ISP. The ASUS router will resume this responsibility. Now we need to login to the TP-Link’s web interface again. Without disconnecting the primary PC from the ASUS router, I use another notebook to plug into one of the spare ports on the TP-Link. See? The additional ports on the TP-LINK is extremely useful in this case.
Navigate to Quick Setup again and under Connection Type, select “Bridging” with encapsulation mode type “LLC/Snap-Bridging”. That’s it. Save the settings and reboot the modem.
On the primary PC, browse to 192.168.1.1 again to enter the DD-WRT web interface. Under “Setup”, navigate to “WAN Setup” and input the username and password associated with the ISP. Make sure that connection type is changed to PPPoE. There are plenty of other settings to play around to suit specific network requirements. Finally, save and reboot the ASUS modem and check if internet can be assessed normally.
We are basically done here. I have not figure out the setting of the USB print server yet so I will leave this to another day.
This is how my network look like now:
USB Print Server Support
updated 25th July 2010
The steps to enable JFFS through the router web page are very specific. To avoid having to reset and reprogram your router, it’s smart to make a backup here of your settings. If you follow these steps exactly, it should not lock up.
- On the router web page click on Administration.
- Scroll down until you see JFFS2 Support section.
- Click Enable JFFS.
- Click Save.
- Wait couple seconds, then click Apply.
- Wait again. Go back to the Enable JFFS section, and enable Clean JFFS.
- Do not click “Save”. Click Apply instead.
The router formats the available space.
- Wait till you get the web-GUI back, then disable “Clean JFFS” again.
- Click “Save”.
- It may be wise to Reboot the router, just to make sure
Note: Be sure to create a new printer. Do not modify an existing one.
For whatever reasons, Windows 7 is unable to detect the Dell printer connected to the router. So I started to troubleshoot. I started by issuing a “/watchprinter” command at the /jffs directory. It gives an error message saying that the print server cannot be found. It ends up that the P910nd print daemon cannot be found on the router itself so I suspected that the file wasn’t saved properly in the first place.
I went back to /jffs/tmp directory and issue the wget command again to download again the P910nd daemon. After the download completes, I verify that the file is indeed there by issuing a ls command. Now I install the daemon again.
To make sure that the daemon is installed correctly, I issued the command /watchprinter again on the router. This time there is no error messages and I presumed everything is working fine.