From owner-freebsd-net@FreeBSD.ORG Tue Jul 25 12:40:30 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 292D716A4E1 for ; Tue, 25 Jul 2006 12:40:30 +0000 (UTC) (envelope-from b.candler@pobox.com) Received: from proof.pobox.com (proof.pobox.com [207.106.133.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DD5A43D5C for ; Tue, 25 Jul 2006 12:40:29 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from proof (localhost [127.0.0.1]) by proof.pobox.com (Postfix) with ESMTP id 8CDC724C2F; Tue, 25 Jul 2006 08:40:28 -0400 (EDT) Received: from mappit.local.linnet.org (212-74-113-67.static.dsl.as9105.com [212.74.113.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by proof.sasl.smtp.pobox.com (Postfix) with ESMTP id 3D8B55B02B; Tue, 25 Jul 2006 08:40:26 -0400 (EDT) Received: from brian by mappit.local.linnet.org with local (Exim 4.61 (FreeBSD)) (envelope-from ) id 1G5MD2-0002GZ-Iz; Tue, 25 Jul 2006 13:40:24 +0100 Date: Tue, 25 Jul 2006 13:40:24 +0100 From: Brian Candler To: Brett Glass Message-ID: <20060725124024.GA8695@uk.tiscali.com> References: <7.0.1.0.2.20060721105813.0971ae90@lariat.net> <20060724090909.GB3412@uk.tiscali.com> <200607241609.30783.zec@icir.org> <7.0.1.0.2.20060724204450.09bcbe80@lariat.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7.0.1.0.2.20060724204450.09bcbe80@lariat.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org, Marko Zec Subject: Re: Multiple NAT router X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2006 12:40:30 -0000 On Mon, Jul 24, 2006 at 09:17:37PM -0600, Brett Glass wrote: > I've been noodling over this for two weeks now, and am thinking > that the easiest thing to do might be is map every address in each > "virtual" router to a unique address from FreeBSD's point of view > (i.e. 192.168.0.2 on LAN 1 becomes 10.0.0.2, while 192.168.0.2 on > LAN 1 becomes 10.0.1.2, etc.). The translation would be done by > "hooks" as close as possible to the interfaces, so FreeBSD's stack > wouldn't know it was being done. > > All that would be needed in that case would be to do "dumb" address > translation at the interfaces -- transparently to FreeBSD -- just > before the packets entered and left. One problem is managing the allocation of the translated addresses. But why not do dumb mapping of IPv4 addresses to IPv6 ? That would let you have up to 2^96 "virtual routers", and finally provide a reason for the IPv6 code to exist :-)