pavement

Dig

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
m
Line 1: Line 1:
[[dig]] is a tool for troubleshooting [[DNS]] issues, very similar to [[nslookup]], but prefered to it because of nslookup is now obsolete.
+
[[dig]] is a tool for troubleshooting [[DNS]] issues, very similar to [[nslookup]], but prefered to it because of nslookup is now obsolete. [[dig]] is included with the [[BIND]] [[DNS]] software, which is part of the base system.
  
 
The command format is  
 
The command format is  
Line 30: Line 30:
 
==options==
 
==options==
 
  -x reverse lookup
 
  -x reverse lookup
 +
 +
 +
[[Category:FreeBSD for Servers]]
 +
[[Category:Common Tasks]]
 +
[[Category:Ports and Packages]]

Revision as of 11:53, 27 December 2005

dig is a tool for troubleshooting DNS issues, very similar to nslookup, but prefered to it because of nslookup is now obsolete. dig is included with the BIND DNS software, which is part of the base system.

The command format is

dig @server.you.want.to.do.dns.lookups record_you're_looking_for RECORDTYPE 

for example:

dig @192.168.1.1 A freebsdwiki.net

will query the DNS server running at 192.168.1.1 for the "A" (host) record for freebsdwiki.net. You should get results very much like:

digging freebsdwiki.net from server 192.168.1.1 

; <<>> DiG 9.2.3 <<>> @192.168.1.1 freebsdwiki.net a
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2879
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;freebsdwiki.net.               IN      A

;; ANSWER SECTION:
freebsdwiki.net.        300     IN      A       66.154.114.98

;; Query time: 123 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Sun Dec 25 16:26:35 2005
;; MSG SIZE  rcvd: 49


options

-x reverse lookup
Personal tools