From owner-freebsd-hackers Fri Dec 7 12:38:12 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cody.jharris.com (cody.jharris.com [205.238.128.83]) by hub.freebsd.org (Postfix) with ESMTP id A2FBE37B405 for ; Fri, 7 Dec 2001 12:38:08 -0800 (PST) Received: from localhost (nick@localhost) by cody.jharris.com (8.11.1/8.9.3) with ESMTP id fB7Kc4h06390; Fri, 7 Dec 2001 14:38:04 -0600 (CST) (envelope-from nick@rogness.net) Date: Fri, 7 Dec 2001 14:38:04 -0600 (CST) From: Nick Rogness X-Sender: nick@cody.jharris.com To: Lars Eggert Cc: rick norman , freebsd-hackers@FreeBSD.ORG Subject: Re: Nat through two DSL In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 7 Dec 2001, Nick Rogness wrote: > On Fri, 7 Dec 2001, Lars Eggert wrote: > > > rick norman wrote: > > > > > What would be nice would be to load balance on a per connection > > > basis, not a per packet basis, between the two modems. > > > Any ideas how to do this ? > > > > > > Not with the current mechanisms in FreeBSD. You'd need a simple policy > > routing engine (actually, policy forwarding). A prototype based on tun > > devices shouldn't be too hard to put together. Basically, you'd want > > to pick one of your links based on destination address and optionally > > the port pair. > > > An idea on how you would do pseudo load-balancing, would be: > Damn it, fat fingered it...corrections to firewall: ipfw add 500 divert natd1 ip from $NET to 0.0.0.0/1 out via $DSL_INT#1 ipfw add 550 divert natd1 ip from 0.0.0.0/1 to any in via $DSL_INT#1 ipfw add 560 fwd $DSL-2 ip from $NET to 128.0.0.0/1 out via $DSL_INT#1 ipfw add 570 divert natd2 ip from any to any via $DSL_INT#2 > > Where: > - $DSL_INT#1 is the default gateway interface. > - $DSL_INT#2 is the interface of the second dsl Service > - $DSL-2 is the IP of the gateway to the second dsl Service > - $NET is your local network IP subnet. > > What the above is doing is sending anything TO 1-127.X.X.X out dsl service 1 and sending 128-256.X.X.X out dsl service 2. Nick Rogness - Keep on Routing in a Free World... "FreeBSD: The Power to Serve!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message