Google DNS vs OpenDNS: Google Rocks for International Users

Reader Stevan Bajić sent in an awesome bash script which gives you nicely formatted results.

#!/bin/sh
isp=$(dig +noall +stats 2>&1 | awk '$2~/^SERVER:$/{split($3,dnsip,"#");print dnsip[1]}');
m="-------------------------------------------------------------------------------";
s="                                                                               ";
h="+${m:0:25}+${m:0:12}+${m:0:12}+${m:0:12}+${m:0:12}+${m:0:12}+";
header=("Domain${s:0:23}" "Your ISP${s:0:10}" "Google${s:0:10}" "4.2.2.2${s:0:10}" "OpenDNS${s:0:10}" "DNS Adv.${s:0:10}");
echo "${h}";
echo "| ${header[0]:0:23} | ${header[1]:0:10} | ${header[2]:0:10} | ${header[3]:0:10} | ${header[4]:0:10} | ${header[5]:0:10} |";
echo "${h}";
for i in "lifehacker.com" "facebook.com" "manu-j.com"  "reddit.com" "tb4.fr" "bbc.co.uk";
do
  ii="${i}${s:23}";
  echo -ne "| ${ii:0:23} |";
  for j in "${isp}"  "8.8.8.8"  "4.2.2.2" "208.67.222.222" "156.154.70.1";
  do
    r="${s:10}$(dig +noall +stats +time=9 @${j} ${i} 2>&1 | awk '$2~/^Query$/{print $4" "$5}')";
    echo -ne " ${r:${#r}-10} |";
  done
  echo -ne "\n${h}\n";
done

The following result when testing from Jakarta, Indonesia.

+-------------------------+------------+------------+------------+------------+------------+
| Domain                  | Your ISP   | Google     | 4.2.2.2    | OpenDNS    | DNS Adv.   |
+-------------------------+------------+------------+------------+------------+------------+
| lifehacker.com          |            |   111 msec |   366 msec |   297 msec |   123 msec |
+-------------------------+------------+------------+------------+------------+------------+
| facebook.com            |            |   111 msec |   343 msec |   297 msec |   127 msec |
+-------------------------+------------+------------+------------+------------+------------+
| manu-j.com              |            |   107 msec |   342 msec |   297 msec |   121 msec |
+-------------------------+------------+------------+------------+------------+------------+
| reddit.com              |            |   108 msec |   347 msec |   298 msec |   120 msec |
+-------------------------+------------+------------+------------+------------+------------+
| tb4.fr                  |            |   106 msec |   320 msec |   242 msec |   122 msec |
+-------------------------+------------+------------+------------+------------+------------+
| bbc.co.uk               |            |   117 msec |   317 msec |   266 msec |   122 msec |
+-------------------------+------------+------------+------------+------------+------------+

So what are you waiting for, change your DNS setting to
8.8.8.8 and 8.8.8.4

Loading mentions Retweet

Comments (0)

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    twitter


 

About

My name is Hendra Saputra, I'm an avid fan of Technology. I love programming, it's what I think of day and night. I also enjoy my time by reading a lot of things, the Internet just provide me with unlimited amount of things to read.