Installation

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:38, 11 March 2018 (edit)
Ian5142 (Talk | contribs)
(Changed links.)
← Previous diff
Revision as of 12:23, 25 September 2021 (edit) (undo)
Kernel-panic69 (Talk | contribs)
(Method 3: Flashing with Command Line)
Next diff →
(16 intermediate revisions not shown.)
Line 16: Line 16:
==Which router should I buy?== ==Which router should I buy?==
-For a list of recommended devices for installing h DD-WRT, please see '''[[Firmware FAQ#Which router should I buy?|Which router should I buy?]]'''+For a list of recommended devices for installing DD-WRT, please see '''[[Firmware FAQ#Which router should I buy?|Which router should I buy?]]'''
==Before You Download, Upgrade, or Flash== ==Before You Download, Upgrade, or Flash==
Line 29: Line 29:
* 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 [https://secure.dd-wrt.com/dd-wrtv3/dd-wrt/downloads.html 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 (- [[User:Clock|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 [https://secure.dd-wrt.com/dd-wrtv3/dd-wrt/downloads.html 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 (- [[User:Clock|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. * 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 [[What is DD-WRT?#File Versions|File Versions]].+** For a '''comparison of the builds''', see [[Version Features]].
** '''Updating through the Web GUI''' (ie, the routers's online interface) means you need to use the ''_generic'' version. ** '''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 [https://secure.dd-wrt.com/phpBB2/viewtopic.php?t=51486 here under '''Maximum firmware size''']. (Again, use the download page's search function for help here - [[User:Clock|clock]]). ** 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 [https://secure.dd-wrt.com/phpBB2/viewtopic.php?t=51486 here under '''Maximum firmware size''']. (Again, use the download page's search function for help here - [[User:Clock|clock]]).
Line 38: Line 38:
=Precautions= =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.
-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 [[http://dd-wrt.com/site/support/other-downloads?path=betas]]) 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 - [[User:Clock|clock]].+Follow all the instructions precisely, or you may run into trouble. '''Incorrectly flashing can [[Glossary#Brick|brick]] your router!'''
- +
-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 - [[User:Clock|clock]]. Follow all the instructions precisely, or you may run into trouble. '''Incorrectly flashing can [[Glossary#Brick|brick]] your router!'''+
=='''Do Prior Research'''== =='''Do Prior Research'''==
-Read the [[Firmware_FAQ|Firmware FAQ]], or at least most of it.+Read the [[Firmware_FAQ|Firmware FAQ]].
-#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.+#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.
-#Before you begin, it is recommended that you look through this wiki (particularly these precautions). Also, the notorious peacock thread (Broadcom only) [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486], and basic techniques such as [[Hard_reset_or_30/30/30]] and [[Tftp_flash|tftp flashing]]. These may have some sections in some pages that are not relevant, which you can skim. +#It is recommended that you first read your specific device wiki, if available. For Broadcom devices read the [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486] Peacock announcement] as a pre-ARM reference.
-# 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 for overall understanding.+#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.
=='''General'''== =='''General'''==
-#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. ([[User:Clock|clock]] used a stopwatch.) Be sure to follow all power cycling and reset instructions as described.+#Do not skip resets before or after firmware updates unless you know what you're doing.
-# 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.+#Do NOT flash your firmware over an SSL (HTTPS) connection. Make sure you are using HTTP.
-# Do NOT flash your firmware over an SSL (HTTPS) connection. Make sure you are using HTTP.+
=='''Prepare to Go Offline'''== =='''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 [[Settings#Disable Wireless|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|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. #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 [[Settings#Disable Wireless|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|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.
-#Some users, such as those running Windows Vista, may need to [[Settings#Disable Compound TCP|Disable Compound TCP]] - [[User:Clock|clock]]).+#Windows Vista users may need to [[Settings#Disable Compound TCP|Disable Compound TCP]].
-# 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 - [[User:Clock|clock]]). +#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 and changing the firmware changes the MAC address. (You may also find these on your web GUI - [[User:Clock|clock]]).+## 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. # 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. ## 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.
-# 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: (-[[User:Clock|clock]])+#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 installation page for your specific router as found though the [[Hardware-specific]] page.
-#*The peacock thread [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486]. +#*The [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486] Peacock announcement.
-#*This wiki [http://www.dd-wrt.com/wiki/index.php/Installation].+#*This [[Installation]] wiki.
#*[[Recover_from_a_Bad_Flash|Recover from a Bad Flash]]. #*[[Recover_from_a_Bad_Flash|Recover from a Bad Flash]].
#*FAQs [http://www.dd-wrt.com/wiki/index.php/Index:FAQ] #*FAQs [http://www.dd-wrt.com/wiki/index.php/Index:FAQ]
Line 75: Line 73:
=='''Going Offline/Before Implementation'''== =='''Going Offline/Before Implementation'''==
-#Do NOT use a wireless connection to upload firmware. Use a wired (LAN) connection. +#Do NOT use a wireless connection to GUI upload firmware. Use a wired (LAN) connection.
#Disable any wireless adapters (see the [[Settings#Disable Wireless|right way to do it]]) on your system to ensure that none are used for the transfer. #Disable any wireless adapters (see the [[Settings#Disable Wireless|right way to do it]]) on your system to ensure that none are used for the transfer.
-# 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 [[Security|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.)+#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 [[Security|Disable Security]]. Restore security measures before going back online.
-="Flashing" Your Router with DD-WRT Firmware=+=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: Flashing with TFTP|Method 2]]), and with the Command Line Interface ([[#Method 3: Flashing with Command Line|Method 3]] - '''use this if wirelessly connected'''). The router model and/or location may dictate what you use.
-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 - [[User:Clock|clock]].+
==Method 1: Flashing with Web GUI == ==Method 1: Flashing with Web GUI ==
- +These instructions are very generic. Search the wiki, [[Supported Devices]], and [https://download1.dd-wrt.com/dd-wrtv2/downloads/betas DD-WRT download page] for your specific device.
-The following instructions are very general and apply mostly to Linksys routers. Check for hardware-specific instructions in the [[Hardware-specific]] page.+
#'''Reset your router''' #'''Reset your router'''
-## '''Use [[Hard reset or 30/30/30]].'''+##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.
-##While not as preferable (this may cause problems down the line) you can reset to [[Factory Defaults]] instead. +##See [[Reset And Reboot]] and note the default IP address. If not listed on the router label see [wikidevi.com Wikidevi]
-###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 - [[User:Clock|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.)+##Perform a GUI reset (''Administration''->''[[Factory Defaults]]'' in DD-WRT) or use an alternate method:
-###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):+##*[[Hard reset or 30/30/30|Hard reset]]. <font color=darkred>WARNING: some devices should not use 30/30/30, including all ARM devices.</font>
-###* Follow the instructions in the next section to log in to the Web GUI.+##*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.)
-###* Click the "Administration" tab.+#'''Log in to the Web GUI'''
-###* Click the "Factory Defaults" sub-tab.+##Javascript is required for the Web interface. Try a different browser if having issues.
-###* Select "Yes".+##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, [[Hard_reset_or_30/30/30#Erasing_NVRAM|erase the nvram]].
-###* Click the "Save Settings" button.+
-###* A new page will open, click "continue".)+
-#'''Log on to the Web GUI (if you have not done so already).''' +
-##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.+
-## 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 [[Obtaining Router IP|attempt to obtain it]]).+
## 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). ## 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.''' +#'''Upload the Firmware'''
-## '''WARNING:<span style="color:#FF0000">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).'''</span>+##'''NOTE:''' Multiple flashes may be needed if flashing from OEM firmware. See the [[Firmware_FAQ#Where_do_I_download_firmware.3F|FAQ download file details]].
-##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.+## '''WARNING:<span style="color:#FF0000">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!'''</span>
-### First do a [[Reset And Reboot|hard reset]] on the unit that DD-WRT is to be loaded onto.+##This section is written for the DD-WRT GUI. An OEM firmware interface will be different. See [[#Precautions|Precautions]].
-### You should be in the Web GUI of the router. Go there now (as discussed above).+### Click the "Administration"->"Firmware Upgrade" tab.
-### Click the "Administration" tab+###Optional: select the option to Reset to Defaults after flashing (NOTE: this can cause flashing issues)
-### Click the "Firmware Upgrade" sub-tab.+###Click the "Browse" button and select the DD-WRT .bin file you downloaded and confirmed.
-### (Only applicable when DD-WRT is already installed.) Choose the option to Reset to Defaults after flashing.+###Click the "Upgrade" button and wait for a redirect page confirming successful upload.
-### Click the "Browse" button and select the DD-WRT .bin file you downloaded and confirmed.+###Now '''<font color=red>wait at least 5 minutes</font>''' before clicking "Continue". This varies with the hardware.
-### Click the "Upgrade" button.+### If flashed successfully you will now be able to access the DD-WRT web interface at [192.168.1.1].
-### The router will take a few minutes to upload the file and flash the firmware. During this time, the power light will flash.+
-### A new page will open confirming that the upload was successful ([[Installation#Possible errors if not]]). Now '''<font color=red>wait about 5 minutes</font>''' before clicking "Continue".+
-### Lastly, do another [[Reset And Reboot|hard reset]] on the unit.+
-### 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 - [[User:Clock|clock]]).+
-#'''Possible Errors with Uploading Firmware'''+
-##''[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 '''<font color=red>not</font>''' get to the DD-WRT web interface. Nor was the device ping-able.+
-##''[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.+
-##''[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 [[http://www.dd-wrt.com/wiki/index.php/Tftp_flash#TFTP_tools]], I was able to install the dd-wrt firmware without much more fuss.+
-##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.+
-##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 - [[User:Clock|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).+
-##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 a Bad Flash|recover from this]] and use a different browser (e.g. Internet Explorer) to upload the firmware.+
-##If logging in fails with the default username/password, you can reset the password with a [[Reset And Reboot]].+
#'''Reset Again''' #'''Reset Again'''
-##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. +##Do this '''only''' after you have confirmed that the firmware upgrade is working.
-##Many Web Interface problems can be solved by a hard reset and by clearing your browser cache.+##'''This is required if flashing from OEM firmware!''' See the above section again.
-##See [[Reset And Reboot]].+##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 [https://download1.dd-wrt.com/dd-wrtv2/downloads/betas 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.
==Method 2: Flashing with TFTP== ==Method 2: Flashing with TFTP==
Line 137: Line 123:
==Method 3: Flashing with Command Line== ==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. 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.
 +'''NOTE: Builds after 47381 do not have ftp support compiled in to busybox wget; use curl intead.'''
-[[Telnet/SSH and the Command Line|Telnet or ssh]] into DD-WRT.+First [[Telnet/SSH and the Command Line|Telnet or ssh]] into DD-WRT.
-Download the firmware to the router's /tmp directory with wget or scp.+'''1a.''' Download the firmware to the router's /tmp directory with wget (http or ftp), curl (http or ftp), scp, or a mounted share.
<pre>cd /tmp <pre>cd /tmp
-wget http://www.dd-wrt.com/dd-wrtv2/downloads/stable/dd-wrt.v2x_generic.bin</pre>+wget http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/{year}/{build}/{platform}/{firmware}</pre>
 +Or:
 +<pre>curl http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/{year}/{build}/{platform}/{firmware} -o {firmware}</pre>
 +*The ''{platform}'' refers to architecture or router model and version. See [[#Downloading_Your_DD-WRT_Firmware]] for details.
-Alternatively, you could use the mounted share if you have one, and simply download the file there. +Note: To download from login/password protected sites (like BS' ftp for testers), use the following syntax:
 +<pre>wget ftp://{login}:{password}@{download location}/{firmware}</pre>
 +Or:
 +<pre>curl -u {login}:{password} ftp://{download location}/{firmware} -o {firmware}</pre>
-[[Hashes|Compare the MD5 checksum]] of the original and the downloaded file.+'''1b.''' ''Optional:'' [[Hashes|Compare the MD5 checksum]] ['''obsolete'''] of the original and the downloaded file.<br>
- md5sum dd-wrt.v2x_generic.bin+*For modern builds, one can also download the file to another directory (or device) and check the md5sum for both downloads:
 + md5sum {firmware}
-Write the firmware to flash.+'''2.''' Now ''write'' the firmware to flash ('''do NOT''' use ''mtd write''):
- write dd-wrt.v2x_generic.bin linux+ write {firmware} linux &
 +*The ampersand backgrounds the ''write'' command to protect against connection loss, as the shell would otherwise abort it.
-Wait...+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 [[Linksys_EA6900#Boot_Partitions|here]].
-Reboot+'''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 [[Hard_reset_or_30/30/30#Erasing_NVRAM|Erasing NVRAM]] for details.
-Restore factory defaults using erase nvram command or reset button+'''4.''' When completed without error, finally:
 + reboot
==Other Notes== ==Other Notes==
Line 164: Line 161:
If DD-WRT is already installed on your router, you can simply upgrade to a new version via the web interface or [[Tftp_flash|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! If DD-WRT is already installed on your router, you can simply upgrade to a new version via the web interface or [[Tftp_flash|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!
-====Web Interface upgrading====+===If you can't wget the firmware===
-'''Step 1''': Access the router's GUI, default is 192.168.1.1<br>+'''NOTE:'''On routers without OpenSSL (e.g. 4MB models), the https link won't work: use HTTP or FTP.
-'''Step 2''': Download the approriate file for your router. See [[Firmware_FAQ#Where_do_I_download_firmware.3F | Downloading Firmware FAQ]] for links. The file should have webflash or webupgrade in the name. Some routers only use one file to go from factory firmware to dd-wrt and for upgrading dd-wrt.<br>+
-'''Step 3''': Go to the Admin tab, then click the Upgrade tab.<br>+
-'''Step 4''': Upload the file. Click upgrade. If you wish to reset to factory defaults change that option on the screen.<br>+
-'''Step 5''': Wait a full 5 mins. Router should reboot on its own. <br>+
-Please see wiki article [[Hard reset or 30/30/30|Hard reset]] for further information on how to restore your device back to DD-WRT default settings. It is best to reset to defaults using the Factory Defaults tab, under Admin.+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:
-New Firmware builds can always be downloaded, '''Router-Database builds are not up-to-date'''+* Enable DNSmasq just while getting the file
-[[Firmware_FAQ#Where_do_I_download_firmware.3F | Downloading Firmware FAQ]]+<pre>
 +nvram set dns_dnsmasq=1
 +stopservice dnsmasq
 +startservice dnsmasq
 +nvram set dns_dnsmasq=0
 +</pre>
 + 
 +* Use nslookup on another host to get the IP address of ftp.dd-wrt.com, then download from <pre>ftp://<ip>/<path></pre>
 +** 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).
 + 
 +* You can optionally use the following workaround as well:
 +<pre>
 +cd /tmp
 +echo "nameserver {ip of your local nameserver / gateway router}" > /tmp/resolv.conf
 +wget http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/{year}/{build}/{platform}/{firmware}</pre>
 +OR
 +<pre>
 +curl http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/{year}/{build}/{platform}/{firmware} -o {firmware}
 +</pre>
 +OR
 +<pre>
 +curl --ipv4 http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/{year}/{build}/{platform}/{firmware} --output {firmware}
 +</pre>
===Configuration Notes=== ===Configuration Notes===
Line 185: Line 200:
*The peacock thread's section on bricked routers ([http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486]) can help you to identify if you have a real problem or not. *The peacock thread's section on bricked routers ([http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486]) can help you to identify if you have a real problem or not.
-=Hardware-specific= 
- 
-This section has been condensed. An expanded listing is [[Hardware-specific|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. 
- 
-#Accton:  
-##Accton MR3202A: see [[LaFonera Software Flashing]] Page. (Use only the MR3202A binaries provided, instead of the Fonera ones). 
-##Accton MR3201A: see [[Accton Software Flashing]] Page. (Use Fonera binaries) 
-##Open-Mesh OM1P: See [[OM1P config]] page. (Use Fonera 2100 binaries) 
-#[[Linksys|Allnet]] 
-#[[Asus]] 
-#[[Belkin]] 
-#[[Buffalo]] 
-#[[D-Link]] 
-#Gateworks Avila: [[Gateworks Avila Network Processor GW2348]] 
-#[[LaFonera (en)]] see [[LaFonera Software Flashing]] 
-#[[Linksys]] (Includes Cisco) 
-#[[Asus|Microsoft]] 
-#Mikrotik: [[Mikrotik Routerboard RB/532]] 
-#Motorola: [[Motorola WR850G]] 
-#[[Asus|Mitsubishi]] 
-#[[Netgear]] 
-#Siemens: [[Flash Your Siemens SE505]] 
-#[[Ubiquiti]] 
-#US Robotics [[USRobotics_USR5461|USR5461]] 
-#[[X86]] 
[[Category:Documentation| ]] [[Category:Documentation| ]]
[[Category:Flashing networking hardware| ]] [[Category:Flashing networking hardware| ]]
[[Category:Categories| ]] [[Category:Categories| ]]

Revision as of 12:23, 25 September 2021

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.


Contents

Choosing the Correct Firmware - Extremely Important

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.

Which router should I buy?

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

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.

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

Downloading Your DD-WRT Firmware

See: Where do I download firmware

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!

Do Prior Research

Read the Firmware FAQ.

  1. 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.
  2. 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.
  3. 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.

General

  1. Do not skip resets before or after firmware updates unless you know what you're doing.
  2. 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. Windows Vista users may need to Disable Compound TCP.
  3. Note or screenshot the current settings for future reference, especially if you have static IP addresses.
    1. 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.
  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. 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.
    • 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].
  6. 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.)

Going Offline/Before Implementation

  1. Do NOT use a wireless connection to GUI 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. 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.

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.

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.

  1. Reset your router
    1. 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.
    2. See Reset And Reboot and note the default IP address. If not listed on the router label see [wikidevi.com Wikidevi]
    3. 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.)
  2. Log in to the Web GUI
    1. Javascript is required for the Web interface. Try a different browser if having issues.
    2. 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.
    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. NOTE: Multiple flashes may be needed if flashing from OEM firmware. See the FAQ download file details.
    2. 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!
    3. This section is written for the DD-WRT GUI. An OEM firmware interface will be different. See Precautions.
      1. Click the "Administration"->"Firmware Upgrade" tab.
      2. Optional: select the option to Reset to Defaults after flashing (NOTE: this can cause flashing issues)
      3. Click the "Browse" button and select the DD-WRT .bin file you downloaded and confirmed.
      4. Click the "Upgrade" button and wait for a redirect page confirming successful upload.
      5. Now wait at least 5 minutes before clicking "Continue". This varies with the hardware.
      6. If flashed successfully you will now be able to access the DD-WRT web interface at [192.168.1.1].
  4. Reset Again
    1. Do this only after you have confirmed that the firmware upgrade is working.
    2. This is required if flashing from OEM firmware! See the above section again.
    3. 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.
  5. Possible Errors with Uploading Firmware
    1. 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.
    2. 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.
    3. Search the forum, wiki, Supported Devices, and DD-WRT download page for your specific device.
    4. 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.
    5. See Recover from a Bad Flash or try a different internet browser to upload the firmware.
    6. If logging in fails with the default username/password, reset again.

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.

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. NOTE: Builds after 47381 do not have ftp support compiled in to busybox wget; use curl intead.

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}

Note: To download from login/password protected sites (like BS' ftp for testers), use the following syntax:

wget ftp://{login}:{password}@{download location}/{firmware}

Or:

curl -u {login}:{password} ftp://{download location}/{firmware} -o {firmware}

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

  • For modern builds, one can also download the file to another directory (or device) 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

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!

If you can't wget the firmware

NOTE: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).
  • You can optionally use the following workaround as well:
cd /tmp
echo "nameserver {ip of your local nameserver / gateway router}" > /tmp/resolv.conf
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}

OR

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

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 ([7]) can help you to identify if you have a real problem or not.