Skip to content
May 10 / Greg

Tracing DNS Servers With Dig

For the people that like to see the hops that their DNS entries take, there is the trace option in Dig. If you are trying to diagnose DNS SOA issues with forward or reverse zones, this is a must!

Forward traces:

1
dig gregsowell.com +trace
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[root@dns2 ~]# dig gregsowell.com +trace
 
; <<>> DiG 9.2.4 <<>> gregsowell.com +trace
;; global options:  printcmd
.                       178662  IN      NS      i.root-servers.net.
.                       178662  IN      NS      j.root-servers.net.
.                       178662  IN      NS      k.root-servers.net.
.                       178662  IN      NS      l.root-servers.net.
.                       178662  IN      NS      m.root-servers.net.
.                       178662  IN      NS      a.root-servers.net.
.                       178662  IN      NS      b.root-servers.net.
.                       178662  IN      NS      c.root-servers.net.
.                       178662  IN      NS      d.root-servers.net.
.                       178662  IN      NS      e.root-servers.net.
.                       178662  IN      NS      f.root-servers.net.
.                       178662  IN      NS      g.root-servers.net.
.                       178662  IN      NS      h.root-servers.net.
;; Received 500 bytes from 209.189.224.40#53(209.189.224.40) in 1 ms
 
com.                    172800  IN      NS      d.gtld-servers.net.
com.                    172800  IN      NS      g.gtld-servers.net.
com.                    172800  IN      NS      j.gtld-servers.net.
com.                    172800  IN      NS      i.gtld-servers.net.
com.                    172800  IN      NS      c.gtld-servers.net.
com.                    172800  IN      NS      f.gtld-servers.net.
com.                    172800  IN      NS      m.gtld-servers.net.
com.                    172800  IN      NS      l.gtld-servers.net.
com.                    172800  IN      NS      b.gtld-servers.net.
com.                    172800  IN      NS      e.gtld-servers.net.
com.                    172800  IN      NS      h.gtld-servers.net.
com.                    172800  IN      NS      k.gtld-servers.net.
com.                    172800  IN      NS      a.gtld-servers.net.
;; Received 504 bytes from 192.36.148.17#53(i.root-servers.net) in 43 ms
 
gregsowell.com.         172800  IN      NS      dns1.managednetworks.com.
gregsowell.com.         172800  IN      NS      dns2.managednetworks.com.
;; Received 118 bytes from 192.31.80.30#53(d.gtld-servers.net) in 29 ms
 
gregsowell.com.         38400   IN      A       209.189.228.152
gregsowell.com.         38400   IN      NS      dns1.managednetworks.com.
gregsowell.com.         38400   IN      NS      dns2.managednetworks.com.
gregsowell.com.         38400   IN      NS      dns3.managednetworks.com.
;; Received 169 bytes from 209.189.224.40#53(dns1.managednetworks.com) in 0 ms

Reverse traces:

1
dig -x 209.189.228.152 +trace
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[root@dns2 ~]# dig -x 209.189.228.152 +trace
 
; <<>> DiG 9.2.4 <<>> -x 209.189.228.152 +trace
;; global options:  printcmd
.                       178553  IN      NS      m.root-servers.net.
.                       178553  IN      NS      a.root-servers.net.
.                       178553  IN      NS      b.root-servers.net.
.                       178553  IN      NS      c.root-servers.net.
.                       178553  IN      NS      d.root-servers.net.
.                       178553  IN      NS      e.root-servers.net.
.                       178553  IN      NS      f.root-servers.net.
.                       178553  IN      NS      g.root-servers.net.
.                       178553  IN      NS      h.root-servers.net.
.                       178553  IN      NS      i.root-servers.net.
.                       178553  IN      NS      j.root-servers.net.
.                       178553  IN      NS      k.root-servers.net.
.                       178553  IN      NS      l.root-servers.net.
;; Received 500 bytes from 209.189.224.40#53(209.189.224.40) in 1 ms
 
209.in-addr.arpa.       86400   IN      NS      W.ARIN.NET.
209.in-addr.arpa.       86400   IN      NS      V.ARIN.NET.
209.in-addr.arpa.       86400   IN      NS      Z.ARIN.NET.
209.in-addr.arpa.       86400   IN      NS      U.ARIN.NET.
209.in-addr.arpa.       86400   IN      NS      X.ARIN.NET.
209.in-addr.arpa.       86400   IN      NS      DILL.ARIN.NET.
209.in-addr.arpa.       86400   IN      NS      Y.ARIN.NET.
;; Received 169 bytes from 202.12.27.33#53(m.root-servers.net) in 195 ms
 
228.189.209.in-addr.arpa. 86400 IN      NS      dns1.managednetworks.com.
228.189.209.in-addr.arpa. 86400 IN      NS      dns3.managednetworks.com.
228.189.209.in-addr.arpa. 86400 IN      NS      dns2.managednetworks.com.
;; Received 122 bytes from 72.52.71.2#53(W.ARIN.NET) in 39 ms
 
152.228.189.209.in-addr.arpa. 38400 IN  PTR     152.228.189.209.managednetworks.com.
228.189.209.in-addr.arpa. 38400 IN      NS      dns2.managednetworks.com.
228.189.209.in-addr.arpa. 38400 IN      NS      dns3.managednetworks.com.
228.189.209.in-addr.arpa. 38400 IN      NS      dns1.managednetworks.com.
;; Received 200 bytes from 209.189.224.40#53(dns1.managednetworks.com) in 0 ms

2 Comments

leave a comment
  1. Bagus / May 10 2010

    Greg, Off topics: Is there any simple way to get the DNS request statistics (success, failure, how many etc.) on the windows server ?

Leave a Comment

 

*