[ale] Load Balancing Across Multiple Interfaces
Ronald Chmara
ron at Opus1.COM
Fri Apr 23 22:29:48 EDT 2004
> On Thu, 2004-04-22 at 17:09, Kevin O'Neill Stoll wrote:
>> Hey all,
>>
>> I have been googling for information on configuring two
>> interfaces to respond to the same ip address in order to
>> share the load of requests and possibly provide some
>> fail-over.
>>
>> I have found a lot of information on multiple ip's per nic
>> but not multiple nics per ip.
>>
>> Could someone point me in the right direction?
>>
>> Thanks
Get an ip address (or two, or whatever). Bond it to "lo" (not a card,
but in the box).
In the router upstream, make static routes for those ip addies,
pointing to each separate card.
linux box:
111.111.111.110 (eth0)
111.111.111.111 (eth1)
111.111.111.112 (lo:1)
111.111.111.113 (lo:1)
router:
route 111.111.111.112 255.255.255.255 111.111.111.110
route 111.111.111.112 255.255.255.255 111.111.111.111 100
route 111.111.111.113 255.255.255.255 111.111.111.111
route 111.111.111.113 255.255.255.255 111.111.111.110 100
turn on ip forwarding in the kernel.
What you are doing:
Telling the packets that come into the router to be sent to multiple
cards in a linux box, rather than to specific addresses bonded onto the
cards.
Why this works:
The linux box has the IP addresses bonded to loopback, so it recognizes
the addresses as its own. The router sends to addresses based on
availability.
Why use round robin:
To get rid of route preference bias in routers.
Most people look at me funny when I explain this, but it's a great way
to have any number of addresses on a machine, and a card can die, a
cable can die, and the machine keeps running, the services stay
'alive".
-Bop
More information about the Ale
mailing list