The IPv4 address has multiple uses.

Uses

As an outgoing packet The IP address is used as a source address when the host is still in the process of obtaining its own address, and is not permitted for use as a destination address. For outgoing packets, as the source IP means "this host on this network". This behavior is described in section 3.2.1.3 of "Address block 0.0.0.0/32: This host on this network; [RFC1122], Section 3.2.1.3", and protocols that use in this way include BOOTP and DHCP.

In a BOOTP bootrequest, the client fills in its own known IP address as the source, or if the address is unknown. "3. Packet Format: In the IP header of a bootrequest, the client fills in its own IP source address if known, otherwise zero."

In DHCP, a host may use as its own source address when it has not yet been assigned an address, such as when sending the initial DHCPDISCOVER packet when using DHCP. This usage has been replaced with the APIPA mechanism in modern operating systems.

As 0.0.0.0 is of limited use as a source address and prohibited as a destination address, it can be used as a means to prohibit communication with undesirable hosts. For example, a line may be added to an operating systems' hosts file such as 0.0.0.0 example.com, which would route example.com to , ensuring all attempts to connect to example.com will fail. In Syslog, is similarly used to prevent communication with the server. This usage can be problematic, as is only an invalid destination in the context of a network: while operating systems are obliged to prevent usage of over the wire, they are still permitted to use it internally. This usage therefore invokes undefined behavior which may differ between systems: for example, Linux routes packets destined for back to the local host.

In Linux, a program that specifies as the destination address will actually connect to localhost. When the Linux kernel encounters a packet with a destination address of , which, according to RFC 1122, is treated as having no destination address, the kernel sets the destination address to the source address, effectively routing all packets back to the local host. This process follows guidance on multihoming specified in section 4.2.4.4 of RFC 1122. As this behavior sends packets with destination addresses of over the loopback interface, and never sends them over the wire, the Linux kernel remains in compliance with RFC 1122, which focuses only on interoperability and network behavior rather than how an operating system must handle such addresses internally within the host itself.

Binding On both Windows and Unix, when selecting which of a host's IP address to use as a source IP, a program may specify INADDR_ANY (). When a program binds to , it accepts connections from any network interface, such as connections from localhost (), the local area network (such as ), and public IP addresses. "Special and reserved addresses: INADDR_ANY (0.0.0.0)"

Routing In routing tables, can also appear in the gateway column. This indicates that the destination is directly reachable on a local interface and no next-hop router (gateway) is needed.

The CIDR notation 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 In IPv6, the all-zeros address is typically represented by (two colons), which is the short notation of . The IPv6 variant serves the same purpose as its IPv4 counterpart.

0.0.0.0 day exploit In August 2024, researchers from Israeli cybersecurity firm Oligo announced that they had discovered a security flaw in which malicious requests from a target's web browser were allowed to reach any port of the address of their target, potentially allowing the browser (and therefore the remote attacker) to access private resources. Depending on which software is configured to be listening on the target's machine, the attackers could exfiltrate internal company information or developer code, or issue requests to the APIs of various software.

See also Reserved IP addresses localhost

Notes

References

Works cited

External links