Packet load balancing over two ISP

Today I’ve been wondering how to loadbalance my home traffic accross two connexions. I had already done some load balancing but the solutions were only possible using a route-based algorithm so, no real gain from using such a method with a small used connexion. What I want to achieve today is sharing link by packet equally over two links.

The A Host is simply my gateway at home while the B one is a server hosted with a 100mbps link on internet. For this to work, we will establish two tunnel connection, one accross each connexion. This will not be covered by this howto. When you have your two tunnel working accross your two link, issue the following commands:

  1. tc qdisc add dev tap0 root teql0
  2. tc qdisc add dev tap1 root teql0
  3. ip link set dev teql0 up
  4. echo 0 > /proc/sys/net/ipv4/conf/eth1/rp_filter
  5. echo 0 > /proc/sys/net/ipv4/conf/eth2/rp_filter

Assign some ip range to both side of the tunnel and the teql0 interfaces:

On A:

On B:

And you’re set, just make a simple connection sharing on B and set the default route of A to go through teql0n interface.

With two VDSL connexions of 18mbps each, I’ve achived following results:

This entry was posted in Networking. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *