Re: [LARTC] Loadbalancing the gateway

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You might try multi-path routing. It doesn't exactly load balance the lines, as in aggregating the bandwidth together, but it does allow N number of simultaneous connections (where N would be the maximum number of different routes you have).

In your scenario, let's say you have the 3 routers with IP addresses of 1.1.1.1/30, 2.2.2.2/30, and 3.3.3.3/30. Now, you have your Linux firewall/gateway/router/thingy between the routers and the client. On your Linux box, you could have 3 separate network cards each connected to one of the routers, or you could have a single network card connected to all three routers via a hub or switch (switch would probably be better). Let's say you have one network card. In that scenario, you would assign an IP address in each of the network ranges for the each of the routers. I.e., 1.1.1.2/30, 2.2.2.3/30, 3.3.3.4/30 (note: these IP address are probably completely incorrect for assignment in the network range I have chosen, just using them as examples; you would get usable IP's from your ISP). To assign these IP address, use the 'ip' command.

ip addr add 1.1.1.2/30 brd + dev eth0
ip addr add 2.2.2.3/30 brd + dev eth0
ip addr add 3.3.3.4/30 brd + dev eth0

Now, you will need to setup the multi-path route as your default route. You can specify the 'equalize' parameter if you like, but I have found that it doesn't do exactly what you might expect it to do.

ip route add default nexthop via 1.1.1.1 dev eth0 \
                    nexthop via 2.2.2.2 dev eth0 \
                    nexthop via 3.3.3.3 dev eth0

And that should take care of that. Now all of this is assuming that you have multiple, different IP ranges for your 3 ISDN lines. If they are all in the same network range, you can forego having 3 IP's assigned to the same network card on your firewall. In that case you would only need one. Then substitue appropriately for the router IP addresses.

Logu wrote:

Hi,
I have 3 isdn connections. Is it possible to loadbalace the bandwidth using
a linux box in between the routers and the client. I will be very much
greatful to you if someone helps me in this.

-Logu


_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/


-- Jason A. Pattie pattieja@xxxxxxxxxxxxxxx






[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux