Results 1 to 4 of 4

Thread: [SOLVED] Check Speed of DNS Server

  1. #1
    Join Date
    Apr 2008
    Beans
    44
    Distro
    Ubuntu 8.04 Hardy Heron

    [SOLVED] Check Speed of DNS Server

    I've been using OpenDNS and ScrubIT dns servers lately for their filtering capacity but it seems that these are slower than Comcast's DNS Servers.

    I found this article which tells me how to determine the speed of various DNS Servers but when I try something similar in Terminal, it doesn't give me the time it takes to resolve the DNS lookup.

    Can anyone help?

    - EarloftheWest

  2. #2
    Join Date
    Oct 2007
    Beans
    456

    Re: Check Speed of DNS Server

    In linux you can prefix any command with "time" which will tell you how long it took for the command to execute, for instance:

    Code:
    james@megathron:~$ time ls
    bin  Desktop  Documents  Fitness-App  mkdev.sh~  project
    
    real	0m0.005s
    user	0m0.000s
    sys	0m0.004s
    If you found the solution to your problem, or not - please come back and tell us. If it worked, mark the thread as solved, if it didn't ask for further help. A thankyou never hurts, too! A question is the beginning of knowledge.

  3. #3
    Join Date
    Apr 2008
    Beans
    44
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Check Speed of DNS Server

    Worked great. Thanks!

    Here's the results in case anyone is curious:

    Code:
    x@ubuntu:~$ time nslookup www.google.com
    Server:		192.168.0.100
    Address:	192.168.0.100#53
    
    Non-authoritative answer:
    www.google.com	canonical name = www.l.google.com.
    Name:	www.l.google.com
    Address: 209.85.173.147
    Name:	www.l.google.com
    Address: 209.85.173.103
    Name:	www.l.google.com
    Address: 209.85.173.104
    Name:	www.l.google.com
    Address: 209.85.173.99
    
    
    real	0m0.021s
    user	0m0.008s
    sys	0m0.004s
    x@ubuntu:~$ time nslookup www.google.com 208.67.222.222
    Server:		208.67.222.222
    Address:	208.67.222.222#53
    
    Non-authoritative answer:
    www.google.com	canonical name = google.navigation.opendns.com.
    Name:	google.navigation.opendns.com
    Address: 208.67.216.230
    Name:	google.navigation.opendns.com
    Address: 208.67.216.231
    
    
    real	0m0.025s
    user	0m0.000s
    sys	0m0.012s
    It looks like Comcast is faster than OpenDNS.

  4. #4
    Join Date
    Nov 2010
    Beans
    241

    Re: [SOLVED] Check Speed of DNS Server

    Sorry for necromancy, but this thread popped up on top of Google search.
    First, the time command as used above gives meaningless results. Because time command really does not measure the lookup time, it measures how long it took in your box to execute the whole command. More importantly comparing lookup time between local caching router (192.168.0.100) and a remote server will always show the remote one is slower.
    Second, there are better tools than nslookup. Below I'm using dig instead. It prints out the actual query time.

    Code:
    $ dig @8.8.8.8 www.google.com
    
    ; <<>> DiG 9.8.3-P1 <<>> @8.8.8.8 www.google.com
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30652
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;www.google.com.                        IN      A
    
    ;; ANSWER SECTION:
    www.google.com.         43199   IN      CNAME   www.l.google.com.
    www.l.google.com.       299     IN      A       74.125.227.115
    www.l.google.com.       299     IN      A       74.125.227.113
    www.l.google.com.       299     IN      A       74.125.227.114
    www.l.google.com.       299     IN      A       74.125.227.112
    www.l.google.com.       299     IN      A       74.125.227.116
    
    ;; Query time: 29 msec
    ;; SERVER: 8.8.8.8#53(8.8.8.8)
    ;; WHEN: Sun Jul 22 05:40:30 2012
    ;; MSG SIZE  rcvd: 132

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •