Where are addresses from the network 0.0.0.0/8 used in practice?
I read that this pool:
- Means "these hosts" in "this network"
- Is used for self-identification
- Is used for broadcast messages
My questions are:
- Where exactly these addresses can be found?
- Which protocols use them?
According to RFC 5735:
0.0.0.0/8 - Addresses in this block refer to source hosts on "this" network. Address 0.0.0.0/32 may be used as a source address for this host on this network; other addresses within 0.0.0.0/8 may be used to refer to specified hosts on this network ([RFC1122], Section 3.2.1.3).
So, looking at RFC 1122:
0.0.0.0/32:
This host on this network. MUST NOT be sent, except as a source address as part of an initialization procedure by which the host learns its own IP address.
0.0.0.0/8 (i.e. any IP from 0.0.0.0 to 0.255.255.255):
Specified host on this network. It MUST NOT be sent, except as a source address as part of an initialization procedure by which the host learns its full IP address.
So @Spiff is right, they're used exclusively in initialization procedures before obtaining the "real" IP Address.
But later on RFC 1122 states that:
There is a class of hosts (4.2BSD Unix and its derivatives, but not 4.3BSD) that use non-standard broadcast address forms, substituting 0 for 255 (as in 0.0.0.0 instead of 255.255.255.255)
so BSDs version 4.2 actually send broadcasts to 0.0.0.0
.
Update:
Found another piece of info:
0.0.0.0/32 is INADDR_ANY [snip] Another common use for 0.0.0.0/8 is to designate ifIndex numbers, as for the "Link Data" value in OSPF, and for some BSD-ish interfaces.
And here appears BSD again:
imr_interface should be set to INADDR_ANY to choose the default multicast interface, or the IP address of a particular multicast-capable interface if the host is multihomed. Since FreeBSD 4.4, if the imr_interface mem- ber is within the network range 0.0.0.0/8, it is treated as an interface index in the system interface MIB, as per the RIP Version 2 MIB Extension (RFC-1724).
The all-zeroes address is used by clients that don't know their own address yet, such as BootP/DHCP clients that have just booted or just connected to a new network and haven't been assigned an IP address from the BootP/DHCP server yet.
I look at a lot of Ethernet LAN traffic while debugging problems, and that's the only place I can think of that I've ever seen 0.0.0.0/8 in use.
Where exactly these addresses can be found?
On networked machines that are currently negotiating for actual IP addresses.
Which protocols use them?
These addresses are used temporarily during ARP probes:
An ARP probe is an ARP request constructed with an all-zero sender IP address. The term is used in the IPv4 Address Conflict Detection specification (RFC 5227). Before beginning to use an IPv4 address (whether received from manual configuration, DHCP, or some other means), a host implementing this specification must test to see if the address is already in use, by broadcasting ARP probe packets.
<guess type="wild" reliability="low">
Before CIDR, IP addresses were separated into a "network" part and "host" part, for example, 1.2.3.4
would have 1.0.0.0
as a class-A network and 0.2.3.4
as the host number. It's possible that 0/8 was intended to allow for easy reassignment of a network number while keeping the host numbers in it static.
For example, a host could use 0.2.3.4
as the "source" address for some-or-other protocol, asking "I know I am host 2.3.4 in a class-A network, but I need someone to tell me my network number". These days, this is never done, since the length of the host part can vary a lot, and it's highly unlikely that the same host number will be available for use in the new network.
</guess>