If the host part of a IPv4 address is all zero (e.g. in a network with mask, does the address represent the network, or a network interface in the network?



For IPv4, that is the network address, and it cannot be assigned to an interface*. The network, itself, does not have an interface; it is the collection of interfaces with addressing that masks to the same network address.

That is explained in this two-part answer to which I have previously referred you.

Unlike IPv4, IPv6 actually allows the use of the network address for a host interface, and it has no broadcast, so all network addresses can be used for host addressing.

*There are two exceptions to being unable to use the network address for an interface, and those are /31 and /32 networks.


The host part all zero is used as the network address or prefix, e.g. Interfaces within the network usually cannot have all zeros in the host part and all ones is reserved for the directed broadcast address.

(There's no strict technical reason why the all-zero address cannot be used but only very few systems support it.)

  • Do you mean that an IP address with host part all zero always refers to a network? If yes, is it necessary to indicate the prefix length for the network mask (e.g., or there is no need to (e.g. because all the trailing zero already indicate the network mask? e.g. or – Tim Mar 25 at 22:44
  • @Tim Pretty much always, yes. For the network address, you always need to indicate the prefix length, there is no automatism (since 1993 when classful networking was obsoleted) - can be /8, /24, or even /31 (or anything in between). – Zac67 Mar 25 at 23:07
  • At least on Linux you can't use the all zeros and all ones addresses for hosts if you set up the network normally, but you can use them if you add the addresses with a /32 netmask and then explicitly add a route for on-link systems. – Peter Green Mar 25 at 23:46
  • 1
    We've been over this several times... all-zero and all-one addresses are called out in early RFCs. They are effectively both broadcast addresses, but all-zero is a very old practice. – Ricky Beam Mar 26 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.