Subject: Re: mutating IPv4 aliases on NetBSD 2 systems
To: None <tech-net@netbsd.org>
From: None <joerg@britannica.bec.de>
List: tech-net
Date: 02/25/2006 15:40:33
On Fri, Feb 24, 2006 at 05:42:15PM -0500, Thor Lancelot Simon wrote:
> On Fri, Feb 24, 2006 at 09:59:23PM +0100, joerg@britannica.bec.de wrote:
> > On Fri, Feb 24, 2006 at 03:54:40PM -0500, Thor Lancelot Simon wrote:
> > > You can configure additional host addresses on lo0 with a /32 netmask
> > > if you wish.
> > 
> > Please be careful when speaking about other systems. Configuring the
> > aliases with /32 on the target interface is the correct way for FreeBSD.
> > Configuring them on lo0 does *not* work on FreeBSD.
> 
> If it doesn't work, with the appropriate route, I think I would require
> quite some persuading to see why that's not a bug.  Similarly, I am

Because other hosts in the same network are not able to access the host.
ARP request are not answered after all. Having to add routes on the
other hosts would certainly qualify as bug.

> very skeptical that configuring them with an overlapping netmask on
> the same interface, if it does not, for example, cause broadcasts to
> go to the host address in some cases, is not a bug.

I don't think I fully understand that sentence's grammar. The NetBSD
solution has problems too (allowing multiple routes to the same
destination), since e.g. UDP traffic can end up with the wrong source
address. Whether or not a /32 address should be picked up for broadcast
traffic by default is an entirely different question. It makes sense in
some constellations and doesn't make sense in others.

>  Finally, I can
> only register my amazement at the implication that someone broke
> FreeBSD's routing or input code such that configuring them on the same
> interface with the _same_ netmask no longer works.  Are all these things
> true?

The routing code rejects *any* identical entries. No two default routes,
no two interfaces in the same network etc. This does prevent some of the
wonderful issues in NetBSD (when bridging is not active).

Both behaviours have advantages and disadvantages, but saying one of
them is wrong without actually knowing the other approach is bad.

Joerg