DNS Tools:


Table of Contents

cmd:dig 
query over slow connection 
Reverse lookups 
bind question 

cmd:dig 

query over slow connection 

The default time out for dig is 5 seconds. If you connection is too slow, you'll probably get timeout:

$ dig www.ibiblio.org
; <<>> DiG 9.2.1 <<>> www.ibiblio.org
;; global options:  printcmd
;; connection timed out; no servers could be reached

To increase query timeout, use the '+time=T' option, like this:

$ dig www.ibiblio.org a '+time=9'

; <<>> DiG 9.2.1 <<>> www.ibiblio.org a +time=9
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13976
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 3

;; QUESTION SECTION:
;www.ibiblio.org.               IN      A

;; ANSWER SECTION:
www.ibiblio.org.        81398   IN      CNAME   helios.metalab.unc.edu.
helios.metalab.unc.edu. 81398   IN      A       152.2.210.81

[...]

Reverse lookups 

Reverse lookups - mapping addresses to names: use the -x option.

It is simplified in dig. addr can be an IPv4 address in dotted-decimal notation, or a colon-delimited IPv6 address. When this option is used, there is no need to provide the name, class and type arguments. dig automatically performs a lookup for a name like 11.12.13.10.in-addr.arpa and sets the query type and class to PTR and IN respectively.