  Guspaz Guspaz Premium,MVM join:2001-11-05 Montreal, QC
·Colbanet
·TekSavvy Solutions..
| MLPPP on WRT54G/Tomato, progress report (with download)
As some of you may know, DSL_Ricer and myself have been trying to get MLPPP (hereafter referred to as MP) working on the WRT54G series and Tomato firmware. Although, to be honest, it's 90% DSL_Ricer at this point. When I say "we", it often means "DSL_Ricer", as he's the one doing all the heavy lifting here ;)
There seems to be a fair amount of interest in getting MP working on Tomato, as it drastically reduces costs involved in setting it up. It should also reduce complexity to the point where anybody can do it.
Our initial attempts involved simply enabling MP on the built-in version of pppd included with Tomato. Tomato uses pppd for PPTP tunnels, but uses a separate app called "pppoecd" (seems to be written by Linksys) for doing PPPoE stuff.
Unfortunately, the version of pppd that ships with tomato is ancient, and doesn't support MP. Fine. Next step, recompile a modern version of pppd and try that out. It had support, but was having some odd failures where it failed to negotiate an IP when MP was enabled (all testing to date has been MP on a single DSL line).
We eventually realized that the kernel that Tomato shipped with was really old (2.4.20), and didn't have MP support enabled. Recompiling the kernel with MP support didn't he.
Around that point, Vinch lent us a second WRT54GL, which meant that DSL_Ricer actually had a local test box instead of having to mail me all the binaries and then try it on my WRT at night. He installed OpenWRT on it, as it gives an environment much more conducive to development.
OpenWRT uses the 2.6 kernel, but pppd still wasn't working with mlppp. He tried using the version of pppd from Debian (which has a MIPS port, keep in mind everything going on here is involving cross-compiling for MIPS :P), and boom! It worked.
That was a pretty big point; MLPPP support working on a WRT54GL router, although not the right distro, and the use of a 2.6 kernel meant that there was no support for wireless (a bit of a catch in a wireless router). Since the wireless drivers are binary ones by Broadcom, and nobody has the source, you just can't do wireless with the 2.6 kernel.
Next step was to try OpenWRT's build that used the 2.4 kernel series. It ships with the latest 2.4 kernel (2.4.35, I think). Wireless works, as this is the primary reason that OpenWRT maintains a 2.4 version. Lo and behold, it still worked, and wireless too. Which is nice, except now the big task is to figure out why it works on OpenWRT/2.4.35 and not Tomato/2.4.20.
The next attempts were to try to get Tomato loaded with the OpenWRT kernel. Unfortunately, it just didn't boot, and the only solution would have been to build a serial port for the WRT54GL. This involves equipment that we don't have (and soldering), so it was ruled out.
Last night, though, we had an idea: Maybe we could figure out what changed between 2.4.20 and 2.4.35 in the PPP code that might fix MP support.
DSL_Ricer backported the newer version of ppp_generic from OpenWRT's kernel into Tomato's ancient kernel. Apparently no major hangups, it patched in the diff almost without trouble, just a few changes to get it to compile.
And, to quote Steve Jobs, "boom". PPPd can use MLPPP under Tomato 0.19.
So, at this stage, what we have is a firmware image of a modified Tomato 0.19 that replaces the existing old pppd with the new pppd, and has the kernel patch applied.
What does this mean? It means that you can manually set up Tomato, by the command line, to use MLPPP. We've only tested with single DSL lines (as neither of us have two, so Vinch has been asked to do some testing), and haven't actually done much testing at all yet (we're going to poke at it some at my place tonight). But this was the big milestone we were shooting for.
What are our next steps? We'd like to integrate this into the Tomato GUI. The first step will be to write some sort of interface that will masquerade as pppoecd but will actually be calling pppd. This will enable you to use single-line multilink with Tomato exactly as if you were running the stock Tomato firmware. This has certain "benefits" over not running multilink on a single line.
The next step after that will be to get it working with two DSL lines. We can probably autodetect this scenario by checking for DSL modems on each interface and counting them. Ideally, we can then just automatically run two copies of pppd in a multilink config; I'm not aware of any possible pitfalls, though, so it may not be this simple. Obviously, we'll have to auto-retry on the second link until it hits the same ERX as the first.
So, we actually have a working build now (attached to this post). First, some disclaimers:
1) It has only been tested on the WRT54GL. It should work on the WRT54G (before v5), but WILL NOT work on any other router. It does NOT work on the WRT54GS. This just involves a recompile, but we won't bother until we've got a final solution done.
2) To quote DSL_Ricer, as this is so far poorly tested and rather experimental, "this version may suddenly start eating puppies". Or it might just brick your router. Your risk, here, we're not going to be held responsible for anything that goes wrong, you've been warned!
Now then, you should actually be able to get one or two DSL lines working with it. This is manual, so you're going to have to do it yourself via telnet/ssh, just like setting up stuff on a real Linux box. You may still be able to use the interface for port forwarding, not sure. Here's a sample pppd.conf file:
You'll probably have to change the interface from "br0" to something else. If your modem is plugged into the WAN port, that should be "vlan1". I believe br0 works with the modem plugged into any switch port (except WAN).
You'll also need to create a /etc/ppp/pap-secrets file with your username/password, format looks like this:
To execute this on a single DSL line (with multilink enabled, obviously), you would just call pppd like so:
All errors and warnings will be shoved in /var/log/messages, and you may want to remove "debug" from the config file after you get everything working.
To set up two DSL lines, you should just be able to make a second pppd.conf file (with a different name) that has the different interface that the second modem is on (so perhaps one "vlan1" and one "br0"), and execute a second copy of pppd. You'll need to retry the second link until you get it on the same ERX as the first one. Otherwise it just won't work.
Obviously, since neither of us have two DSL lines, we can't test this. We've got no idea if it'll work, although it should. If those of you who already have things working with two links can point out some stuff that we should know or take into account, please do! |
|
  HiVolt Premium join:2000-12-28 Toronto, ON clubs: | Nice work! I have a 54GSv2 though... 
Any chance you can recompile it for the 54GS? -- GOLF LEAFS GOLF! |
|
 DSL_Ricer Premium join:2007-07-22
| said by HiVolt :Any chance you can recompile it for the 54GS? Again, no guarantees. |
|
  HiVolt Premium join:2000-12-28 Toronto, ON clubs:
·TekSavvy Solutions..
·Bell Sympatico
| said by DSL_Ricer :Again, no guarantees. Any chance this can brick the device? -- GOLF LEAFS GOLF! |
|
 DSL_Ricer Premium join:2007-07-22
edit: May 8th, @05:59PM
| said by HiVolt :Any chance this can brick the device? Yes, although that's only happened to me once (with far more tainted sources). That said, I don't have a GS<v.4 version to test.
BTW, the "short pin 16 to the antenna" de-brick trick worked for me (WRT54GLv1.1). |
|
  HiVolt Premium join:2000-12-28 Toronto, ON clubs:
·TekSavvy Solutions..
·Bell Sympatico
edit: May 8th, @06:03PM
| Cool... BTW, did you guys try to ask the Tomato guys to see if they would incorporate this into a release, that would do the setup via GUI?
Edit: nvm, i never read the entire post. 
Maybe I will wait until you guys get the GUI version working. Im a bit of *nixtard.  -- GOLF LEAFS GOLF! |
|
  Guspaz Guspaz Premium,MVM join:2001-11-05 Montreal, QC
·Colbanet
·TekSavvy Solutions..
| I originally asked the Tomato guy for MLPPP support ages ago, he never even replied. So I don't think I'll bother trying again now that we did it for him :P
DSL_Ricer mentioned a correction I should make, while he took the pppd from Debian mips, he compiled it against OpenWRT due to library reasons.
I also realize that I'm violating the GPL here, but hopefully nobody will mind until we actually have time to post sources. Right now, I'm late for class, and after class, we're going to get back to work on getting this integrated with the UI. Again, hopefully nobody will mind if we're a bit late with source... |
|
 DSL_Ricer Premium join:2007-07-22
| said by Guspaz :I also realize that I'm violating the GPL here Barring reproduction of the content of the GPL that's supposed to be distributed with the binary, you only have to provide the source if they ask. So you're not yet really breaking the GPL. |
|
  An Onymous
@teksavvy.com
| Nice work guys!
Also there seems to be quite a bit of activities (16+ pages of long discussions) on Dual WAN and beyond over at DD-WRT forum too. It is mostly scripts with routing traffic and no mlppp. »dd-wrt.com/phpBB2/viewtopic.php?···54f2704c
Rumor has it is that multiple wan trunking is being worked on for V25 release. »dd-wrt.com/phpBB2/viewtopic.php?···54f2704c
Thankfully, there is a bit of headroom in the WRT hardware. The following is old v23 SP2 in WRT54G v3.1/GL benchmark, but still interesting read: »dd-wrt.com/phpBB2/viewtopic.php?···54f2704c
Ethernet switch alone:70 Mbit/s NAT: 30 Mbit/s (GL), 21 Mbit/s (G v3.1) PPPoE + NAT: 23Mbit/s (GL) RP-PPPoE + NAT: ≈ 6 Mbit/s (GL) WLAN (WPA2) : 24 Mbit/s PPPoE + NAT + WLAN (WPA2): 16Mbit/s at least (GL, see below) RP-PPPoE + NAT + WLAN (WPA):4.6 Mbit/s (GL)
Don't worry too much about GPL at this early stage as long as you guys are intending to provide source to the Tomato project. |
|
 silvercat
join:2007-11-07
·TekSavvy Solutions..
| reply to Guspaz Can't NDISwrapper be used, to get wireless working with a 2.6 kernel ? Also, i think the latest 2.6 kernel has newer broadcom modules: B43, and B44 ? (i don't know *that* much about linux kernel development).
I use firmware from Sveasoft ( »www.sveasoft.com ), for my Linksys WRT54GS router. I wonder if they can get MLPPP included into their router firmware. Unfortunately, it was not a freebie. |
|
  Guspaz Guspaz Premium,MVM join:2001-11-05 Montreal, QC
·Colbanet
·TekSavvy Solutions..
| reply to An Onymous said by An Onymous :Nice work guys! Also there seems to be quite a bit of activities (16+ pages of long discussions) on Dual WAN and beyond over at DD-WRT forum too. It is mostly scripts with routing traffic and no mlppp. » dd-wrt.com/phpBB2/viewtopic.php?···54f2704cRumor has it is that multiple wan trunking is being worked on for V25 release. » dd-wrt.com/phpBB2/viewtopic.php?···54f2704cThankfully, there is a bit of headroom in the WRT hardware.  The following is old v23 SP2 in WRT54G v3.1/GL benchmark, but still interesting read: » dd-wrt.com/phpBB2/viewtopic.php?···54f2704cEthernet switch alone:70 Mbit/s NAT: 30 Mbit/s (GL), 21 Mbit/s (G v3.1) PPPoE + NAT: 23Mbit/s (GL) RP-PPPoE + NAT: ≈ 6 Mbit/s (GL) WLAN (WPA2) : 24 Mbit/s PPPoE + NAT + WLAN (WPA2): 16Mbit/s at least (GL, see below) RP-PPPoE + NAT + WLAN (WPA):4.6 Mbit/s (GL) Don't worry too much about GPL at this early stage as long as you guys are intending to provide source to the Tomato project. I assume RP-PPPoE refers to using rp-pppoe.so with PPPd (which is how we're doing it)... I find it questionable that it would only be able to do 4.6mbit/s with WPA (or 6mbit without), but we'll have to see for ourselves. I find it difficult to believe that pppoecd is that much less efficient than pppd.
I don't know if we intend to provide the source to the Tomato guy; he has shown no interest to date in communication, and I don't intend to go out of my way to get in touch with him. We'll post the source, surely, and maybe even send him an e-mail, but I'm not going to pester him to notice my existence. |
|
  Guspaz Guspaz Premium,MVM join:2001-11-05 Montreal, QC
·Colbanet
·TekSavvy Solutions..
edit: May 8th, @09:26PM
| reply to silvercat said by silvercat :Can't NDISwrapper be used, to get wireless working with a 2.6 kernel ? Also, i think the latest 2.6 kernel has newer broadcom modules: B43, and B44 ? (i don't know *that* much about linux kernel development). NDISwrapper is an compatibility layer for running Windows drivers on Linux... That's not exactly relevant here. |
|
  An Onymous
@teksavvy.com
| reply to Guspaz That is a very old post (2006), so RP-PPPoE they are refering to is 2004. Hopefully, they have improve it since.
On page 2 of the link: >Regarding the rp ppoe module... >DD-wrt use PPPoE Version 3.5, Copyright (C) 2001-2006 Roaring Penguin Software Inc.
>rp pppoe 3.5 is very very old... (It was released Almost 2 years ago) |
|
  JayMan Whoot Premium join:2002-06-05 Earth | reply to Guspaz Once you get a GUI for this I will switch over to it. -- »www.freeourbandwidth.com |
|
  infamouskid
join:2007-01-24 North York, ON | reply to Guspaz ok so in non geek language what does this firmware do? i have an earlier tomato release running already. what makes this one any diff? -- "carpe diem" |
|
 gord27
join:2005-05-01 Mississauga, ON | reply to Guspaz will this work on the 350n i have sitting around? |
|
  anon58325090
@teksavvy.com
| reply to infamouskid said by infamouskid :ok so in non geek language what does this firmware do? i have an earlier tomato release running already. what makes this one any diff? It's a Tomato based Firmware with a few updates/upgrades to it so that it supports MLPPP for people with dual DSL service in their house instead of having to run a server to bond the two connections they just have to run this firmware on a wrt54gl router. |
|
  anon58325090
@teksavvy.com
| reply to gord27 said by gord27 :will this work on the 350n i have sitting around? Yes I would like a copy of the firmware for a wrt350n as well. is there a Tomato firmware support for that model? I currently run DD-WRT on it now and am interested in getting a 2nd dsl line if this will work.. |
|
  Guspaz Guspaz Premium,MVM join:2001-11-05 Montreal, QC
·Colbanet
·TekSavvy Solutions..
| reply to Guspaz There's no support for it, and likely never will be; this will only work on Tomato-supported routers, and that's a pretty short list at present:
»en.wikibooks.org/wiki/Tomato_Fir···_devices
An Onymous: It turns out that the RP PPPoE that they're talking about is not the same thing (the rp-pppoe.so module for pppd). Apparently the PPP stuff is all done in the kernel anyhow, so (paraphrasing DSL_Ricer here) it seems that rp pppoe is a userland driver.
Early tests at my place showed that we were able to get an MLPPP connection (on a single link), although it segfaults connecting on the interface vlan1. Creating a bridge for vlan1, though, works fine. DSL_Ricer is going to look into that.
We took some trivial steps tonight to try to get Tomato to think pppd was actually pppoecd (as in, run pppoecd, kill it, run pppd, see if it still reports the status). That didn't go too well, but that was only meant to be a short-term solution so that I can kill the damned VMWare image that I'm currently using as my router (a rather convoluted setup).
It doesn't look terribly hard to swap out pppoecd for pppd (it's managed by the "rc" process) in code. So getting single-link MLPPP is our first goal (as it has certain, ahem, benefits). Getting it working with multiple links will be a tad trickier. |
|
  JayMan Whoot Premium join:2002-06-05 Earth | reply to Guspaz Whoot, I got two WRT54GL ready to play with and 2 DSL lines ready to go. -- »www.freeourbandwidth.com |
|