0.0.0.0

From Wikipedia, the free encyclopedia

The Internet Protocol Version 4 address 0.0.0.0 can have multiple uses.

Official Standard Meaning and Use[edit]

IANA, who allocate IP addresses globally, have allocated the single IP address 0.0.0.0[1] to RFC 1122 section 3.2.1.3.

It is named there as "This host on this network"

RFC 1122 refers to 0.0.0.0 using the notation {0,0}. It prohibits this as a destination address in IPv4 and only allows it as a source address under specific circumstances.

A host may use 0.0.0.0 as its own source address in IP when it has not yet been assigned an address. Such as when sending the initial DHCPDISCOVER packet when using DHCP.

Internal Operating system Specific Uses[edit]

Some operating systems have attributed special internal meaning to the address. These uses do not result in IPv4 packets containing 0.0.0.0 and so are not necessarily governed by RFC 1122.[2] These meanings may not be consistent between OS.

In both Windows and Linux, when selecting which of a host's IP address to use as a source IP, a program may specify INADDR_ANY (0.0.0.0). [3][4]

In Linux a program may specify 0.0.0.0 as the remote address to connect to the current host (AKA localhost).

Other non-standard Uses[edit]

Besides the use by operating systems internally, other uses have been attributed to the address with varying success[5][6]

  • A non-routable meta-address used to designate an invalid, unknown or non applicable target
  • 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.[7]
  • A way to route a request to a nonexistent target instead of the original target. Often used for adblocking purposes. This can conflict with OS specific behaviour. For example use in DNS can cause Linux to connect to Localhost instead of nothing at all.[8]

Routing[edit]

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

This should not be confused with the CIDR notation 0.0.0.0/0 which defines an IP block containing all possible IP addresses. It is commonly used in routing to depict the default route as a destination subnet. It matches all addresses in the IPv4 address space and is present on most hosts, directed towards a local router.

In IPv6[edit]

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

See also[edit]

References[edit]

  1. ^ "IANA IPv4 Special-Purpose Address Registry".
  2. ^ Kitt, Stephen (19 November 2022). "Connecting to IP 0.0.0.0 succeeds. How? Why?".
  3. ^ "Linux manual "ip"".
  4. ^ "MSDN Winsoc bind".
  5. ^ Postill, David (2 August 2015). "What is the Difference Between 127.0.0.1 and 0.0.0.0?". Superuser.com. Retrieved 25 March 2019.
  6. ^ Bradley Mitchell (16 December 2018). "What It Means When You See the 0.0.0.0 IP Address". Lifewire. Retrieved 25 March 2019.
  7. ^ Woundy, R.; Marez, K. (2006). "Cable Device Management Information Base for Data-Over-Cable Service Interface Specification (DOCSIS) Compliant Cable Modems and Cable Modem Termination Systems". doi:10.17487/RFC4639. If 0.0.0.0, either syslog transmission is inhibited, or the Syslog server address is not an IPv4 address. {{cite journal}}: Cite journal requires |journal= (help)
  8. ^ "Why accessing 0.0.0.0:443 gets redirected to 127.0.0.1:443 on Linux and how to disallow it?".
  9. ^ Sandra Henry-Stocker (3 August 2013). "Unix: Getting from here to there (routing basics)". Network World. Retrieved 25 March 2019.
  10. ^ Das, Kaushik. "IPv6 Addressing". Retrieved 18 June 2015.

External links[edit]