From owner-freebsd-questions Sun Dec 16 6:16:43 2001 Delivered-To: freebsd-questions@freebsd.org Received: from relay3-gui.server.ntli.net (relay3-gui.server.ntli.net [194.168.4.200]) by hub.freebsd.org (Postfix) with ESMTP id 4BA6037B416 for ; Sun, 16 Dec 2001 06:16:39 -0800 (PST) Received: from pc3-card4-0-cust122.cdf.cable.ntl.com ([62.254.251.122] helo=rhadamanth.private.submonkey.net ident=exim) by relay3-gui.server.ntli.net with esmtp (Exim 3.03 #2) id 16Fc5j-0006Un-00; Sun, 16 Dec 2001 14:16:35 +0000 Received: from setantae by rhadamanth.private.submonkey.net with local (Exim 3.33 #1) id 16Fc5e-0000Hc-00; Sun, 16 Dec 2001 14:16:30 +0000 Date: Sun, 16 Dec 2001 14:16:30 +0000 From: Ceri To: Darren Pilgrim Cc: freebsd-questions@freebsd.org Subject: Re: Aliases don't get /32 netmask by default? Message-ID: <20011216141630.GA954@rhadamanth> Mail-Followup-To: Ceri , Darren Pilgrim , freebsd-questions@freebsd.org References: <3C1B816C.74115797@pantherdragon.org> <20011215201502.GA2292@rhadamanth> <3C1BDD76.71CC21D@pantherdragon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C1BDD76.71CC21D@pantherdragon.org> User-Agent: Mutt/1.3.24i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 15, 2001 at 03:32:06PM -0800, Darren Pilgrim wrote: > Ceri wrote: > > On Sat, Dec 15, 2001 at 08:59:24AM -0800, Darren Pilgrim wrote: > > > I noticed that rc.network doesn't give alias addresses 32-bit netmasks > > > by default. This puzzles me, as alias addresses don't seem to work > > > completely unless the netmask is 32 bits. Is there a reason why a > > > 32-bit netmask isn't automatically/forcibly added to an alias when > > > being added? > > > > It's only aliases on the same subnet as an address already assigned to the > > interface that need the netmask set to /32. > > That's just it, though, ifconfig doesn't assign /32 to alias IPs that > are in an existing subnet. You have to specify the /32 netmask for > same-subnet aliases. That's not the same question as ``rc.network doesn't give alias addresses 32-bit netmasks by default''. > If you do: > # ifconfig fxp0 inet 10.0.0.1 netmask 0xffffff00 > # ifconfig fxp0 alias 10.0.0.2 > > Then you'll get: > > fxp0: flags=8843 mtu 1500 > inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255 > inet 10.0.0.2 netmask 0xff000000 broadcast 10.255.255.255 That is only to be expected - such behaviour is documented in the manpage. > Which shows that ifconfig is doing classful netmasking on aliases that > don't have explicit netmasks, even when there's already sufficient > information in the existing assignment to determine the appropriate > netmask. I don't think it should either. Other opinions may differ, but that's mine. Ceri -- keep a mild groove on To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message