Search code examples
networkingdnsresolvedomaincontrollerbig-ip

How to found where DNS name is expected to resolve?


Does it possible to check which DNS server used for resolving domain name (in intraned network)? We have many steps: proxy, BigIP, domain controllers, etc. I have a complicated networks with many DNS server. Sometimes when in browser I use:

http://mysitedomainalias.mydomain.com

I receive web page, sometime after near 15 minutes I receive error about timeout. But when I use IP address instead of domain alias I always reach my web page. So I have decided that it could be a problem with DNS server. I would like to know common way how to resolve similar problems.


Solution

  • On *NIX systems, dig is a standard tool to test and debug DNS servers:

    deceze$ dig google.com
    
    ...
    
    ;; QUESTION SECTION:
    ;google.com.            IN  A
    
    ;; ANSWER SECTION:
    google.com.     5   IN  A   173.194.35.168
    google.com.     5   IN  A   173.194.35.161
    google.com.     5   IN  A   173.194.35.169
    ...
    
    ;; Query time: 84 msec
    ;; SERVER: 192.168.10.1#53(192.168.10.1)
    ;; WHEN: Mon Jul 14 15:59:05 2014
    ;; MSG SIZE  rcvd: 204
    

    In the last part, SERVER signifies which DNS server answered our request.
    Some more things you can then do with dig:

    • query a specific DNS server instead of the system's default:

      $ dig @mydns.example.com google.com
      
    • trace each step of the resolution chain to see any problems in the canonical name servers:

      $ dig google.com +trace
      
    • query specific record types:

      $ dig google.com NS
      $ dig google.com MX
      $ dig google.com ANY
      

    See the manual: http://linux.die.net/man/1/dig