From DD-WRT Wiki

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.





edit] Choosing the Correct Firmware - Extremely Important

edit] Is Your Router Supported?

Please check the router database 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.

edit] Which router should I buy?

For a list of recommended devices for installing h DD-WRT, please see Which router should I buy?

edit] 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. BROADCOM ONLY INFO MOSTLY. 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 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.

edit] 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.

page to accurately identify which model you have. Start with the main brand heading (ie, "Linksys"). Use 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 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).

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. Read the Changelog, the timeline and all other information files on the download pages. They contain important information!

edit] Downloading Your DD-WRT Firmware

See: Where do I download firmware

edit] Precautions

If still running OEM firmware version on an old router (usually with 2MB flash), a "kill" firmware program file may be required first. 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 installation process below, but using the specific "kill" file.

Follow all the instructions precisely, or you may run into trouble. Incorrectly flashing can brick your router!

edit] Do Prior Research

Read the Firmware FAQ.

Failing to prepare and do your background research can cause considerable frustration, wasted time, and render your router useless (bricked). In other words, you may have to literally throw it away and/or spend a lot of time recovering it. With some research, you'll save hours of time and frustration. It is recommended that you first read your specific device wiki, if available. For Broadcom devices read the [1] Peacock announcement] as a pre-ARM reference. 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 for overall understanding.

edit] General

Do not skip resets before or after firmware updates unless you know what you're doing. Do NOT flash your firmware over an SSL (HTTPS) connection. Make sure you are using HTTP.

edit] Prepare to Go Offline

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. Windows Vista users may need to Disable Compound TCP. Note or screenshot the current settings for future reference, especially if you have static IP addresses. It can be essential to record your current WAN MAC address. Some ISPs do not allow an immediate change of the routing hardware without a phone call. Check the GUI and router label for the WAN MAC. 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. 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. Recommended: PDF or save the following for offline reference e.g. File->Save As to html (NOT a bookmark) The installation page for your specific router as found though the Hardware-specific page.

The [2] Peacock announcement.

This Installation wiki.

wiki. Recover from a Bad Flash.

FAQs [3]

Tftp Flash instruction [4] 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: [5]. In addition, you will probably also need: The Tftp.exe file, if applicable (execute it from the Tftp [6] 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.)

edit] Going Offline/Before Implementation

Do NOT use a wireless connection to GUI upload firmware. Use a wired (LAN) connection. Disable any wireless adapters (see the right way to do it) on your system to ensure that none are used for the transfer. Recommended: AFTER you are offline, disable your anti-virus software, as as a false positive detection could interrupt the upload. Disable all firewalls and security (see Disable Security. Restore security measures before going back online.

edit] Flashing Your Router with DD-WRT Firmware

Three methods of flashing are covered below: using the router's online interface (Method 1), via TFTP (Method 2), and with the Command Line Interface (Method 3 - use this if wirelessly connected). The router model and/or location may dictate what you use.

edit] Method 1: Flashing with Web GUI

These instructions are very generic. Search the wiki, Supported Devices, and DD-WRT download page for your specific device.

Reset your router This is probably not needed, but if the memory or nvram is almost full, a firmware update can brick it. Thus it is recommended at least until are familiar with the particular device. See Reset And Reboot and note the default IP address. If not listed on the router label see [wikidevi.com Wikidevi] Perform a GUI reset (Administration->Factory Defaults in DD-WRT) or use an alternate method: Hard reset. WARNING: some devices should not use 30/30/30, including all ARM devices.

Reset button: with the router running normally, hold the reset button until the lights flash (or up to 30 sec). Be careful when using this method! Research the functionality of your current firmware to be safe.) Log in to the Web GUI Javascript is required for the Web interface. Try a different browser if having issues. Access the GUI via the router IP address. The default for DD-WRT and many devices is [192.168.1.1], or see [wikidevi.com Wikidevi]. If the IP address is unknown, see Obtaining Router IP. If still having issues, erase the nvram. 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). Upload the Firmware NOTE: Multiple flashes may be needed if flashing from OEM firmware. See the FAQ download file details. WARNING: DO 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! This section is written for the DD-WRT GUI. An OEM firmware interface will be different. See Precautions. Click the "Administration"->"Firmware Upgrade" tab. Optional: select the option to Reset to Defaults after flashing (NOTE: this can cause flashing issues) Click the "Browse" button and select the DD-WRT .bin file you downloaded and confirmed. Click the "Upgrade" button and wait for a redirect page confirming successful upload. Now wait at least 5 minutes before clicking "Continue". This varies with the hardware. If flashed successfully you will now be able to access the DD-WRT web interface at [192.168.1.1]. Reset Again Do this only after you have confirmed that the firmware upgrade is working. This is required if flashing from OEM firmware! See the above section again. For DD-WRT upgrades, this should only be needed if making large build jumps, changing kernel version (e.g. 2.4 to 2.6 or 2.6 to 3.10), or if having issues. For the latter, reset, retest, and then search the forum before making a new post. Possible Errors with Uploading Firmware If the DD-WRT web interface is not accessible after 10 minutes, try clearing the browser cache, renewing the IP address ("ipconfig -renew" in a Windows command prompt window), another reset, or power cycle. Ping the router: a TTL=64 response indicates normal operation, while TTL=100 usually indicates a TFTP server awaiting firmware upload. TFTP usually only is available in the first couple seconds at power-up, and may time out if the file upload is larger than OEM versions. See Tftp_flash, and note only OEM firmware may work for TFTP, possible trailed builds. Search the forum, wiki, Supported Devices, and DD-WRT download page for your specific device. The firmware upload process may respond with "Upload Failed" if using the wrong file type, kernel, or size of DD-WRT (or may just brick). E.g. This may occur through the web GUI if you use a *wrt54g.bin version when you should have selected the generic version. It may also be that your router requires the mini version to be flashed before the full version. Ensure you have the right version, as described in the first section. See Recover from a Bad Flash or try a different internet browser to upload the firmware. If logging in fails with the default username/password, reset again.

edit] 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.

If you still wish to flash with TFTP, see the articles TFTP flash, Asus TFTP Flash and Recovering with TFTP.

edit] 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.

First Telnet or ssh into DD-WRT.

1a. Download the firmware to the router's /tmp directory with wget (http or ftp), curl (http or ftp), scp, or a mounted share.

cd /tmp wget http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/{year}/{build}/{platform}/{firmware}

Or:

curl http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/{year}/{build}/{platform}/{firmware} -o {firmware}

The {platform} refers to architecture or router model and version. See #Downloading_Your_DD-WRT_Firmware for details.

1b. Optional: Compare the MD5 checksum [obsolete] of the original and the downloaded file.



For modern builds, one can also download the file to their computer and check the md5sum for both downloads:

md5sum {firmware}

2. Now write the firmware to flash (do NOT use mtd write):

write {firmware} linux &

The ampersand backgrounds the write command to protect against connection loss, as the shell would otherwise abort it.

Note: some routers can have more than one firmware partition: e.g. linux and linux2

For an example on how to check and switch boot partitions, see here.

3. Optional: Reset nvram (if having issues or for large version changes) via erase nvram or nvram erase The latter is for builds after 18 Apr 2018 (35770 and later). See Erasing NVRAM for details.

4. When completed without error, finally:

reboot

edit] Other Notes

edit] 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!

edit] If you can't wget the firmware

On routers without OpenSSL (e.g. 4MB models), the https link won't work: use HTTP or FTP.

If you don't ordinarily use DNSmasq for local DNS (perhaps because you run another DNS server), then the CLI commands may not be able to resolve addresses, so wget may fail. This can be hard to troubleshoot since the busybox commands don't return errors. Possible workarounds:

Enable DNSmasq just while getting the file

nvram set dns_dnsmasq=1 stopservice dnsmasq startservice dnsmasq nvram set dns_dnsmasq=0

Use nslookup on another host to get the IP address of ftp.dd-wrt.com, then download from ftp://<ip>/<path> Note: HTTP won't work (the download1 vhost needs the "Host" header to give you the file, and the stripped-down DD-WRT wget doesn't have the --header option).



edit] 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.

edit] If something goes wrong