Showing posts with label DD-WRT Router. Show all posts
Showing posts with label DD-WRT Router. Show all posts

Sunday, April 28, 2013

How to install the DD-WRT firmare?

Installing DD-WRT on a router in most cases is almost as simple as installing a program onto your computer. However, doing it incorrectly can leave you with a router that you have to throw away. Installing programs on a router, known as firmware, are achieved by a method called flashing. This article helps you determine which installation process is for you on your supported router, as well as giving router suggestions and information about flashing each one.

Choosing the Correct Firmware - Extremely Important


Is Your Router Supported?

Please check the routerdatabase first: http://www.dd-wrt.com/site/support/router-database
If your router is not listed there, check the wiki page.
For a list of devices working with DD-WRT, please see wiki page Supported Devices.
For a list of devices not working with DD-WRT please see wiki page Known incompatible devices.
If your device is supported, you may find specific information in the Hardware-specific page for your router. However, to avoid Bricking your router, please finish reading this entire page first. You will then want to follow what is written for your particular device.

Before You Download, Upgrade, or Flash

Before you try to take any actions, including loading any firmware to your router....read the English Broadcom Forum Announcement entitled Peacock Thread It contains more information than just for those who are having problems. Unfortunately, skipping this step leads many to brick (break) their routers.
Start there... do some research... then ask questions. Don't just load V24-Final or SP1. (Read the English Broadcom Forum Announcements referenced above to find out why). The user-friendly dd-wrt download page [[1]] will help you identify the correct "killer" and dd-wrt firmware versions (as applicable) for your device as needed. However, you must use the peacock thread and use the information in the Hardware-specific page to accurately identify your hardware and not create a problem that renders your router useless.
After you have read THIS page, and gotten some background on the peacock page, the Hardware-specific page may be the most useful page for you in terms of identifying your router, figuring out what files you need to download (including instructions), and figuring out the correct installation procedures.

Identifying Your DD-WRT Firmware

  • Use the brand-specific information in the Hardware-specific page to accurately identify which model you have. Start with the main brand heading (ie, "Linksys"). Use that information - instead of just going by what model you think you have - clock.
  • As the peacock thread mentions, using the incorrect file is one of the worst things you can do. Fortunately, dd-wrt has simplified this immensely with their search format. Once you have identified your router accurately, you may be able to go straight to DD-WRT Downloads page (or secure version) and find the files you need. Again, check the Hardware-specific page for links to detailed instructions that may indicate how many files you need, etc (- clock).
  • Some newer routers are not supported by the latest stable release. Check the Supported Devices list for the minimum required DD-WRT version for your device. You may need to use an SVN or experimental build.
    • For a comparison of the builds, see File Versions.
    • Updating through the Web GUI (ie, the routers's online interface) means you need to use the _generic version.
    • Use the _mini version when upgrading from original Linksys firmware. You need the _micro version if your hardware has 2 MB of flash (WRT54G v5 through v8 for instance). Use the "_mini" firmware if your hardware has 4 MB or more of flash (WRT54GL for instance). The maximum filesizes in Bytes are listed here under Maximum firmware size. (Again, use the download page's search function for help here - clock).
  • Read the changelog and all other information files on the download pages. They contain important information!

Downloading Your DD-WRT Firmware

  • You will need to save a number of files (firmware, instruction pages for offline work, etc). Starting a folder for this project before downloading anything is advisable - clock.
  • Ensure you are using the correct version of the firmware (again, the search function on the download page above should be accurate if took appropriate action to correctly identify your router; only download firmware from that page - clock).
  • Download the latest stable release from the DD-WRT Downloads page (or secure version).
  • Depending on your specific needs, you may need more than one download - such as a "killer" version, which must be installed prior to the dd-wrt firmware. The search function should bring up both. If instructions are provided for your router in the Hardware-specific page, check that to see what is needed. Again, the peacock thread will give you important information on why choosing the wrong size can completely break your router - clock).
  • If you downloaded a .zip file, then extract the archive. (If it is a .bin file, leave it alone - clock).
  • Confirm a good download by comparing the MD5 hash fingerprint of the firmware you downloaded with the published checksums. See Hashes & Checksums for further info and instructions.

Precautions

If you do not already have a dd-wrt firmware version on your router, you may have to run a "kill" firmware program on your router first. You should be able to find this using the search function (dd-wrt download page [[2]]) for your specific device. The process of installing that firmware is probably covered in the Hardware-specific page under your device. It will be similar to simply repeating the overall processes outlined below for that specific "kill" file - clock.
The most important aspect of this section to absorb is the precautions. People kill routers constantly by not following these advisories. Please take the time to learn and absorb them - clock. Follow all the instructions precisely, or you may run into trouble. Incorrectly flashing can brick your router!

Do Prior Research

clock:
  1. Failing to prepare and do your background research can cause considerable frustration, loss of time, and render your router absolutely useless (bricked). In other words, you may have to literally throw it away. With an hour or so of research, you'll save hours of time in frustration.
  2. Before you begin, it is recommended that you look through this wiki (particularly these precautions). Also, the notorious peacock thread [3], and basic techniques such as Hard_reset_or_30/30/30 and Tftp [4]. See Settings for more useful information. These may have some sections in some pages that are not relevant, which you can skim.
  3. You will need to review many of the recommended sites to download below. You'll want to save this page (see below), but you will want to get the background first. Be careful about implementation (actually flashing) on this wiki as compared to what is recommended as a guide for your router under Hardware-specific. However, reviewing this wiki will be important. 

    General

  1. Do not try to skimp on the Hard_reset_or_30/30/30 reset before or after each change to your router's firmware. The peacock thread goes into extensive justifications. (clock used a stopwatch.) Be sure to follow all power cycling and reset instructions as described.
  2. For the initial flash from the Linksys firmware, do not use Firefox; use IE to flash the router (even OS X IE works). Once DD-WRT is running, you can use any browser you like to administer or even flash the router.
  3. Do NOT flash your firmware over an SSL (HTTPS) connection. Make sure you are using HTTP.

Prepare to Go Offline

  1. You will not have internet access through the router during the process of replacing the firmware. You are going to do almost everything offline with a LAN connection to your router (how to Disable your wireless). Given the many types of problems you can encounter that can prohibit you from getting help, the process of reactivating and deactivating your security settings if you actually can get back online, and the likelihood for browser crashes if you try to just keep the pages up, you will need to download everything you need before you start. This will allow you to review the information offline in the event that something goes wrong.
  2. Some users, such as those running Windows Vista, may need to Disable Compound TCP - clock).
  3. Do not forget to make note of your current settings, especially if you have static IP addresses. A quick way of doing this is to take screenshots of your current configuration screens (which can be found on your web GUI, or online router interface - clock).
    1. It can be essential to record your current WAN MAC address. Some ISPs do not allow an immediate change of the routing hardware and changing the firmware changes the MAC address. (You may also find these on your web GUI - clock).
  4. Have a secondary router or internet connection available while experimenting with your router's firmware, to expedite any trouble shooting and remove the risk of becoming stranded.
    1. If you have a cable modem which connects to your router with ethernet, you can plug your PC straight into the modem should you have any problems. Your PC will be assigned your external IP with DHCP, and you will be on the net. Remember to use a software firewall.
  5. We recommend you save the following series of pages to your hard drive (use File->Save As, *NOT* a bookmark). (Make sure to save all webpages as HTML. Do not save as compressed html files (some computers default to that.) Here are the websites to save: (-clock)
    • The installation page for your specific router as found though the Hardware-specific page.
    • The peacock thread [5].
    • This wiki [6].
    • Recover from a Bad Flash.
    • FAQs [7]
    • Tftp Flash instruction [8] if applicable. It describes how you may have to enable Tftp, which is very quick and easy (just one check box). You may need to be prepared to use Tftp even if you do not plan to use it.
    • The Wikipedia instructions for Compound TCP, if applicable (Vista, etc), available at: [9].
  6. In addition, you will probably also need:
    • The Tftp.exe file, if applicable (execute it from the Tftp [10] link above, and just leave it open).
    • First ("killer") flash file, if applicable.
    • Second (DD-WRT) flash file. (In some cases, this may be the only file you need.)

Going Offline/Before Implementation

  1. Do NOT use a wireless connection to upload firmware. Use a wired (LAN) connection.
  2. Disable any wireless adapters (see the right way to do it) on your system to ensure that none are used for the transfer.
  3. AFTER you are offline, disable your anti-virus-software, as as a false-positive virus detection could interrupt the upload. Disable all firewalls and security (here are instructions to Disable Security. Especially if you need to use TFTP to upload firmware, disable your software firewall first. (Restore before you go back online, something your browser may automatically prompt you to do.)

"Flashing" Your Router with DD-WRT Firmware

Below, three methods of flashing will be covered: using your router's online interface (#Method 1: Flashing with Web GUI); #Method 2: Flashing with TFTP; and #Method 3: Flashing with Command Line. Your router may dictate what you use. After reading this page, please see the Hardware-specific instructions to clarify what is best for your router - clock.

Method 1: Flashing with Web GUI

The following instructions are very general and apply mostly to Linksys routers. Check for hardware-specific instructions in the Hardware-specific page.
  1. Reset your router
    1. Use Hard reset or 30/30/30.
    2. While not as preferable (this may cause problems down the line) you can reset to Factory Defaults instead.
      1. If you do decide to restore defaults, if you do not know the IP address, username, or password of your router, you will need to use the reset button (this does not appear to be referring to a Hard reset or 30/30/30; this appears to be referring to a simple 30-second reset - clock). Be careful when using this method! Apparently if you have OpenWRT already on your router the reset button may not function as it is assumed here and may actually brick your router! Research the functionality of your current firmware to be safe.)
      2. Again, if you decide to restore defaults, if you already have a version of dd-wrt installed, and you know the IP address, username, or password of your router, you can use this method (other routers may require different instructions):
        • Follow the instructions in the next section to log in to the Web GUI.
        • Click the "Administration" tab.
        • Click the "Factory Defaults" sub-tab.
        • Select "Yes".
        • Click the "Save Settings" button.
        • A new page will open, click "continue".)
  2. Log on to the Web GUI (if you have not done so already).
    1. To use the Web interface, you will need to have Javascript enabled with any security restrictions disabled. Some versions of the Linksys firmware Web GUI have trouble with different browsers (some don't work with Firefox, some don't work with Safari). If the Web GUI is giving errors, try switching to a different browser.
    2. Type in the IP address of the router (typically, the default is 192.168.1.1, especially with Linksys) into the address bar of your browser. (If you do not know the router IP address, you can attempt to obtain it).
    3. You will be prompted for username and password. (If your router already has a DD-WRT versions starting with 2006-Feb-28, the default username is root. Prior versions have a blank username by default. For Linksys firmware, the default username can be left blank or set to anything. For both DD-WRT and Linksys firmware, the default password is admin. Search online for other defaults on other routers).
  3. Upload the Firmware.
    1. WARNING:It is VERY important that you not interrupt the setup while the router is being flashed and rebooted. Do not turn off the computer, close the web browser, or turn off the router during this process! (I usually just take a step back, and turn my head away so I don't breathe on it for these crucial 2 minutes).
    2. This section is written for a dd-wrt web GUI. Your router's GUI's operations may be different. Please see the previous comment about the possible need for "kill" firmware before your dd-wrt installation. This section may not work for your router as written. Please see the Hardware-specific section for information on your specific router's needs.
      1. First do a hard reset on the unit that DD-WRT is to be loaded onto.
      2. You should be in the Web GUI of the router. Go there now (as discussed above).
      3. Click the "Administration" tab
      4. Click the "Firmware Upgrade" sub-tab.
      5. (Only applicable when DD-WRT is already installed.) Choose the option to Reset to Defaults after flashing.
      6. Click the "Browse" button and select the DD-WRT .bin file you downloaded and confirmed.
      7. Click the "Upgrade" button.
      8. The router will take a few minutes to upload the file and flash the firmware. During this time, the power light will flash.
      9. A new page will open confirming that the upload was successful (Installation#Possible errors if not). Now wait about 5 minutes before clicking "Continue".
      10. Lastly, do another hard reset on the unit.
      11. If flashed successfully you will now be able to access the DD-WRT web interface at 192.168.1.1 (again, that is default for most Linksys, etc routers; does not apply to all routers. Check your router's IP before you start this process - clock).
  4. Possible Errors with Uploading Firmware
    1. [Comment added 2007/03/27 by staylor] Or, you won't be at the DD-WRT web interface I have a WRT54g v1.1 (also with WRT54gl v1.1), flashing with DD-WRT v23 sp2. I waited the requisite number of minutes, and my "Wireless-G" badge lit up (a good sign), but when I clicked "Continue" after the upload was successful, I did not get to the DD-WRT web interface. Nor was the device ping-able.
    2. [Comment added 1/04/08 by jwebste1] I can confirm Staylor's comment above for a brand new store bought WRT350N (had to soft reset the router to get the mini install to become accessible on 192.168.1.1. Holding down the reset button for 30 seconds (leaving the power cable connected) re-booted the router, and all was fine thereafter. If the above doesn't result in a successful load of the DD-WRT web interface, try a "ipconfig -renew" in a command prompt window.
    3. [Comment added 12/22/09 by clock] After initially attempting the install of the "kill" file for my router (as described in my router's Hardware-specific section) my browser kept providing an error message. Finally, I thought the router had been bricked. A quick look at the peacock thread showed that pinging the router and receiving a TTL of 100 meant that, while the router appeared broken, it was ready for the installation of the dd-wrt .bin file for my router. Using the tftp.exe discussed at the peacock and at [[11]], I was able to install the dd-wrt firmware without much more fuss.
    4. Again, the best method is to look first at your Hardware-specific guidelines and refer to those instructions, keeping in mind the #Precautions outlined above.
    5. During the firmware upload process, if your router says something similar to, "Upload Failed," you may be using the wrong version of DD-WRT. This may occur through the web GUI if you use a *wrt54g.bin version when you should have selected the generic version instead. It may also be that your router requires the mini version to be flashed before the full version. Be sure to double check to make sure you have the right version (as described in the first section of this page - clock). If you are certain that your router is supported and that you have the correct firmware, you may simply need to use a different web browser (e.g. from Firefox to Internet Explorer).
    6. After clicking Upgrade when upgrading firmware from one DD-WRT version to another, if you are using Firefox there may be a problem with the upload. In this instance the screen fades to white with a countdown timer and is followed by a Connection Reset message shortly after. After this you cannot access the Web GUI again, and a router reboot will result in a flashing power light (WRT54GL is the case in point). You can recover from this and use a different browser (e.g. Internet Explorer) to upload the firmware.
    7. If logging in fails with the default username/password, you can reset the password with a Reset And Reboot.
  5. Reset Again
    1. You can use Hard reset or 30/30/30 again. Do this only after you have confirmed that the firmware upgrade is working. At this point you may have temporary problems using Web Interface, so just ping your router.
    2. Many Web Interface problems can be solved by a hard reset and by clearing your browser cache.
    3. See Reset And Reboot.

Method 2: Flashing with TFTP

TFTP is generally a safe method to flash many routers. However, it is not preferred method for flashing most devices. In the Hardware-specific section you may be advised to use this method if it is the preferred or only method for your brand or type of device. Normally, the GUI flashing method should be used, as it is adequate for the vast majority of standard situations, but refer to the Hardware-specific section to be sure.
Tftp is easy: if often requires one quick box uncheck and a quick click - then you are good to go. It is great for instances when web GUI malfunctions or the router appears to be (but is not) bricked - clock.
If you still wish to flash with TFTP, see the articles TFTP flash, Asus TFTP Flash and Recovering with TFTP.

Method 3: Flashing with Command Line

This is only available on routers that already have DD-WRT installed and Telnet/SSH enabled. It is the *ONLY* recommended method to upgrade the router wirelessly because the file is transferred from the DD-WRT servers to the router and the checksum is verified to ensure that the file is not corrupt. Other flashing methods transfer the file from your PC to the router (which would go over the wireless which is not as reliable) and do nothing to verify that the file is not corrupted.
Telnet or ssh into DD-WRT.
Download the firmware to the router's /tmp directory with wget or scp.
cd /tmp
wget http://www.dd-wrt.com/dd-wrtv2/downloads/stable/dd-wrt.v2x_generic.bin
Alternatively, you could use the mounted share if you have one, and simply download the file there.
Compare the MD5 checksum of the original and the downloaded file.
md5sum dd-wrt.v2x_generic.bin
Write the firmware to flash.
write dd-wrt.v2x_generic.bin linux
Wait...
Reboot
Restore factory defaults using erase nvram command or reset button

Other Notes


Upgrading to a Newer Version of DD-WRT

If DD-WRT is already installed on your router, you can simply upgrade to a new version via the web interface or TFTP. However, it is highly recommended that you restore the router to defaults using the reset button before and after flash. Never restore old backups from previous versions! Skipping these steps could lead to a bricked device!
Please see wiki article Hard reset for further information on how to restore your device back to DD-WRT default settings.

Configuration Notes

  • You must start to configure router from scratch. Do not try to use config files from older firmware versions.
  • It is strongly advised that you do not disable the "Boot Wait" option under the "Administration" tab. Boot Wait allows you recover if you flash your router improperly.

If something goes wrong

  • If your router fails to reboot (power light doesn't stop flashing, no web interface, etc) you will need to Recover from a Bad Flash. Additional help can be found by doing a forum search.
  • The peacock thread's section on bricked routers ([12]) can help you to identify if you have a real problem or not.

Hardware-specific

This section has been condensed. An expanded listing is available on another page. The list below contains some links not yet available in the other page, so check both places to be sure you have found all information for your router.
  1. Accton:
    1. Accton MR3202A: see LaFonera Software Flashing Page. (Use only the MR3202A binaries provided, instead of the Fonera ones).
    2. Accton MR3201A: see Accton Software Flashing Page. (Use Fonera binaries)
    3. Open-Mesh OM1P: See OM1P config page. (Use Fonera 2100 binaries)
  2. Allnet
  3. Asus
  4. Belkin
  5. Buffalo
  6. D-Link
  7. Gateworks Avila: Gateworks Avila Network Processor GW2348
  8. LaFonera (en) see LaFonera Software Flashing
  9. Linksys (Includes Cisco)
  10. Microsoft
  11. Mikrotik: Mikrotik Routerboard RB/532
  12. Motorola: Motorola WR850G
  13. Mitsubishi
  14. Netgear
  15. Siemens: Flash Your Siemens SE505
  16. Ubiquiti
  17. US Robotics USR5461
  18. X86