Author Topic: Loadbalancing with same gateways?  (Read 2316 times)

w00t

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Loadbalancing with same gateways?
« on: May 15, 2011, 07:53:55 pm »
Hello,

To make a long story short, I wonder if its possible to re-write the loadbalancing "scripts" to accept more than 1 external WAN with the same gateway?

I would like to use the loadbalancing feature with 5 IP's, all with the same gateway and the same wieght.

The IP's is not static, they are assigned as DHCP from my ISP.

( IP's are made up  )

IP1 = 85.100.101.10
IP2 = 85.100.101.11
IP3 = 85.100.101.12
IP4 = 85.100.101.13
IP5 = 85.100.101.14

All have the same gateway = 85.100.101.1

The problem is that, of course, all my IP addresses have the same gateway address. Which means that when I configure eth1,2,3,4,5 as DHCP and External Interface, I get the error message that "85.100.101.1" already exists. Which makes the "Gateway tab" inaccessible and only this error-message is posted.

Since I got 10Mbit upload per IP, using loadbalancing will make it 50Mbit with torrents and such. But the loadbalancing service in Zentyal is based on different gateways but in theory it wouldn't matter if the WAN's in the pool is using the same gateway if they have the same weight, right? I just want every other packet on the next wan and so on.

something in theory like;
Code: [Select]
ip route add default scope global nexthop via XXX.XXX.XXX.XXX dev *interface1* weight 1 nexthop via XXX.XXX.XXX.XXX dev *interface2 weight 1...
Any ideas?

Sam Graf

  • Guest
Re: Loadbalancing with same gateways?
« Reply #1 on: May 15, 2011, 09:08:00 pm »
I've also thought about this, since I too have access to five addresses (static, in my case), with each address offering full bandwidth. And all five addresses are provided through a single gateway address.

It makes sense to me (for what it's worth) that load balancing can't be through a single gateway, regardless of the number of addresses available through that gateway. How would it work to balance traffic from a single source against itself?

Maybe there's a supported method for utilizing the bandwidth available to multiple public IP addresses through a single gateway, which isn't load balancing but is full bandwidth utilization. I just haven't taken the time to work that out.

w00t

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Loadbalancing with same gateways?
« Reply #2 on: May 15, 2011, 11:16:25 pm »
I've also thought about this, since I too have access to five addresses (static, in my case), with each address offering full bandwidth. And all five addresses are provided through a single gateway address.

It makes sense to me (for what it's worth) that load balancing can't be through a single gateway, regardless of the number of addresses available through that gateway. How would it work to balance traffic from a single source against itself?

Maybe there's a supported method for utilizing the bandwidth available to multiple public IP addresses through a single gateway, which isn't load balancing but is full bandwidth utilization. I just haven't taken the time to work that out.

Yeah, then you know what I'm talking about.

I understand what you mean. But in this case we aren't "loadbalancning". We are using the loadbalancing principle to divide out our packets on every WAN available. Since we use all our WAN's in the pool with the same weight we don't use any failover system, just kinda of a round-robin thinking.

The built in loadbalancing service should'nt care about the gateway if all WAN's have the same weight. If you look at my paste within "code". Just every other packet on the next interface (via the gateway of interface1).

ClearOS ( http://www.clearfoundation.com/ )
and
pfSense ( http://pfsense.org/ )

both support this. I've used them both and currently use a virtualized pfSense-box for this task. But since I only use this in my home-environment I would like to remove some servers and combine them to a single box (therefore, Ubuntu with Zentyal is THE way to go) and i still want to solve this in some way.

So, you think there is some possibility to just change some code and do this? :)

EDIT:



http://data.fuskbugg.se/skalman02/4dd045664e3c1_pfsenseloadbalancing1.jpg

Here's an pic kinda how it works with pfSense for example.

and clearOS seems to only monitor IP instead of gateway.

« Last Edit: May 15, 2011, 11:40:31 pm by w00t »