D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] iptables - multiple routes and load balancing?

 

On Mon, 21 Sep 2009 17:04:45 +0100
Simon Waters wrote:

> Grant Sewell wrote:
> >
> > I'm guessing iptables is capable of loadbalancing over multiple
> > routes, but how would I go about having multiple "default" routes
> > and balancing over them?
> 
> Don't guess - read the LARTC HowTo
> 
> http://lartc.org/howto/lartc.rpdb.multiple-links.html

Thank you both for pointing me towards this.  I think it is the
starting point I'm after, but there's still one thing concerning me.
As I can see it, this article discusses the idea of load balancing
traffic routing over two interfaces in separate networks - essentially
the device doing the load balancing would have 3+ interfaces, each on
their own net/subnet.  This, of course, is relatively easy to setup on
most routers worth their salt.

What I'm thinking of, however, is the ability to direct traffic to
different routers.  So, rather than the load balancing device having 3+
interfaces on their own net/subnets, it would have 1 interface on the
same net/subnet as two different routers (ie all devices in
192.168.1.0/24) ie:
  Router 1 = 192.168.1.1/24
  Router 2 = 192.168.1.254/24
  eth0 = 192.168.1.2/24

Of course I could add 2 subinterfaces (eth0.1 and eth0.2) with
addresses in different nets/subnets and modify the routers to have
corresponding IP addresses, but that then essentially turns the proxy
machine into a router.

Grant.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html