Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Dec 2001 14:16:30 +0000
From:      Ceri <setantae@submonkey.net>
To:        Darren Pilgrim <dmp@pantherdragon.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Aliases don't get /32 netmask by default?
Message-ID:  <20011216141630.GA954@rhadamanth>
In-Reply-To: <3C1BDD76.71CC21D@pantherdragon.org>
References:  <3C1B816C.74115797@pantherdragon.org> <20011215201502.GA2292@rhadamanth> <3C1BDD76.71CC21D@pantherdragon.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011216141630.GA954>