DD-WRT and PPPOA BT ADSL using a ST510 v6

This is something I did a while ago, but I thought I should write it up properly.

The problem:

DD-WRT does not support PPPoA ADSL.

For my old PPPOE ADSL internet connection I had a WRT610n v2 running DD-WRT and a separate simple ADSL2+ modem (ST510 v6) which I have running in bridged mode to avoid double NAT. This worked great as DD-WRT supports PPPOE, however I moved house and had to set up a new connection with British Telecom who use PPPOA.

Phoning BT tech support was as pointless as I thought it would be. DD-WRT does not appear on their scripted responses and they all think that the BT Home Hub is the best thing since boobs despite the fact that it is quite clearly crap – a single gigabit ethernet port! Really? WTF?

The solution:

Basically I had to set up the st510 v6 modem into half bridging mode. From what I understand of it, this involves getting the modem to handle the PPPoA connection, then enabling PPTP on it for the DD-WRT router to be able to connect to it and supply the credentials.

To configure the modem:

  1. Use the standard wizard in the web interface and choose any configuration you like (I picked a PPPoA template) but make sure that you choose a VPI/VCI that is NOT 0.38. Complete the wizard and let the thing settle.
  2. Use the web interface to configure the modem how you like. Things you probably want to do include:
    1. Disabling the firewall (the DD-WRT router has a better one)
    2. Setting the password to something decent
    3. Turning off DHCP (again we’ll let DD-WRT handle that)
    4. Simplifying the network interfaces. My modem defaults to have an IP of 10.0.0.138 which is fine, but it also creates a vlan in the 192.168.1.x range. I removed this. N.B this is why you have to assign your local IP statically for this part.
  3. Restart the modem just to help it settle.
  4. Telnet into the modem (Google it if you’re not sure what telnet is)
  5. Issue the following commands:
    (You can ignore any messages about things being in use and unable to be deleted)

    ppp relay flush
    eth flush
    atm flush
    ppp flush
    atm phonebook flush
    saveall
    atm phonebook add name=BrPPPoA_ph addr=0.38
    service system modify name=PPTP state=enabled
    saveall
    exit
  6. Use the modem’s web interface to restart the modem.
  7. Hook the modem up to the wan port of the DD-WRT modem and log into DD-WRT.
  8. In the wan settings of DD-WRT use settings like mine:DD-WRT PPTP Settings
    (Don’t worry about the subnet mask and gateway, they will set itself when your connection is established).

That’s it! Good luck 🙂

Originally posted on the BT forums here: http://community.bt.com/t5/BB-Speed-Connection-Issues/Alternative-Modem-Router-using-DD-WRT/td-p/295165

Advertisements

DD-WRT on the Asus RT-N66U – with 64K CFE

UPDATE March 11 2014: I recently updated to the latest K3.x build (23598). I can confirm the following:

  • It is not necessary to upgrade your CFE if you intend to use a K3.x build.
  • USB & MMC support is now working.
  • It is possible to install Optware following these instructions: Optware The Right Way – Take 2
  • Enabling QoS results in reboots every few minutes, or more regularly if under load.
  • Apart form QoS issue above, it seems stable.

UPDATE Jun 10 2013: It would seem that Asus have released a new hardware variant of this model (B2) which is not compatible with this guide. Before you do anything you must check that you have an original hardware version. You have been warned.

UPDATE Nov 20 2013: Since writing this guide, the DD-WRT builds available have improved significantly and as such, the process of flashing them is probably a lot simpler. I am still running build 20363 which I originally flashed, when I have time I will try the new builds. When I have done so I will update this guide accordingly, however until that time you should probably not use the guide below and instead refer to the DD-WRT forums (linked below).

So today I received my fancy new router, chosen because it is a beast and from a quick peruse of the DD-WRT wiki and forum, it seemed I would be able to load DD-WRT on it without too much trouble.

For those who don’t know, DD-WRT is an open source, community maintained router firmware which can turn a consumer router into something any sysadmin would be proud of. I personally love it for the hundreds of features, easy to use UI and active community. From the first time I used it, DD-WRT compatibility has been a prerequisite for any new router purchase.

Check out the features here: What is DD-WRT?

From experience, flashing DD-WRT on a router can be challenging and has been known to result in an expensive paperweight or two so the golden rule is read all the forum threads you can find. This is particularly true if you are dealing with a newish device, since the kinks are probably being worked out and so it is important to have all the latest info before you start.

I have to give full credit to the DD-WRT community for making this possible, so all I want to do here is provide a write up of my experience to try and pull all the information together. Special thanks to Fractal for providing the 64K CFE compatible build.

N.B. This guide includes upgrading your CFE to 64K and at the time of writing means that you cannot install a standard DD-WRT firmware, Fractal has been kind enough to compile a 64K CFE compatible version which you must use.

Preparation:

  1. Fire up the new router, hook it up to your PC with an ethernet cable and point your browser to 192.168.1.1. I aborted the Asus setup wizard it tried to take me through and just jumped straight into configuring manually.
  2. Install the latest version of the Merlin flavour of the Asus stock firmware. You need to do this because it supports SSH, which makes life easier and allows you to display the version of the CFE, which tells you whether or not you need to manually update the CFE.
    You can simply download the latest .trx file from Merlin and flash it using the router’s web GUI.
    IMPORTANT NOTE: It is essential to upgrade to the latest Merlin firmware before upgrading your CFE. If you don’t, you will end up with a brick.
  3. Let the router flash the Merlin firmware and wait until it has rebooted and settled down.

Upgrading the CFE:

UPDATE: There have been reports recently that flashing recent versions of the stock (and so also Merlin’s) firmware result in CFE version 1.0.1.3. However, equally others have not found this to be the case. My suspicion is that ASUS has loaded units manufactured more recently with the 1.0.1.3 CFE. You must flash the latest Merlin build and verify that the CFE is at version 1.0.1.3 or higher using the GUI. If it is, you can skip this section – if not, you’ll have to update it yourself.

  1. Using your browser of choice (IE sucks by the way), load up 192.168.1.1 again and click on ‘Tools’ on the left-hand menu. This will take you to a page where you can see the current CFE version. This will be 1.0.1.2 currently. We will be upgrading to 1.0.1.3.
  2. Under ‘Administration’ enable SSH and also Telnet (just in case).
  3. Follow these instructions to perform the update.
    1. Because you used the Merlin firmware earlier, you can easily use SSH to connect to the router to do this. If you are not familiar with SSH, you should probably not be attempting this.
    2. I hadn’t plugged my router into the internet yet, so I used SCP to transfer the cfe_n66u-1.0.1.3-4.tgz file to the router instead of downloading it directly using wget as the guide suggests, but either is fine.
    3. Here’s the output from my upgrade:
      ASUSWRT RT-N66U_3.0.0.4 Sun Dec 16 01:33:41 UTC 2012admin@RT-N66U:/tmp/home/root# ls -alh
      drwx------ 3 admin root 80 Dec 31 12:10 .
      drwxr-xr-x 3 admin root 60 Dec 31 1969 ..
      drwx------ 2 admin root 60 Dec 31 12:04 .ssh
      -rw-r--r-- 1 admin root 156.5K Dec 31 12:10 cfe_n66u-1.0.1.3-4.tgz
      admin@RT-N66U:/tmp/home/root# tar -zxvf ./cfe_n66u-1.0.1.3-4.tgz 
      nvsimple-mipsel
      diff
      cfe_n66u-1.0.1.3.empty.bin
      cfe_update.sh
      admin@RT-N66U:/tmp/home/root# ls -alh
      drwx------ 3 admin root 160 Dec 31 12:11 .
      drwxr-xr-x 3 admin root 60 Dec 31 1969 ..
      drwx------ 2 admin root 60 Dec 31 12:04 .ssh
      -rw-r--r-- 1 admin root 156.5K Dec 31 12:10 cfe_n66u-1.0.1.3-4.tgz
      -rw-rw-rw- 1 1000 1000 130.3K Oct 2 2012 cfe_n66u-1.0.1.3.empty.bin
      -rwxrwxr-x 1 1000 1000 1.8K Dec 3 2012 cfe_update.sh
      -rwxrwxr-x 1 1000 1000 90.5K Dec 3 2012 diff
      -rwxrwxr-x 1 1000 1000 8.8K Dec 3 2012 nvsimple-mipsel
      admin@RT-N66U:/tmp/home/root# ./cfe_update.sh /dev/mtd0ro
      [1/4] Dumping default NVRAM settings from original CFE…
      nvram header found:
      start0x400
      end0x1374
      len3956
      crc0x03
      ver0x01
      [2/4] Preparing new CFE…
      nvram header created:
      start0x400
      end0x137c
      len3964
      crc0xed
      ver0x01
      [4/5] Checking differences between NVRAM from old and new CFE's
      --- nvram_orig.txt2010-12-31 12:11:30.359770287 -1200
      +++ nvram_updated.txt2010-12-31 12:11:30.419770287 -1200
      @@ -1 +1 @@
      -bl_version=1.0.1.2
      +bl_version=1.0.1.3
      @@ -16,0 +17 @@
      +odmpid=ASUS
      If you see only two differences: one is for 'bl_version' variable change
      and second is a new 'odmpid=ASUS' variable then all goes well!
      [5/5] Flashing new CFE…
      Do you want to flash a new CFE bootloader that? [y,n]y...flashing…
      Update completed. Old CFE is stored to cfe.old file, a new one - to cfe.new
      It's strongly recommended to store them, just in case.
      Please note, your personal MAC addresses in there, do not distribute them.
    4. Really do back up your old CFE file, the script creates a backup for you, all you need to do is SCP it off and save it somewhere safe. You’ll probably never need it again, but if you do, you’ll really need it.
      • You can do this using SCP. On a Linux or OSX machine you can use the terminal:
        scp root@192.168.1.1:/tmp/home/root/cfe.old .

        or you can use FileZilla or WinSCP to connect as an SFTP client if you want a nice gui to browse the router and download the file. This is probably the easiest way for Windows users.

    5. Check that the new CFE version is reflected in the web GUI under ‘Tools’. I didn’t seem to have to reboot for the change to be reflected.
    6. Re-boot the router. I just hit the power button.

Flashing DD-WRT:

  1. Flash Fractal’s special 64k CFE compatible firmware. I downloaded version 20363 from here, however there is a new version 21402 available here. You can just flash this through the web GUI as usual.
    1. Do check here for any newer builds. If you see a newer build, really do go and read the forum to find out how people are getting on with it.
    2. Make sure you flash a 64K build. These can be identified by the ‘_64K.trx’ file ending. The other builds are 32K and will result in bricking.
  2. Let the router flash the DD-WRT firmware and wait until it has rebooted and settled down for at least 5 – 10 minutes. Mine seemed to finish very quickly, but the advice of the forums is to give it some time.
  3. Perform a 30-30-30 reset to clear the NVRAM and round everything off.
    1. N.B. This router model uses the WPS button instead of the usual reset button. (Like the RT-N16).
  4. All done 🙂

At the time of writing I have just finished this and so can’t comment on stability just yet, but it seems solid enough and I have had no trouble configuring it. In 20 minutes I had swapped out my old router and the RT-N66U is now managing my whole home network. Seems good so far.
UPDATE: I have been running this build for several months now and I can confirm that it is solid as a rock.

This post was written to collect all the information at the time of writing together. Obviously it may get out-dated. As such it is essential to read the following for the latest updates before you attempt this yourself: