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
[–] 10 points 1 year ago (3 children)

I'm probably going to get downvoted to hell but I have to ask: Can someone please explain? I'm perpetually trying to expand my knowledge on the technical side of Linux.

  • source
  • hideshow 3 child 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
  • [–] 2 points 1 year ago

    An IP address is a 32-bit number, usually expressed as four 8-bit numbers separated by dots. Converting 33333333 to hex we get 01FCA055; splitting that into pairs and converting back to decimal gives 1, 252, 160, 85.

  • source
  • parent