Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

5,561 views
Skip to first unread message

Satchmo

unread,
Mar 4, 2012, 11:26:24 PM3/4/12
to
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

Marc Haber

unread,
Mar 5, 2012, 6:07:24 AM3/5/12
to
Satchmo <don.t...@dontdo.spam.not> wrote:
>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?

dig +trace

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

Chris Davies

unread,
Mar 5, 2012, 6:03:55 AM3/5/12
to
Satchmo <don.t...@dontdo.spam.not> wrote:
> 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?

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

Satchmo

unread,
Mar 6, 2012, 4:50:10 AM3/6/12
to
Chris Davies wrote:
> Satchmo<don.t...@dontdo.spam.not> wrote:
>> > 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?
> 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

Thanks Chris! This is would be great (one command, one step),
unfortunately I get an error using it: "dnstracer: Command not found."

> 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.

This is strategy is longer but it works great! Thanks!

> Chris

Satchmo

Satchmo

unread,
Mar 6, 2012, 4:56:04 AM3/6/12
to
Marc Haber wrote:
> Satchmo<don.t...@dontdo.spam.not> wrote:
>> 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?
>
> dig +trace

Interesting. This worked as well. Thank you Marc!

> Greetings
> Marc

Satchmo

Chris Davies

unread,
Mar 6, 2012, 5:25:31 AM3/6/12
to
>> dnstracer -4 -c -s .www.roaima.co.uk

Satchmo <don.t...@dontdo.spam.not> wrote:
> Thanks Chris! This is would be great (one command, one step),
> unfortunately I get an error using it: "dnstracer: Command not found."

So install it.
Chris
0 new messages