Inconsistent octal madness

$ ping 010
PING 010 (0.0.0.8) 56(84) bytes of data.
$ ping 010.1.1.1
PING 010.1.1.1 (8.1.1.1) 56(84) bytes of data.
$ ping 018
ping: 018: Name or service not known
$ ping 18
PING 18 (0.0.0.18) 56(84) bytes of data.
$ ping 018.1.1.1
PING 018.1.1.1 (18.1.1.1) 56(84) bytes of data.
$ ping 18.1.1.1
PING 18.1.1.1 (18.1.1.1) 56(84) bytes of data.

ok sorry, embarrassingly enough it was misdiagnosed by me. It is my silly DNS server that "helpfully" resolves these names for me!

@bagder All of those except 018.1.1.1 get resolved directly by the OS for me.

root@592cda340524:/# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@592cda340524:/# grep hosts: /etc/nsswitch.conf
hosts: files
root@592cda340524:/# getent ahosts 010
0.0.0.8 STREAM 010
0.0.0.8 DGRAM
0.0.0.8 RAW
root@592cda340524:/# getent ahosts 010.1.1.1
8.1.1.1 STREAM 010.1.1.1
8.1.1.1 DGRAM
8.1.1.1 RAW
root@592cda340524:/# getent ahosts 018
root@592cda340524:/# echo $?
2
root@592cda340524:/# getent ahosts 18
0.0.0.18 STREAM 18
0.0.0.18 DGRAM
0.0.0.18 RAW
root@592cda340524:/# getent ahosts 018.1.1.1
root@592cda340524:/# echo $?
2
root@592cda340524:/# getent ahosts 18.1.1.1
18.1.1.1 STREAM 18.1.1.1
18.1.1.1 DGRAM
18.1.1.1 RAW
root@592cda340524:/#

Debian -- The Universal Operating System

Debian is an operating system and a distribution of Free Software. It is maintained and updated through the work of many users who volunteer their time and effort.