Friday, 8 September 2017

ubuntu - Why pinging "drive" gets replies from 127.0.53.53?


I'm using Firefox 31 on Ubuntu 14.04.1


I tried to open Google Drive on Firefox by typing "drive" on the address bar and then clicking on the first Google result (lazy and convoluted, I know).


It shows me a connection error:


enter image description here


Suspecting a router issue, or maybe a DNS issue caused by my ISP, I tried pinging the inexistent address, only to get a reply coming from 127.0.53.53. Huh?


ubuntu@ubuntu:~$ ping foobar
ping: unknown host foobar
ubuntu@ubuntu:~$ ping thisisnotavaliddomain
ping: unknown host thisisnotavaliddomain
ubuntu@ubuntu:~$ ping drive
PING drive (127.0.53.53) 56(84) bytes of data.
64 bytes from 127.0.53.53: icmp_seq=1 ttl=64 time=0.011 ms
64 bytes from 127.0.53.53: icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from 127.0.53.53: icmp_seq=3 ttl=64 time=0.049 ms
^C
--- drive ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.011/0.027/0.049/0.016 ms

Trying to ping other invalid domains gets me the expected result (that is, none at all). Only with "drive" it seems to happen.


What's going on here?



Answer



What's happening is a name collision.



127.0.53.53 is a special IPv4 address that will appear in system logs alerting system administrators that there is potential name collision issue, enabling a quick diagnosis and remediation. The "53" is used as a mnemonic to indicate a DNS-related problem owing to the use of network port 53 for the DNS service.



(source: ICANN)


But what does it mean? Well, turns out over the last years the number of TLDs (top-level domains) has been expanding. Apart from the original .com, .org, .net, .gov and the like, there's an ever-growing list of generic TLDs. As of the writing of this, there's currently more than a thousand gTLDs.


Guess what are some examples of gTLDs? Words such as "drive", "google", "microsoft", "hotmail", "youtube" and "android". So, when you enter those words on the address bar on Firefox, instead of using it to perform a search on the default search engine, it will first check if it resolves as a domain name.


Thanks to our friends at ICANN, it does resolve to 127.0.53.53. Which means localhost. Your browser is trying to connect to the port 80 of your own computer and, unless you have a web server running, you will see a connection error message.


(obs: this doesn't seem to affect all browsers -- at least, I was able to test the latest version of Chrome for Android and it isn't affected by this issue)


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...