How to get the DNS servers delegation chain list using DIG command

Discussion in 'Linux Networking' started by Satchmo, Mar 5, 2012.

  1. Satchmo

    Satchmo Guest

    Hi all!

    How do I explore the hierarchy of the DNS servers using the 'dig'
    command? I know about the DNS IP/name resolution but how do I get a list
    of the names of DNS servers in the delegation chain for my query?

    I was reading that I can start by using the root-servers.net to initiate
    a query sequence, but I have no clue.

    Any help appreciate it. Thanks!

    -Sachmo
     
    Satchmo, Mar 5, 2012
    #1
    1. Advertisements

  2. Satchmo

    Chris Davies Guest

    Dig probably isn't the best tool for this; I'd suggest something like
    dnstracer instead, like this -

    dnstracer -4 -c -s . www.roaima.co.uk

    But if you really want to use dig, I'd start with "dig ns .", which
    will give you a set of root name servers. Pick one and ask it for the
    nameserver for your top level. In my case I'd ask "dig @k.root-servers.net
    ns uk". I'd then have a set of nameservers for the uk TLD and I would go
    and ask them for "co.uk" using something like this, "dig @ns4.nic.uk ns
    co.uk". And then I'd have a set of nameservers to ask for roaima.co.uk -
    which is my domain.

    Chris
     
    Chris Davies, Mar 5, 2012
    #2
    1. Advertisements

  3. Satchmo

    Marc Haber Guest

    dig +trace

    Greetings
    Marc
     
    Marc Haber, Mar 5, 2012
    #3
  4. Satchmo

    Satchmo Guest

    Thanks Chris! This is would be great (one command, one step),
    unfortunately I get an error using it: "dnstracer: Command not found."
    This is strategy is longer but it works great! Thanks!
    Satchmo
     
    Satchmo, Mar 6, 2012
    #4
  5. Satchmo

    Satchmo Guest

    Interesting. This worked as well. Thank you Marc!
    Satchmo
     
    Satchmo, Mar 6, 2012
    #5
  6. Satchmo

    Chris Davies Guest

    dnstracer -4 -c -s .www.roaima.co.uk

    So install it.
    Chris
     
    Chris Davies, Mar 6, 2012
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.