Thursday, February 21, 2013

How to Test the reliability and Speed of your DNS in Ubuntu / Debian Linux


This post will help you to find the reliability and speed of DNS servers .
You need a simple utility traceroute.

how to install traceroute

$ sudo apt-get install traceroute

Now Run the following Command for testing google dns 8.8.8.8

$  sudo traceroute -n -w 2 -q 2 -m 30 8.8.8.8

output

shibu@keralalinux:~$ sudo traceroute -n -w 2 -q 2 -m 30 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
 1  192.168.1.1  1.656 ms  2.233 ms
 2  137.199.0.1  25.909 ms  28.264 ms
 3  228.248.170.102  30.771 ms  33.141 ms
 4  115.114.130.85  79.373 ms  81.546 ms
 5  121.240.1.46  78.806 ms  81.854 ms
 6  209.85.241.21  89.617 ms  92.429 ms
 7  8.8.8.8  88.498 ms  91.208 ms 



If the last line of the output does not list 8.8.8.8 as the final hop, or if there are significant timeouts, there may be a network problem preventing you from contacting DNS servers.

The following command can also use for testing the DNS

$ dig @8.8.8.8 www.google.com.

output

shibu@keralalinux:~$ dig @8.8.8.8 www.depika.com

; <<>> DiG 9.8.1-P1 <<>> @8.8.8.8 www.depika.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- 31859="" br="" id:="" noerror="" opcode:="" query="" status:="">;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.depika.com.        IN    A

;; ANSWER SECTION:
www.deepika.com.    812    IN    CNAME    depika.com.
depika.com.        3352    IN    A    72.167.142.113

;; Query time: 63 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Feb 21 00:20:51 2013
;; MSG SIZE  rcvd: 63
 

2 comments:

jesse said...

didn't work for me.

jesse said...

neither command worked for me....
command not found.