Today seems like a good day to announce something, start something, or just do anything a bit more “unusual”. So I decided to start writing for this forgotten blog. Also, some company also launching something with a lot of 1 too. And while reading news around it, a little command surprised me:
$ ping 1.1 PING 1.1 (188.8.131.52): 56 data bytes 64 bytes from 184.108.40.206: icmp_seq=0 ttl=55 time=5.586 ms 64 bytes from 220.127.116.11: icmp_seq=1 ttl=55 time=5.877 ms
I know an IP address can either be specified in a dotted format (
or as a 32 bits integer (like
16777217). But this is the first time I ever seen
one in this form, with just one
dot. And being just
1.1, this must be
the shorted looking IP address out there. Is it a
ping only thing? Nope.
$ python >>> import socket >>> socket.gethostbyname('1.1') '18.104.22.168' $ dig @1.1 thisisbinh.me +short 22.214.171.124 126.96.36.199
Turn out, at least on Linux, an IPv4 address can be specified in 4 ways:
- The "normal", most common one, each byte is specified by each of the four numbers.
a.bpart specify the first 2 bytes as normal but
cis interpreted as a 16 bits value for the last 2 bytes.
aspecify the first byte and
bis interpreted as a 24 bits value for the last 3 bytes.
- The value is interpreted as a 32 bits value.
So that how
1.1 is interpreted as the same as
ping as well as other utilities. Also, try
But that doesn’t mean it can be used for the address everywhere you can type an IP address though. For example:
$ dig -x 188.8.131.52 +short 1dot1dot1dot1.cloudflare-dns.com. $ dig -x 1.1 +short # nothing
The subtle difference here is
1.1 is not being used, hence interpreted, as an IP address.
It is just a value used directly in a DNS query for the
PTR record of
And a value in a DNS query is not being interpreted the same as an IP address.
$ dig -x 1.1 | grep -iA1 question ;; QUESTION SECTION: ;1.1.in-addr.arpa. IN PTR
Anyway, from now
ping 1.1 is my fastest (to type) command to test for Internet connectivity.