If you do not have your own block of IP-addresses and BGP routing between your different ISP then it is a bit tricky to do load balancing with Linux.
The problem can be devided into two parts. Incoming and outgoing traffic.
Outgoing traffic
There are a few ways to split the traffic between mulitple lines. One way is to add multiple gateways with the ip command.
ip route add default scope global equalize nexthop via "gw1" dev ethx weight 1 nexthop via "gw2" dev ethy weight 1
This is the most simple method. There’s also some problems with it. It confuses some servers who track the IP address of the user (HTTPS is one example).
Another way is to split the traffic by protocol. You mark the packages with iptable and then use “ip” to route the differents protocols to different lines.
ip rule add fwmark 1 table 100 pref 1000
ip rule add fwmark 2 table 200 pref 1000
ip route add table 200 scope global nexthop via x1.x2.x3.x4 dev ethx
ip route add table 100 scope global nexthop via y1.y2.y3.y4 dev ethy
iptables -t mangle -A PREROUTING -i eth0 -p tcp --dport 22 -j MARK --set-mark 1 # ssh
iptables -t mangle -A PREROUTING -i eth0 -p tcp --dport 443 -j MARK --set-mark 1 # https
iptables -t mangle -A PREROUTING -i eth0 -p tcp --dport 110 -j MARK --set-mark 2 # pop3
If 99% of your traffic is http, then this method works poorly.
A third method is to bind multiple nics to one virtual nic with teql. This method works best with normal ehternet and not your internet connection.
I am a network administrator at a site with about 900 residential users and we use the method with fwmark to route all “serious” traffic on line and all other (mostly p2p) to the other line.
Incoming traffic
With this type of traffic you need to be creative with DNS.
Links of interest:
http://lartc.org/lartc.html
http://www.docum.org/docum.org/