From: Jason Opperisano <opie@817west.com>
To: Netfilter ML <netfilter@lists.netfilter.org>
Subject: Re: semi OT: default route
Date: Wed, 20 Oct 2004 12:17:25 -0400 [thread overview]
Message-ID: <20041020161725.GA7221@bender.817west.com> (raw)
In-Reply-To: <20041020132551.GA1720@tranquility.scriptkitchen.com>
On Wed, Oct 20, 2004 at 09:25:51AM -0400, Payal Rathod wrote:
> Hi,
> I have a question which has haunted me for many months. If I have 2 ISP
> connections with me, with default gw 1.2.3.4 and 4.5.6.7 and if I add
> both as default routes on my Linux gateway as,
> route add -net default gw 1.2.3.4
> route add -net default gw 4.5.6.7
> and if I send a packet from a windows client to internet, which ISP will it
> go through?
this will sound like a stupid answer, but it will probably always use
the route that you added first. the 'route' command will allow you to
added multiple default routes, but the ones you add after the first one
end up getting ignored. the 'ip' command won't let you add a default
route once you have one (it uses teq and multipath for this):
$ ip route list | grep default
default via 10.2.1.1 dev eth0
$ sudo ip route add default via 10.2.1.2
RTNETLINK answers: File exists
if you want to load-balance outbound traffic over multiple ISP links,
you'll want to use something along the lines of the 'nth' patch from POM:
http://netfilter.org/documentation/HOWTO/netfilter-extensions-HOWTO-3.html#ss3.9
if you want to split outbound traffic over multiple links by source IP
or protocol, etc--you can use the concepts from:
http://lartc.org/howto/lartc.netfilter.html
-j
--
Jason Opperisano <opie@817west.com>
next prev parent reply other threads:[~2004-10-20 16:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-20 13:25 semi OT: default route Payal Rathod
2004-10-20 16:17 ` Jason Opperisano [this message]
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
2004-10-22 16:40 ` multiple external interface ? Faisal
-- strict thread matches above, loose matches on Subject: below --
2004-10-20 18:08 semi OT: default route Daniel Chemko
2004-10-20 18:53 ` Lopsch
2004-10-20 19:56 Daniel Chemko
2004-10-20 21:05 Lopsch
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=20041020161725.GA7221@bender.817west.com \
--to=opie@817west.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.