Jan 192010

I’ve been running Multilink PPP with FreeBSD for several years now. Multilink PPP (sometimes called MLPPP) is a subset of the PPP protocol that allows you to bond multiple PPP tunnels and treat them as one much larger tunnel. Several DSL providers (particularly TekSavvy in Canada) support Multilink PPP on their DSL networks, allowing users to bond multiple DSL lines into one large pipe.

The technical details of Multilink PPP are pretty simple, though it can be configured in either a packet splitting or round robin fashion. When configured for packet splitting, a router that is about to transmit a packet down an MLPPP link will first split the packet in half, then add a 6KB MLPPP header (really just a sequence number) to each half of the packet, and send the half-packets down each link. On the other end of the MLPPP link, the receiving router will take the two halves (identified by the matching MLPPP headers) and reconstitute the original packet. In round robin mode the MLPPP header is added to the whole packet (meaning the MTU of the link is 6KB smaller or else packet fragmentation will occur) and sent out the links in a round robin fashion.

In FreeBSD it’s easy to setup just about any Multilink PPP configuration you want. I’ve run it with three DSL lines (total usable throughput: 15 megabits). Presently I’m running over one DSL line but with two PPPoE tunnels first multiplexed at the DSL frame level and then bonded at the PPP level. The purpose of this is to circumvent Bell Canada’s throttling, which they apply to both their own residential customers and to their third-party wholesale partners, like TekSavvy.

Support for Multilink PPP can be found in both the Userland PPP daemon in the base system, and in the Multilink PPP Daemon found in the ports collection (/net/mpd5). Userland PPP will require more CPU resources and might incur a (very) small latency hit, as the packets have to cross over into userland to be processed. MPD uses the netgraph modules to process the connection in kernel space, which lowers the overhead for processing. However, if you’re going to be using MPD I’d recommend recompiling your kernel to include the netgraph modules (indeed, it may be required that you compile them in).

To use Multilink PPP with FreeBSD’s Userland PPP daemon, place the following in your /etc/ppp/ppp.conf and edit to suit your needs:
set log Phase Chat LCP IPCP CCP tun command
set ifaddr
disable ipv6
set authname username
set authkey password
set dial
set login
set hangup
set speed sync
enable tcpmssfixup
disable ipv6
disable lqr acfcomp pred1 protocomp vjcomp deflate chap81 pap
deny lqr acfcomp pred1 protocomp vjcomp deflate chap81 pap
accept pap chap
set timeout 0
set server /var/run/ppp=tun%d 0177
clone 1,2
link deflink remove
link 1,2 set mode ddial
link 1 set device PPPoE:em0
link 2 set device PPPoE:em0[/cc]
The above config is a pretty standard ppp.conf file for a DSL connection. The only real novelty is that before I attach the tunnel to an interface I first clone it, and then attach each clone to an interface. In my case I attach each clone to the same interface, but that’s because I have only one DSL connection. If I had two (or three, etc) I would attach each clone to the interface connected to each modem (em0, em1, em2, etc).

You’ll also need the following lines in your /etc/rc.conf file:
[cc line_numbers="off"]ppp_enable=”YES”
The profile name has to match the profile name you used in your ppp.conf file. I disable ppp_nat mode because I use pf to handle my NAT needs.

At this point you can either reboot your box, or run this command: ppp -ddial multilink

  2 Responses to “FreeBSD and Multilink PPP”

  1. Hi Mike,

    Please let me know in detail what DSL modem you are using for MPPP setup.

    Thank you,

  2. ipons,

    I’m using a Thompson Speedtouch 516 at present, and am generally very happy with it’s performance. I only have one in the multilink config right now, but I also used 516s when I ran a three line configuration. All three lines were running at 6016kbps downstream in fastpath mode (as opposed to interleaved), which is the fastest DSL profile available in the area at the time. After accounting for PPP overhead, the usable throughput was 1.5 megabytes/sec down. Pretty sweet.

    When I first setup my three line configuration I didn’t have three 516s though. I had one 516 and two Thompson Speedtouch 585s. However, when I fired up an Ubuntu torrent and maxed out the connection the two two 585s would last for just a few minutes before crashing. I would have to power cycle them in order to bring them back into working order. I’m not sure why they would crash when the 516 didn’t since I believe they’re largely the same hardware in terms of the DSL component, and since the modems were operating in bridge mode they shouldn’t actually have to work very hard. But crash they did.

    Most any modem will work, but clearly not equally. Hope that helps.

Sorry, the comment form is closed at this time.