Through an accidental typo I've realized that when you try to reach the ip address 127.0.01
it will successfully route to 127.0.0.1
.
Playing around with this, I've noticed that there seems to be some kind of translation happening. Some examples:
127.001
->127.0.0.1
127.002
->127.0.0.2
127.011
->127.0.0.9
127.111
->127.0.0.111
127.1111
->127.0.4.87
127.9999
->127.0.39.15
What's the logic behind these translations? I've tried and replicated this on MacOS, Linux and Windows.
From wikipedia:
You can do the calculation yourself to check.
Example:
127.9999
=01111111
.00000000 00100111 00001111
=
127
.0
.39
.15