LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Load Balancing Over 2 Internet connections.

[ILUG] Load Balancing Over 2 Internet connections.

Paul Jakma paul at clubi.ie
Tue Sep 6 03:47:48 IST 2005


On Mon, 5 Sep 2005, Ciaran Johnston wrote:

> What is wanted is something like this:
> http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.rpdb.multiple-links.html

> Which, of course, I haven't tried.

I've used:

 	http://hibernia.jakma.org/~paul/rc.iprules

It doesn't do anything to try detect which links are useful and 
working, but then again, any packets needing this script can't go out 
the any other link anyway..

The above plus a dynamically modified default route in the main table 
(eg using some script as described in previous post, or read on) 
would do the trick.

Getting ISP co-operation is even better (BGP or even just a default 
announced via RIP - I wish ISPs would do that per default). You might 
also be hack something up using the fact that PPP has its own 
link-heartbeat capabilities. Eg use 'ifplugd' or the 'zebra'[1] 
daemons to change the routes according to whether ppp interface is 
IFF_RUNNING or not.

IMHO, zebra would do it better[6].

1. That'd be the 'zebra' daemon from the Quagga[2] package, not from
    the deep-freeze GNU Zebra[3] package (which is not capable of
    link-detection[4])

2. http://www.quagga.net, 'apt-get/yum install quagga'

3. http://www.zebra.org

4. Available on Linux and Solaris, not yet in {Net,Free}BSD but I 
think the ports for each of those have the required patch. Then put 
the following in /etc/quagga/zebra.conf:

-----------------------------------------------------
interface <first ppp interface name>
   link-detect

interface <second ppp interface name>
   link-detect

route 0.0.0.0/0 <peer address on first ppp interface>
route 0.0.0.0/0 <peer address on second ppp interface>
------------------------------------------------------

Start zebra (service zebra start on FC, you have to edit something 
first on debian i think, 'svcadm enable zebra' on Solaris 10), then 
if everything goes as it should[5], whenever one of the PPP 
interfaces loses link, zebra should notice and should automatically 
update the default route in kernel.

5. This depends on PPP being a good bunny and toggling IFF_RUNNING to 
reflect link-state as it should, I think it /does/. Even if it 
doesnt, it /does/ however (i'm pretty sure) remove the addresses 
concerned which should still be enough for zebra to be able to notice 
(cause the target address for the relevant route will have 
disappeared).

6. If you use ifplugd you have to write your own scripts, etc, to 
update the routes. Using the zebra daemon, all you need is the above 
configuration really, it does everything else automagically.

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Fortune:
Generosity and perfection are your everlasting goals.



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell