1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Unlocking the power of the WRT54GL(and a few other routers) with LINUX!

Discussion in 'Networking & Security' started by newtekie1, Nov 19, 2010.

  1. newtekie1

    newtekie1 Semi-Retired Folder

    Joined:
    Nov 22, 2005
    Messages:
    20,038 (6.15/day)
    Thanks Received:
    6,101
    First I'll say that most of this information is available a lot of places on the internet. However, it is kind of spread out so I figured I'd try to condense some of it here. Plus the Networking section has only 1 sticky, and so I figured maybe I can add to it.:laugh:

    Disclaimer: I take no responsibility if anything contained in this thread breaks your router. As with any type of firmware/BIOS flashing, there are risks, and there is always a chance that something could go wrong and your router is permanantly bricked.

    First of all some history on the router:

    The WRT54GL originally began its life as the standard WRT54G router. It was an extremely popular Wireless G solution due to the fact that it was relatively cheap and reliable. I can't remember a time when I've ever seen one selling for more than $60, even way back when Wireless G was still new to the consumer market and other Wireless G routers were selling for $100+.

    Other than that though, no one really paid attention to it, and as more routers came out on the market, the WRT54G kind of got burried in all the rest. Until someone, some genius, figured out that the WRT54G actually runs on a Linux OS! And because of that, Linksys was actually required(under the GNU) to provide source code. And suddenly the router became an instant enthusiast hit. 3rd party firmwares(the OS of the router) quickly started coming out that unlocked features usually only found on comercial grade routers, the most popular one being the radio power adjustment which greatly increased the range of the routers.

    The WRT54G went through several hardware revisions in its life, but version 1 through 4 were all pretty much the same internals just condensed to make production easier and move along as better SoC processors became available. However, with version 5 Linksys modified the WRT54G hardware to cut costs, the main modification was that change of the amount of Flash ROM installed on the router, where the firmware for the router was stored. Think of this like a BIOS on a motherboard or Video Card. The cut the size down from 4MB to 2MB, this meant that almost all the 3rd party firmwares out there would no longer work with the WRT54G.:cry: However, Linksys was not about to completely kill their enthusiast following. They re-released the Version 4.0 router and named it WRT54GL(the L is for Linux!!!:roll:). And here we are today, with the WRT54GL still doing amazing things.

    Now I should mention that there have been some advances in 3rd party firmware, specifically with DD-WRT, that allows certain version of the firmware to be used on the current WRT54G routers. However, these routers also have half the RAM as the WRT54GL, and hence performance under heavy load is rather poor. This is especially true with a high number of connection, like torrents and other P2P situations. So I won't be covering those.

    Other routers that this applies to:

    The Linksys WRT54GL isn't the only router that can use these Linux based 3rd party firmwares. There are actually a bunch of them floating around. Here are the two routers I usually use so I know they work:

    WRT54GL(Obviously)
    Buffalo WHR-HP-G54


    There are others, whatever firmware you decide to use should have a list of supported routers.

    Popular 3rd Party Firmwares:

    There are many 3rd party firmwares available, but the two main ones are Tomato and DD-WRT. I happen to prefer Tomato, so that is what I'll be using in this guide. If I have some extra time later on I'll flash DD-WRT and go over the feature in there as well.

    Flashing the router:

    Whichever firmware you choose to use will have instructions on how to flash that particular firmware. Sometime, if you are upgrading from the stock Linksys firmware, there is a special firmware you have to load first. Follow the instructions given to you by the firmware you choose. Read them completely through before beginning the flashing process! Most of them are simple and they usually conatin steps similar to:

    1. Open router admin page.
    2. Go to upgrade firmware option.
    3. Point to new firmware.
    4. Press upgrade button.

    Features Unlocked with 3rd Party Firmware:

    Ok, so you've got your 3rd party firmware loaded, what can you do? There are probably hundreds of different tweaks you can do, but I'm going to focus on just a few of the most popular things.

    Increasing the wireless range:

    This, as I mentioned, was probably the orignal reason most people moved to 3rd party firmware.

    In Tomato you want to go to Advanced -> Wireless and you will get a page that looks similar to this:
    [​IMG]

    The area you are concerned with will be the "Transmit Power". As you can see from my screenshot I have it set to 125mW, the default is 42mW. I'd like to clear up a little misconception here.

    There is a lot of talk on the internet that raising this will kill the router or cause it to overheat. I can dismiss those rumors right now. Through my own testing, going all the way up to 150mW has no real effect on the radio. And in fact, the router I'm using to make this guide is a WRT54G v2 that is well over 7 years old and has run at 125mV for the past 4 years at least with no issue at all.

    Also, there is talk that increasing this will not effect wireless range because the wireless device(laptop, game console, whatever) will still not be able to send the single to the router if it is too far away. The common anology is that two people are in different rooms, and one guy is shouting so the other guy can hear him, but the other guy is talking normally so he can't be heard. And that is true to a point. However, with most internet traffic, a lot more data is being sent to the wireless device than the wireless device(I'll just say laptop from now on) is sending to the router. So the relative short bursts of data that the laptop is sending to the router are more likely to get through with a weak transmit power from the laptop. However, the larger amounts of data that the router is sending have less of a chance of making it to the laptop with a lower transmit power.

    Side Note: Another way to increase signal strength is with an antenna upgrade. A lot of people believe that you can not upgrade the antennas on a WRT54GL, because they use a propriatary connector. That actually isn't true. They don't use a propratary connector at all. They are actually called R-TNC(AKA RP-TNC) connectors. Most antennas on the market use what is called a R-SMC(AKA RP-SMC) connector. You can find antenna upgrades for the R-TNC connector, but a much easier solution is to buy an R-TNC to R-SMC adapter, they usually sell for about $5 online if you do a little hunting. I bought two for $5 total shipped from here.

    Static DHCP:

    What is static DHCP? It is sometimes also referred to as IP Reservations. Basically what it does is reserve a certain IP address for a certain device on your network. So say you have a server, and you want that server to always have the IP address of 192.168.1.100. You could manually set that IP address on the server, but then if you ever move the server someplace(like take it to a LAN) where that IP won't work you can be in trouble. With static DHCP, you can set the router to reserve that IP address for the server. So whenver it is connected to your network, it will recieve that IP address and no other device is allowed to use that IP address. Now I should make this a little more clear, you aren't actually assigning the IP address to the server, you are actually assigning it to the MAC address of the server's NIC card. So if that NIC card is removed from the server and put on another computer, the IP will be assigned to the new computer. In most cases, when you are using onboard LAN or internal wireless card, this won't be a problem. However, if you are using an USB wireless card for example it could be.

    Overclocking the router:

    Now this wouldn't be TPU if we didn't talk about overclocking something! A lot of people refer to raising the transmitter power as overclocking the router, but that is inaccurate. The Broadcom SoC processor that powers the WRT54GL and other rotuers actually can be overclocked as well. By default the WRT54GL runs its processor at 200MHz. However, the processor is actually capable of quite a bit more than that.

    Before you get started understand that setting the router to certain clock speeds will instantly brick the router. The SoC is designed to run at certain clock speeds and certain clock speeds only, using any other speed can brick the router. The speeds that work are 200, 216, 225, 240, and 250Mhz. Using any other speed will most likely brick the router.

    Ok, now that I've thoroughly scared the shit out of you, lets get started.:) I'm going to assume some basic understanding of getting around a Windows environment.

    First thing you will want to do is install the Telnet client if it isn't installed already. You can do this by going into the "Turn Windows Features On or Off" area under "Programs and Features". No reboot necessary.

    Then open a cmd window.

    Type "Telnet 192.168.1.1" without the quotes and press enter. Replace the IP address with the IP address of your router if you have changed it from the default.

    The username for Tomato is Root, so enter that.
    The password is whatever password you have set in the GUI.

    Once you are connected with Telnet you will want to run the command "nvram get clkfreq" without quotes. This will tell you your current clock speed, most default to 200MHz.
    Then to change the clock speed you want to enter "nvram set clkfreq=XXX" again without quotes and replacing the XXX with the actual clock frequency you want.
    Then you enter "nvram commit" again without quotes to commit the changes.
    Then you enter "reboot" again without quotes to reboot the router so the new settings take effect.

    This is what all of this looks like:
    [​IMG]

    In that example I'm actually setting the clock speed back from 250MHz to 200MHz.

    Why should you do this? What benefit does it have? Well I'll show you.

    This is my throughput with the clock speed at 200MHz:
    [​IMG]

    This is my throughput with the clock speed at 250Mhz:
    [​IMG]
     
    Last edited: Nov 19, 2010
    suraswami, NAVI_Z, [Ion] and 16 others say thanks.
    Crunching for Team TPU 50 Million points folded for TPU
  2. newtekie1

    newtekie1 Semi-Retired Folder

    Joined:
    Nov 22, 2005
    Messages:
    20,038 (6.15/day)
    Thanks Received:
    6,101
    Reserved for future updates.
     
    Crunching for Team TPU 50 Million points folded for TPU
  3. brandonwh64

    brandonwh64 Addicted to Bacon and StarCrunches!!!

    Joined:
    Sep 6, 2009
    Messages:
    18,680 (9.97/day)
    Thanks Received:
    6,154
    Location:
    Chatsworth, GA
    I have my WRT54G flashed to DD-WRT, would i be better off with tomato?
     
    Crunching for Team TPU
  4. newtekie1

    newtekie1 Semi-Retired Folder

    Joined:
    Nov 22, 2005
    Messages:
    20,038 (6.15/day)
    Thanks Received:
    6,101
    First of all, what version of WRT54G do you have? Anything version 5 or higher will not work with Tomato anyway.

    But really, if you are comfortable with DD-WRT then stick with it.
     
    Crunching for Team TPU 50 Million points folded for TPU
  5. mlee49

    mlee49

    Joined:
    Dec 27, 2007
    Messages:
    8,491 (3.41/day)
    Thanks Received:
    2,106
    subscribed for good reading material.

    Owner of a Linksys 54WRTGS
     
  6. LAN_deRf_HA

    LAN_deRf_HA

    Joined:
    Apr 4, 2008
    Messages:
    4,555 (1.90/day)
    Thanks Received:
    952
    When I went to find comparisons of dd-wrt and tomato I only found one performance test and it was for bandwidth, tomato winning. With how often these things are updated though the test is probably not relevant now. Feature wise I always got the impression dd-wrt was richer. I put the micro version on a friends router and I couldn't tell what was cut down, had so many options. Personally I prefer tomato for the interface...
     
  7. Phxprovost

    Phxprovost Xtreme Refugee

    Joined:
    Apr 6, 2009
    Messages:
    1,218 (0.60/day)
    Thanks Received:
    262
    Location:
    Pennsylvania
    my only concern is your speedtest results, i doubt that had anything to do with the oc but i would be willing to believe it if you tested it further
     
    yogurt_21 says thanks.
  8. Beertintedgoggles

    Beertintedgoggles

    Joined:
    Nov 15, 2005
    Messages:
    721 (0.22/day)
    Thanks Received:
    194
    I'd imagine if you saw about a 50% increase in your download speed by overclocking the router that you would also be able to see a benefit in transfer speed from computer to computer in your home network. Could you try sending some huge file between PC's and timing it at both 200 and 250MHz?
     
  9. newtekie1

    newtekie1 Semi-Retired Folder

    Joined:
    Nov 22, 2005
    Messages:
    20,038 (6.15/day)
    Thanks Received:
    6,101
    I've ran several runs, both on speedtest.net and speakeasy.net with both clock speeds, the change is very much repeatable.

    My internal network is all run on a Gigabit switch, so internal file transfers are handled by the switch. The same would actually be true with the WRT54GL alone. It has an internal 4-port switch that handles all the internal network traffic, it is only when traffic is moving between the outside network and the internal network that the processor speed would matter.
     
    Phxprovost says thanks.
    Crunching for Team TPU 50 Million points folded for TPU
  10. Easy Rhino

    Easy Rhino Linux Advocate

    Joined:
    Nov 13, 2006
    Messages:
    13,461 (4.64/day)
    Thanks Received:
    3,264
    stickied.
     
  11. Beertintedgoggles

    Beertintedgoggles

    Joined:
    Nov 15, 2005
    Messages:
    721 (0.22/day)
    Thanks Received:
    194
    I'm gonna have to try some speedtest.net runs on my Linksys tonight at some different clock speeds and see if I can pick up some free performance. I've got Insight cable though which I'm pretty sure is capped at 6mbs so it shouldn't do a thing for me. Worth a shot though just to mess around.
     
  12. newtekie1

    newtekie1 Semi-Retired Folder

    Joined:
    Nov 22, 2005
    Messages:
    20,038 (6.15/day)
    Thanks Received:
    6,101
    Awesome, thanks!
     
    Crunching for Team TPU 50 Million points folded for TPU
  13. [I.R.A]_FBi

    [I.R.A]_FBi New Member

    Joined:
    May 19, 2007
    Messages:
    7,664 (2.82/day)
    Thanks Received:
    540
    Location:
    c:\programs\kitteh.exe
    wrt54GL v1.1 Owner here
     
  14. Ross211

    Ross211

    Joined:
    Jan 9, 2010
    Messages:
    472 (0.27/day)
    Thanks Received:
    115
    Location:
    Kansas
    And don't forget to cool your Broadcom SoC processor :rockout:

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    Don't be afraid to get creative on what heatsink to apply. I dremel'd up a Thermalright heatsink to size that wouldn't work for my GTX 260. The heatsink had thermal tape on the bottom and both heatsinks with it stuck perfectly to my WRT54GL and WRT54GS. I'm certain you could find some thermal tape or even use the Arctic Silver Thermal Adhesive mixed with some Arctic Silver 5.

    I've heard some time ago that any micro-controller that runs over 75 Mhz needs at least a passive heat sink. I'm surprised that these don't already have heatsinks on them even at the stock speed of 200 Mhz. I don't OC my WRT54GL & GS but I want them to last as long as they possibly can. I feel that if the wireless radio ever dies I'd still like to be able to use them as a switch / router still. Keeping the Broadcom CPU cooler may lengthen the life of these units.

    These routers with aftermarket firmware have tons of features for just a typical home router. To be real honest, I've been messing with different firmware for these routers for some time now and I still haven't fully realized the potential they have.
     
    remixedcat says thanks.
  15. Ross211

    Ross211

    Joined:
    Jan 9, 2010
    Messages:
    472 (0.27/day)
    Thanks Received:
    115
    Location:
    Kansas
    On a side note, I can fix bricked WRT54G and WRT54GL units. I have soldering experience and can flash the units via JTAG cable.

    Example -
    [​IMG]

    PM me if you have any bricks lying around and would like to get rid of them or get the unit fixed.
     
    Last edited: Nov 29, 2010
    remixedcat says thanks.
  16. newtekie1

    newtekie1 Semi-Retired Folder

    Joined:
    Nov 22, 2005
    Messages:
    20,038 (6.15/day)
    Thanks Received:
    6,101
    The Broadcom SoC processor doesn't really get that hot, so I don't feel it is worth the effort to open the router and risk messing it up. Even at 250MHz, which is the max that is easily obtainable with this method, the SoC on my WRT54G v2.2 doesn't even get hot to the touch, just slightly warm. And I've ran this router overclocked for a long while now.

    Though definitely a cool idea and thanks for sharing it for anyone that wants to attempt it!:toast:

    Edit: When I did this to one of my routers I used these: Enzotech BCC9 VGA Cooler
    They fit perfectly and worked really well.
     
    remixedcat and Ross211 say thanks.
    Crunching for Team TPU 50 Million points folded for TPU
  17. Ross211

    Ross211

    Joined:
    Jan 9, 2010
    Messages:
    472 (0.27/day)
    Thanks Received:
    115
    Location:
    Kansas
    newtekie1 can you provide a guide on how to use the QoS feature in Tomato ? I think that would be great to add to your sticky.

    I'm not sure if you do traffic shaping but I'm really feeling the need for it recently - I've got multiple hosts streaming Netflix on a 20-30 Mbps down / 4-5 Mbps up cable connection and I seem to be getting higher latency in Bad Company 2 throughout all this action.

    I have a fairly simple network. I just bought 2 new gigabit switches and plan to integrate them soon. Right now my current setup is like this -

    Modem --->
    WRT54GS v6 DD-WRT v24-sp2 build 13064 (This router has DHCP on) --->
    WRT54GL 1.1 DD-WRT v24-sp2 SVN revision 13525 (This router has DHCP & NAT off, firewall off, I assigned WAN port to switch, it is basically a 5 port switch + access point)

    If plan to do traffic shaping through QoS I need to implement this on my router that handles DHCP and NAT right ? I don't believe I can flash Tomato on my GS v6 router, so I think I will have to place my GL where my GS is and change settings.

    edit - Almost forgot to ask, QoS is broken in DD-WRT right ? I've heard of TCP-Vegas, but it looks like a lot more work than using QoS features in Tomato.

    I'd appreciate any suggestions.
     
  18. newtekie1

    newtekie1 Semi-Retired Folder

    Joined:
    Nov 22, 2005
    Messages:
    20,038 (6.15/day)
    Thanks Received:
    6,101
    I'll play around with it and try to get something about QoS up by next week. I haven't really used QoS that much, but from what I have done, it seems like the default settings with Tomato are pretty good already. Though maybe not ideal for gaming.

    QoS has to be done on the router that handles NAT yes.
     
    Ross211 says thanks.
    Crunching for Team TPU 50 Million points folded for TPU
  19. remixedcat

    remixedcat

    Joined:
    May 13, 2010
    Messages:
    2,938 (1.81/day)
    Thanks Received:
    645
    Excellent guides on this router firmware!
     
  20. MohawkAngel

    MohawkAngel New Member

    Joined:
    Jan 21, 2009
    Messages:
    1,864 (0.89/day)
    Thanks Received:
    122
    WRT54G Version 8.0 owner. Just got it today for 8$ and i just finished flashing with latest bios available for this model.
     
  21. Fatal

    Fatal

    Joined:
    Jan 21, 2009
    Messages:
    732 (0.35/day)
    Thanks Received:
    120
    Location:
    Golden, Colorado
    Crap just checked I have a WRT54GS ver. 6. Nice thread though :toast:
     
  22. AsRock

    AsRock TPU addict

    Joined:
    Jun 23, 2007
    Messages:
    10,998 (4.10/day)
    Thanks Received:
    1,723
    Location:
    US
    The Telnet 192.168.1.1 don't seem to work for me even though Telnet client is installed . it just says 'Telnet' is not recognized as an internal or external command,
    operable program or batch file.

    Any idea's ?

    Although just put tomato on my router and it even kept the settings of the old firmware too which saved some time.
     
  23. newtekie1

    newtekie1 Semi-Retired Folder

    Joined:
    Nov 22, 2005
    Messages:
    20,038 (6.15/day)
    Thanks Received:
    6,101
    That means telnet is not installed on your computer. You should be able to install it through the Add/Remove Windows Features.
     
    Crunching for Team TPU 50 Million points folded for TPU
  24. AsRock

    AsRock TPU addict

    Joined:
    Jun 23, 2007
    Messages:
    10,998 (4.10/day)
    Thanks Received:
    1,723
    Location:
    US
    Thats what i thought but.

    Well it's installed i just installed it and rebooted as requested. I'll rtemove and readd it see if it works second time around.

    EDIT: Well i selected it the 1st time requested a reboot ( reboot request was due to removing some thing else ). and just went to uninstall and install it and it was deselected weird so selected it and all sorted now...
     
    Last edited: Feb 27, 2011
  25. johnspack

    johnspack

    Joined:
    Oct 6, 2007
    Messages:
    4,380 (1.70/day)
    Thanks Received:
    864
    Location:
    Nelson B.C. Canada
    I'm always 2 generations behind, so I just got one of these. Running tomato on it, and love it. Would dd-wrt give me any more options, and how hard would it be to flash to it from tomato?
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page