All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lopsch <lopsch@lopsch.com>
To: Netfilter-Mailinglist <netfilter@lists.netfilter.org>
Subject: Re: semi OT: default route
Date: Wed, 20 Oct 2004 20:53:17 +0200	[thread overview]
Message-ID: <4176B41D.7000208@lopsch.com> (raw)
In-Reply-To: <7C9884991ADAE0479C14F10C858BCDF591E388@alderaan.smgtec.com>

Daniel Chemko schrieb:
>routed might help here. Right?
>Can anyone with 2 ISP setup please check the load balance thing?
>I vaguely remember seeing something about multiple default routes
>in early chapters of TCP/IP Illustrated Vol. 1 (I am not at all sure).

Quote from LARTC-Howto Chapter 4:

4.2.2. Load balancing

The second question is how to balance traffic going out over the two 
providers. This is actually not hard if you already have set up split 
access as above.

Instead of choosing one of the two providers as your default route, you 
now set up the default route to be a multipath route. In the default 
kernel this will balance routes over the two providers. It is done as 
follows (once more building on the example in the section on split-access):

ip route add default scope global nexthop via $P1 dev $IF1 weight 1 \
nexthop via $P2 dev $IF2 weight 1
	

This will balance the routes over both providers. The weight parameters 
can be tweaked to favor one provider over the other.

Note that balancing will not be perfect, as it is route based, and 
routes are cached. This means that routes to often-used sites will 
always be over the same provider.

Furthermore, if you really want to do this, you probably also want to 
look at Julian Anastasov's patches at http://www.ssi.bg/~ja/#routes , 
Julian's route patch page. They will make things nicer to work with.

Explaining the variables:
$Pi ist the IP of the Provider Gateway to which the interface $IFi is 
connected.

I think a combination of IPTables and IPRoute2 will get best effects 
like described before.



  reply	other threads:[~2004-10-20 18:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20 18:08 semi OT: default route Daniel Chemko
2004-10-20 18:53 ` Lopsch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-10-20 21:05 Lopsch
2004-10-20 19:56 Daniel Chemko
2004-10-20 13:25 Payal Rathod
2004-10-20 16:17 ` Jason Opperisano
2004-10-20 16:37   ` Nick Drage
2004-10-20 16:48     ` Jason Opperisano
2004-10-20 16:57       ` Payal Rathod
2004-10-20 18:24         ` Jason Opperisano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4176B41D.7000208@lopsch.com \
    --to=lopsch@lopsch.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.