Subject: Re: host address zero - useable?
To: None <tech-net@netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: tech-net
Date: 03/01/1999 12:41:09
fair@clock.org (Erik E. Fair) writes:
> As an extreme example, can three hosts live on network with a two-bit host
> mask (e.g. 255.255.255.252)?

With a bit of care, you can get 4 hosts to live on a 2-bit network.

There is really no reason why the top address of the CIDR block really
needs to be taken up by a broadcast address (other than blind
conformance to the RFC that is).  One can live quite well without a IP
broadcast address.  That also nicely solves another problem of old
crusty protocols bothering every host on the network with an IP
broadcast when they should really be multicasting to only those hosts
interested in their jabberings.

If one moves the broadcast address that one uses to 255.255.255.255,
one can even allow local broadcasts.

I dont' know if NetBSD does the right thing.  I spent a few hours at
one point when I was bored hacking a major router/terminal server's
home grown OS to do the right thing for both the 0 and 1's case.  I'm
fairly sure I got it all to work by using 255.255.255.255 as the
broadcast on each interface and freeing up all the addresses for host
use.  As I recall there were a few routines that incorrectly tried to
create the broadcast address from the network mask and base address.
I'd expect a few of these to come out of the woodwork in NetBSD too.

As I recall there were also a few broken routing protocols like RIP-v1
and OSPF that didn't like host-0's.  RIP-v1 is just broken.  OSPF at
the transport and storage layers doesn't/didn't really understand
CIDR.  It tags each data item with the address, and used that as the
unique identifier.  Naturely network addresses and host addresses of
the same IP address clash and one of the data items gets mashed.
There is a hack to "fix this" but that hack uses the all ones host
address on the network as the alternate address if a clashing data
item exists for the 0's address.  OSPF doesn't really need to talk
about host addresses and if one avoids this situation, one can free up
both the all 0's and 1's address on that network and still run OSPF.
RIP-v2 has no problems if one runs it in multicast mode.

-wolfgang
-- 
       Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
		    http://www.wsrcc.com/wolfgang/
DGPS signals via the Internet  http://www.wsrcc.com/wolfgang/gps/dgps-ip.html