Is 0.1.2.3 a valid IP address?

Solution 1:

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.

Solution 2:

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

  • http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xml, the list of IANA reserved addresses, since this one dates far enough back (1981!) to have been an IANA reserved address range.
  • http://tools.ietf.org/html/rfc5735, describing special uses of IPv4, of which this subnet is a member. The most-current list of special subnets, including the subnets reserved for documentation purposes.
  • http://tools.ietf.org/html/rfc1122#section-3.2.1.3, which describes the specific usage of the 0/8 network.

Solution 3:

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].


Solution 4:

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.

Tags:

Ip

Ip Address