Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From what I can tell, the use of '0' or '0.0.0.0' as a destination address is not official. It should only be used as a source address. From RFC 5735 - Special USe IPv4 Addresses:

   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.
Support for it looks to be flaky. 'ping 0' and 'ping 0.0.0.0' work for me on various Linuxes ("64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.026 ms"), but not on Windows 7 ("sendto: Cannot assign requested address") or Windows Server 2003 ("Destination specified is invalid").


IPv6 behaviour seems to be the same: "ping6 ::" pings to ::1: (localhost).

This is intriguing, really :)

EDIT: oh, you already pointed to the RFC :)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: