Total Pageviews

Saturday, 18 May 2013

Asus RT-N56U Router with Stock Firmware & Sky Fibre

Wow, what a nightmare Sky Fibre is. All I wanted to do was replace the crappy Sagem wireless router with my Asus Black Diamond router and it turned out to be a 3 week sprint of reading about Asuswrt, Tomato and udhcpc. Turns out that yes, it's a pain to setup, but it's definitely possible... and with the stock firmware! :-D

So, how does it all work?

Well, firstly, the Sagem router communicates the with BT OpenReach modem like any other ethernet based device, except it uses MER (MAC Encapsulated Routing) to authenticate the device so that you can't just plug in any old router. What does this actually mean? Well it means the Sagem router sends some very specific information to the OpenReach modem, the client id.

This client id is naturally not found in any configuration screen, you have to sniff it out of a DHCP packet to get it.

  • You have to connect your laptop/system via ethernet to the Sagem router and make sure nothing else is connected.
  • Then give your laptop/system a static ip.
  • You'll then need to fire up a packet sniffing tool like Wireshark.
  • If you start capturing from your ethernet port (eth0 most likely)
  • Then turn on the Sagem router you'll get a lot of packets come back
  • The one you are interested in is the DHCP packets (under protocol these are marked as DHCP). 
  • Open it up and look for the client identifier field (should have the number 61 beside it)
  • Right click it and find the option to copy the value (plain text, or something similar)
  • If you've done it right on paste you should see something like xxx@xxx|password.
  • You'll need to convert that to HEX, use any old web site for this and make sure you remove spaces.

Once done, you'll need to telnet into your Asus RT-N56U. This must be enabled first in the Administration section in the web interface. Once in you'll find that udhcpc is already running (just run ps to see active process's). This is the process that negotiates the IP with the BT OpenReach modem. Copy down the name of the process, something like:

udhcpc -i eth3 -p /var/run/ -s /tmp/udhcpc -O33 -O249

Kill the existing process via killall udhcpc

Then start it again, but this time with your client identifier i.e. something like:

udhcpc -i eth3 -p /var/run/ -s /tmp/udhcpc -O33 -O249 -x 0x3d:###HEXUSR&PASSWD###

Then plug in your BT OpenReach modem into the WAN port and if it has all worked, after a couple of messages it will successfully get an IP and your internet connection will be up.

No more Sagem router! :-)