For those who want to try it at home:

ping 33333333
ping 55555555

I am sorry, two random Internet users in Korea and Germany, your IP addresses are simply special.

you are viewing a single comment's thread
view the rest of the comments
[–] 18 points 1 year ago*

This is the behaviour of inet_aton, which ping uses to translate ASCII representations of IPv4 addresses to a 32 bit number. Its manpage: https://man7.org/linux/man-pages/man3/inet_aton.3.html

It recognizes the usual quad decimal notation of course, but also addresses of the form a.b.c or a.b, or in this instance, a, with is taken to be a 32bit number.

Each part can also be written in hex or octal, with the right prefix, such that 10.012.0x800a is as valid form for 10.10.128.10.

Not all software use inet _aton to translate ASCII addresses. inet_pton for instance (which understands both v4 and v6) doesn't

  • source
  • parent