Reply To: Multiple gateways.

#50172

houkouonchi
Member

@ppalias wrote:

If you have 2 network interfaces in the same subnet, then you MUST bridge them. In some routers, e.g cisco, it is not allowed on a router to have such a configuration. So bridge the interfaces and the on the BRIDGE interface assign as many IPs/Netmasks you want and the Gateway will only one.

I don’t see how this would work in the case of a net balancer situation as you can’t really set the source IP (or source interface) so what would make it not always go out one interface? I would think you could do this with something like say you have:

ETH00: 1.1.1.30/24
ETH01: 1.1.1.40/24

You could run something like:

ip route add table line1 to default via 1.1.1.1 dev ETH00
ip route add table line2 to default via 1.1.1.1 dev ETH01
ip rule add from 1.1.1.30 table line1
ip rule add from 1.1.1.40 table line2
ip route add default scope global nexthop via 1.1.1.1 dev ETH00 weight 1 nexthop via 1.1.1.1 dev ETH01 weight 1

Which would be load balanced but I see absolutely no way to get this behavior in zeroshell (load balance two connections that are on the same subnet).

Am I missing something or are you just saying its not possible? I can easily see this situation arising if you wanted to load balance multiple connections all from the same ISP. It seems like this would be possible if when setting up the net balancer you chose both the gateway IP address *AND* the interface but not when you just chose one or the other.