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 10.0.0.1/0 10.0.0.2/0
set authname <em>username</em>
set authkey <em>password</em>
set speed sync
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
link deflink remove
link 1,2 set mode ddial
link 1 set device PPPoE:em0
link 2 set device PPPoE:em0
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:
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