Re: linux routing to multiple providers

From: Rob Hill (rhill@thisbox.com)
Date: Wed May 31 2000 - 10:00:02 EST


Guss,

Thanks for your help. I do not know how masq'ing will keep this from
working. When I enter my masq'ing rules, I do it per interface. If eth0 is
my ISP1 and eth1 is my ISP2, can I do

ipchains -A forward -i eth0 -s 192.168.1.0/25 -d 0/0 -j MASQ
ipchains -A forward -i eth1 -s 192.168.1.128/25 -d 0/0 -j MASQ

and have the lower half use ISP1 and the upper half use ISP2.

Do the masq'ing rules interfere with the iproute package?

Thanks,

Rob Hill
rhill@thisbox.com

----- Original Message -----
From: "Guus Sliepen" <guus@warande3094.warande.uu.nl>
To: "Rusty Russell" <rusty@linuxcare.com.au>
Cc: <david+validemail@kalifornia.com>; "Rob Hill" <rhill@thisbox.com>
Sent: Tuesday, May 30, 2000 4:05 AM
Subject: Re: linux routing to multiple providers

> On Fri, 26 May 2000, Rusty Russell wrote:
>
> > In message <Pine.LNX.4.21.0005242034450.611-100000@haplo.sliepen.oi> you
write:
> > > ip route add default gw nexthop dev eth0 via <ISP1 gateway> nexthop
dev
> > > eth1 via <ISP2 gateway>
>
> > Just a quick note: this won't work in his case, since masquerading
> > uses the route to figure what address to map the packets onto: hence
> > you need all packets in a given connection to go out the same
> > interface. At best, it will sometimes send out packets with eth0's
> > source address out eth1. At worst, it will screw things up
> > completely.
>
> Ah, true. I completely forgot about masquerading. But when exactly are the
> NAT rules applied wrt. the routing rules?
>
> > Just make sure the same source IPs get routed the same way, always!
>
> For real load balancing (of even a single TCP stream), I made a patch
> which clearly does exactly the opposite :) But in most situations I'd
> agree with you.
>
> Met vriendelijke groet,
> Guus Sliepen.
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:27 EST