36

Are IP addresses with all zeroes in the first octet valid?

For example, can 0.1.2.0/24 be a valid subnet, with network address 0.1.2.0, broadcast address 0.1.2.255 and an usable address range from 0.1.2.1 to 0.1.2.254?

It looks like it should be valid, but it doesn't work, at least on Windows systems.

If it's not valid, then why?

Massimo
  • 70,200
  • 57
  • 200
  • 323

7 Answers7

36

RFC1122, Requirements for Internet Hosts -- Communication Layers, says:

     { <Network-number>, <Host-number> }

(a)  { 0, 0 }

     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.

     See also Section 3.3.6 for a non-standard use of {0,0}.

(b)  { 0, <Host-number> }

     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.
wfaulk
  • 6,878
  • 7
  • 46
  • 75
  • OK, not valid. Is any IP, other than 0.0.0.0 in DHCP, actually used? – Mark Wagner Aug 11 '11 at 22:06
  • To my knowledge, no. – wfaulk Aug 11 '11 at 22:41
  • 4
    It would appear that the intention was that a host might know its own host number, but not its network number, and use this to request that information from a DHCP-like server. That said, I'm not aware that anything like this ever existed. It also probably doesn't make a lot of sense in a post-classful world. – wfaulk Aug 12 '11 at 16:50
  • Wow, does it mean, that if I am on a local network, like on 10.5.0.0/16, then I can access the other machines with the IP 10.5.x.y on the same network on the IP 0.0.x.y ? – peterh Nov 15 '20 at 13:54
19

Looks like 0.0.0.0/8 is in the list of IANA Reserved subnets.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
13

Per RFC 5735, 0.0.0.0/8 is a reserved IP address range, as follows:

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 [RFC1700, page 4].

Skyhawk
  • 14,200
  • 4
  • 53
  • 95
11

According to RFC 1700 - "Assigned Numbers", "Special Addresses" section, a network number of 0 can only be used as a source address, and represents a host on the same network. Therefore it is invalid to assign an address of this type to an interface.

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
0

"0." networks are used for SNM ( SYSTEM NETWORK MANAGEMENT) and can't be used for something else

  • Do you have any citations to back this up? The other answers here includes quotes and links to authorities. – chicks Sep 12 '17 at 15:57
-1

For anyone wondering why the Network-number is 0 in this case, 0.1.2.0/24 breaks down as follows:

Network = (8 bits) 0
Subnetwork (16 bits) = 1.2
Host part = remaining 8 bits

Given that the MSB of the first octet is 0, it must be class A, with an implied network portion of 8 bits. It is subnetted a further 16 bits (the next two octets).

Given things like CIDR and the death of classful addressing, 0.1.2.0/24 should be a valid subnet (there are bits set in the network portion if you consider the first 24 bits).

HBruijn
  • 77,029
  • 24
  • 135
  • 201
Scotia
  • 1
-1

The IP 0.0.0.0 is used just for request a valid IP Address from DHCP Server, and DHCP server is replying a dynamic valid IP for request computer.