Re: Load Balancing over several interfaces

From: Adrian Chadd <>
Date: Fri, 16 Oct 1998 14:37:43 +0800

Teemu Peltonen writes:
>> route add default main_gateway
>> route add net mask secondary_gateway
>Remember that this only balances outbound traffic. Inbound still comes
>whatever route the external routing tables (usually BGP4-entries) define.
>And the outbound traffic is the least of the problems on a proxy server.

If you have two interfaces, then the outgoing connection to a host, unless
FORCED, uses the iP of the interface its going out.

So what Michael did is effectively alternate between two interfaces,
so he's alternating between two source IPs, and therefore, if you have
both IPs on seperate networks announced differently via BGP, traffic
will come in via two links.

Now, depending on your IP stack, outgoing will either all go out the
current default route, or if the TCP stack stores the interface in the
TCP connection state, traffic to a host will go out via that particular
interface even though the default route is pointing out another interface.

In the case of aliases on one ethernet card it doesn't matter though.

Its not that intelligent loadbalancing though, all you have to do is
add into the script an snmpget and some glue logic to determine the load
on an interface, and switch the route over only if the load on an interface
is too high.

Received on Fri Oct 16 1998 - 00:38:35 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:31 MST