Subject: Re: mutating IPv4 aliases on NetBSD 2 systems
To: None <tech-net@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 02/24/2006 16:25:15
> It is hard to imagine what sane meaning it could possibly have to
> have two host addresses on the same physical segment with different
> -- but overlapping -- netmasks.
Your imagination is...peculiarly deficient, I would say. It seems
fairly straightforward to me.
On output: If address A has netmask Am (and broadcast address Ab), then
a socket bound to address A sending to anything in A/Am will ARP (or
local analog if not over Ethernet) and will broadcast if sending to Ab;
if sending to an address not in A/Am, will route according to the
routing table - and this is independent of any other
address/mask/broadcast combination on that interface. (If no sending
address has been specified and the target route points out that
interface, then the order of configuration matters, because it
generally uses the first - "primary" - address.)
On input: The system will answer ARPs (or equivalent) on that interface
for any of its addresses there, and will accept broadcast packets
addressed to any of its broadcast addresses there - again, independent
of what other addresses might exist on that interface. (One could
argue that for v4 /32s, the broadcast address should be ignored, but I
think that's independent of whether there are other addresses on the
interface - though an interface with nothing but /32s on it would be
useful only in rather peculiar circumstances, since sending would be
Of course, on output, the "route according to the routing table" may
end up sending out that same interface, possibly just ARPing for the
target, if it's on-net for some other address on that interface, but
that's just a consequence of the routing table.
The upshot of this is that a system with a /28 on an interface and some
other /32s within that /28 as aliases is a reasonably sensibly-behaved
system: it has three addresses on a /28, and that's it.
> You can configure additional host addresses on lo0 with a /32 netmask
> if you wish.
And why not on any other interface? What's magic about lo0 that /32
aliases are acceptable on *it*, but not elsewhere?
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML firstname.lastname@example.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B