From owner-freebsd-net@FreeBSD.ORG Wed Apr 7 03:11:31 2004 Return-Path: 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 CDAF116A4CE for ; Wed, 7 Apr 2004 03:11:31 -0700 (PDT) Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [193.201.200.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90A4B43D31 for ; Wed, 7 Apr 2004 03:11:31 -0700 (PDT) (envelope-from fanf@chiark.greenend.org.uk) Received: by chiark.greenend.org.uk (Debian Exim 3.35 #1) with local id 1BBA1K-0003TK-00; Wed, 07 Apr 2004 11:10:58 +0100 To: anders.lowinger@packetfront.com From: Tony Finch In-Reply-To: <40712A8F.9000704@packetfront.com> References: <20040331005914.A6934@xorpc.icir.org> <20040331005914.A6934@xorpc.icir.org> Message-Id: Sender: Tony Finch Date: Wed, 07 Apr 2004 11:10:58 +0100 cc: freebsd-net@freebsd.org Subject: Re: do we support non contiguous netmasks ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 10:11:31 -0000 Anders Lowinger wrote: >Luigi Rizzo wrote: >> >> i was wondering if anyone knows what kind of support we have >> in FreeBSD networking code, for non contiguous netmasks. >> While it is trivial to support them for interface addresses, >> managing them in the routing table is probably far from trivial >> and I believe also mostly useless... and anyways, i have no >> idea how our kernel code deals with them > >Not sure why you wonder? Do you need it? I played around with non-contiguous netmasks when working on Demon's NETALIAS patch (see http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/12071). I didn't actually put it into production that way, though -- I stuck with standard netmasks to reduce confusion. At that time we had IIRC two /18s and a /16 assigned to a web vhosting service (because it dated from before widespread support for HTTP Host: headers). These addresses were allocated sequentially, so the simple approach of splitting the /16s into /18s and routing them to the various servers gave an uneven distribution of load. Splitting the /16s by the mask 0xFFFF0003 did a better job. (Each server could serve any site, but was more efficient if it served a subset of the sites, and it was easiest to configure this distribution on the (NetBSD) last hop router.) Tony. -- f.a.n.finch http://dotat.at/ LYME REGIS TO LANDS END INCLUDING THE ISLES OF SCILLY: NORTHWEST 4 OR 5 GRADUALLY VEERING NORTH 4 OR 5. SOME SHOWERS. MAINLY GOOD. SLIGHT IN EAST, MODERATE IN WEST.