See the problem you end up with trying to load balance one stream onver 2 connections is this: Let's say 6
packets need to be sent from A to B - wan0 might get 1, 3 and 5. wan1 would then do 2, 4 and 6. In an ideal world, router B would receive this in order, 1, 2, 3, 4, 5, 6. But the possibility is very real that the kernel gets it like this: 2, 1, 4, 3, 6, 5. The problem is that this confuses TCP/IP. While not a problem for links carrying many different TCP/IP sessions, you won't be able to bundle multiple links and get to ftp a single file a lot faster, except when your receiving or sending OS is Linux
, which is not easily shaken by some simple reordering.
However it looks like TEQL will do this. So here are some _generic_ instructions to get started with it.
Load a TEQL kernel module
modprobe sch_teql
Setup queueing disciplines on each wanpipe interface using iproute2 utility called 'tc'.
tc qdisc add dev wan0 root teql0
tc qdisc add dev wan1 root teql0
Interfaces wan0 and wan1 could be running any protocol WANPIPE supports (PPP, Frame Relay, CHDLC ...)
The device teql0 is basically a round-robbin distributor over wan0 and wan1, for sending packets. No data ever comes in over an teql device, that just appears on the 'raw' wan0 and wan1.
Set the ip address of teql interface. Note, the ip address used is ARBITRARY, it is fake.
The reason for this is that packets will be forwarded through this ROUTER, thus packets will never originate from this box.
This means, however, that pinging from this machine will not be possible (your local address if fake).
ip addr add dev teql0 10.0.0.0/32
ip link set teql0 up
ip route del 10.0.0.0/32
ip route add default dev teql0
IMPORTANT: The default route must be on teql0 device.
echo "0" > /proc/sys/net/ipv4/conf/wan0/rp_filter
echo "0" > /proc/sys/net/ipv4/conf/wan1/rp_filter
Replace WAN$ with ppp$ This probably will not work, but it's worth a shot.