From: Vincent Jaussaud <tatooin@kelkoo.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] help with routing determined by source address
Date: Tue, 19 Nov 2002 14:17:37 +0000 [thread overview]
Message-ID: <marc-lartc-103771552220471@msgid-missing> (raw)
In-Reply-To: <marc-lartc-103770799113287@msgid-missing>
On Tue, 2002-11-19 at 14:42, Abraham van der Merwe wrote:
> >
> > #For everything else, use a multipath route;
> > ip route add table $DEFAULT_TABLE nexthop via $ISPA_GW dev $ISPA_DEV
> > nexthop via $ISPB_GW dev $ISPB_DEV
>
> Thanks, this makes sense. I just don't understand the multipath route?
I assume you want to be able to use both link simultaneously for the
linux host itself (eg, for outgoing connections).
Setting a multipath route as shown below, will instruct the kernel to
use the multipath route for all packets which don't have a saddr set.
Eg, packets for which you don't care to use either ISP1 or ISP2.
> Also,
> I take it the _TABLE variables can be arbitrary [unique] ids right?
Yes, any names you want, assuming they are present in
/etc/iproute2/rt_tables. Otherwise, you can use numbers.
> And if I
> want to have ISPB as the exception to the rule, I'll set ISPA's priority the
> highest?
>
I'm not sure to understand what you mean.
Priorities means the order your routing tables will be looked at.
eg;
ip rule add prio 100 lookup test
ip rule add prio 101 lookup test1
ip rule add prio 200 lookup test2
means that table test will be looked first, then table test1, then table
test2.
> > > for example:
> > >
> > > ISP-A ISP-B
> > > | |
> > > +---------------+
> > > | linux machine +
> > > +---------------+
> > >
> > > default gw is ISP-A interface, but if packet comes via ISP-B, the ISP-B
> > > interface should be used instead of ISP-A interface
> >
> > IPs used on the linux machines, are private or public IPs ?
>
> public ips
Sounds like you want to setup link redundency for your linux machine.
This shouldn't be a problem for outgoing connections [except for FTP
:)], but you may face some unexpected issues with incoming connections,
for which the replies may not take the proper link; especially if the
applications don't set the sraddr in the packet, in which case the
multipath route will be used, which is bad.
Tell me how it goes, I'm working on a similar setup.
Cheers,
Vincent.
--
Vincent Jaussaud <tatooin@kelkoo.com>
Kelkoo.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2002-11-19 14:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-19 12:11 [LARTC] help with routing determined by source address Abraham van der Merwe
2002-11-19 13:36 ` Vincent Jaussaud
2002-11-19 13:42 ` Abraham van der Merwe
2002-11-19 14:17 ` Vincent Jaussaud [this message]
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=marc-lartc-103771552220471@msgid-missing \
--to=tatooin@kelkoo.com \
--cc=lartc@vger.kernel.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.