0.0.0.0

In the Internet Protocol Version 4, the address 0.0.0.0 is a non-routable meta-address used to designate an invalid, unknown or non-applicable target. This address is assigned specific meanings in a number of contexts, such as on clients or on servers.[1]

As a host address

Uses include:[2]

  • A way to specify "any IPv4 address at all". It is used in this way when configuring servers (i.e. when binding listening sockets). This is known to TCP programmers as INADDR_ANY. (bind(2) binds to addresses, not interfaces.)
  • The address a host claims as its own when it has not yet been assigned an address. Such as when sending the initial DHCPDISCOVER packet when using DHCP.
  • The address a host assigns to itself when address request via DHCP has failed, provided the host's IP stack supports this. This usage has been replaced with the APIPA mechanism in modern operating systems.
  • A way to explicitly specify that the target is unavailable.[3]
  • A way to route request to a nonexistent target instead of the original target. Often used for adblocking purposes.

In the context of servers, 0.0.0.0 can mean "all IPv4 addresses on the local machine". If a host has two IP addresses, 192.168.1.1 and 10.1.2.1, and a server running on the host is configured to listen on 0.0.0.0, it will be reachable at both of those IP addresses.

Routing

In the context of routing tables, a network destination of 0.0.0.0 is used with a network mask of 0 to depict the default route as a destination subnet. This destination is expressed as "0.0.0.0/0" in CIDR notation. It matches all addresses in the IPv4 address space and is present on most hosts, directed towards a local router.

In routing tables, 0.0.0.0 can also appear in the gateway column. This indicates that the gateway to reach the corresponding destination subnet is unspecified. This generally means that no intermediate routing hops are necessary because the system is directly connected to the destination.[4]

In IPv6

In IPv6, the all-zeros address is typically represented by "::", which is the short notation of 0000:0000:0000:0000:0000:0000:0000:0000.[5] The IPv6 variant serves the same purpose as its IPv4 counterpart.

See also

References

  1. Bradley Mitchell (16 December 2018). "What It Means When You See the 0.0.0.0 IP Address". Lifewire. Retrieved 25 March 2019.
  2. Akemi Iwaya (16 August 2015). "What is the Difference Between 127.0.0.1 and 0.0.0.0?". How-To Geek. Retrieved 25 March 2019.
  3. "Cable Device Management Information Base for Data-Over-Cable Service Interface Specification (DOCSIS) Compliant Cable Modems and Cable Modem Termination Systems". If 0.0.0.0, either syslog transmission is inhibited, or the Syslog server address is not an IPv4 address.
  4. Sandra Henry-Stocker (3 August 2013). "Unix: Getting from here to there (routing basics)". Network World. Retrieved 25 March 2019.
  5. Das, Kaushik. "IPv6 Addressing". Retrieved 18 June 2015.
  • In RFC 1122 the notation "{0,0}" is used to designate 0.0.0.0/x (x being anything from 0 to 32). Quote: "{ 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."
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.