0.0.0.0
The
Uses
Official meaning and use
RFC 1122 refers to 0.0.0.0 using the notation {0,0}. It prohibits this as a destination address in
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
Operating system specific uses
Some
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).[2]
Other non-standard uses
Besides the use by operating systems internally, other uses have been attributed to the address.[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 APIPAmechanism 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.[8]
Routing
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]
The
In IPv6
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
References
- ^ "IANA IPv4 Special-Purpose Address Registry". Internet Assigned Numbers Authority. 19 August 2009. Retrieved 7 June 2023.
- ^ a b Kitt, Stephen (26 January 2018). "Connecting to IP 0.0.0.0 succeeds. How? Why?". Stack Exchange. Retrieved 7 June 2023.
- ^ Kerrisk, Michael (22 March 2021). "ip(7) — Linux manual page". man7.org. Retrieved 7 June 2023.
- ^ "bind function (winsock.h) - Win32 apps". Microsoft Learn. 19 August 2022. Retrieved 7 June 2023.
- ^ Postill, David (2 August 2015). "What's the difference between 127.0.0.1 and 0.0.0.0?". Stack Exchange. Retrieved 7 June 2023.
- ^ Mitchell, Bradley (16 December 2018). "What It Means When You See the 0.0.0.0 IP Address". Lifewire. Retrieved 7 June 2023.
- .
If 0.0.0.0, either syslog transmission is inhibited, or the Syslog server address is not an IPv4 address.
- ^ Kitt, Stephen (19 November 2022). "Why accessing 0.0.0.0:443 gets redirected to 127.0.0.1:443 on Linux and how to disallow it?". Stack Exchange. Retrieved 7 June 2023.
- Network World. Retrieved 7 June 2023.
- ^ Das, Kaushik (2008). "IPv6 Addressing". ipv6.com. Archived from the original on 11 April 2015. Retrieved 7 June 2023.
External links
- M. Cotton; L. Vegoda; B. Haberman (April 2013). R. Bonica (ed.). Special-Purpose IP Address Registries. .