From owner-freebsd-stable@FreeBSD.ORG Wed Mar 5 05:53:11 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F825106566C for ; Wed, 5 Mar 2008 05:53:11 +0000 (UTC) (envelope-from andy@xecu.net) Received: from mg5.xecu.net (mg5.xecu.net [216.127.136.199]) by mx1.freebsd.org (Postfix) with ESMTP id 00D4E8FC20 for ; Wed, 5 Mar 2008 05:53:10 +0000 (UTC) (envelope-from andy@xecu.net) Received: from localhost (unknown [127.0.0.1]) by mg5.xecu.net (Postfix) with ESMTP id A7DBF2E0069; Wed, 5 Mar 2008 00:53:09 -0500 (EST) X-Virus-Scanned: amavisd-new at xecu.net Received: from mg5.xecu.net ([127.0.0.1]) by localhost (mg5.xecu.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U72e7bZQ5Q0G; Wed, 5 Mar 2008 00:53:06 -0500 (EST) Received: from shell.xecu.net (shell.xecu.net [216.127.136.216]) by mg5.xecu.net (Postfix) with ESMTP id D85992E00CC; Wed, 5 Mar 2008 00:53:06 -0500 (EST) Date: Wed, 5 Mar 2008 00:53:07 -0500 (EST) From: Andy Dills To: "Chris H." In-Reply-To: <20080304173032.2n9lrst6ewww4kos@webmail.1command.com> Message-ID: <20080305002142.T37745@shell.xecu.net> References: <200803040619.m246Jbja018523@drugs.dv.isc.org> <20080304000320.msp5bfrytc0wsowg@webmail.1command.com> <1204625690.2126.181.camel@localhost> <20080304024831.fh4h1s3hggg444c0@webmail.1command.com> <20080304110042.GB84355@eos.sc1.parodius.com> <20080304033914.hbevsjq9gkc0o4os@webmail.1command.com> <20080304173032.2n9lrst6ewww4kos@webmail.1command.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Greg Black , freebsd-stable@freebsd.org Subject: Re: What's new on the 127.0.0/24 block in 7? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 05:53:11 -0000 Just to provide a little information in case there is still confusion... On Tue, 4 Mar 2008, Chris H. wrote: > Quoting Greg Black : > > > On 2008-03-04, Chris H. wrote: > > > > > Yes, adding an entry in /etc/rc.conf that provides 254 IP's now > > > reveals: > > > lo0: flags=8049 metric 0 mtu 16384 > > > inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 > > > scopeid 0x3 inet 127.0.0.1 netmask 0xffffff00 > > > > > > as opposed to: 0xffffffff. > > > > If you think the above shows evidence of providing 254 IP addresses, > > it's really time either to catch up on some sleep or learn how these > > things work. > > Quite so. That was my point; adding netmask 255.255.255.0 > (0xffffff00) gave me 254 addresses. While the netmask > 0xffffffff provides 1. At the risk of being pedantic, I'm afraid that isn't true. If adding netmask 255.255.255.0 provided 255 addresses, adding the (default in every version of FreeBSD I'm aware of) netmask of 255.0.0.0 would provide 255x255x255 addresses. That said, there is no way to ifconfig multiple addresses with a single address entry. The netmask of an IP bound to an interface determines the scope of the logical network that can be reached through the given interface, not a range of addresses bound to the interface. So, 127.0.0.1 with a mask of 255.255.255.0 means 127.0.0.0-255 would be reachable via lo0, whereas 127.0.0.1 with a mask of 255.0.0.0 means 127.0-255.0-255.0-255 would be reachable via lo0. In neither case would 127.0.0.2 be bound to lo0 implicitly, you would need to explicitly ifconfig them as aliases for them to be bound to lo0. No worries regardless, netmasks are a common source of misunderstanding and confusion. In a routing context, the subnet mask does indeed affect every address within the subnet, however when binding addresses to an interface, the subnet mask merely controls which addresses are reachable locally on layer 2. Andy --- Andy Dills Xecunet, Inc. www.xecu.net 301-682-9972 ---