Dig
From FreeBSDwiki
(Difference between revisions)
m (Reverted edits by 208.109.123.121 (Talk); changed back to last version by Jimbo) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[dig]] is a tool for troubleshooting [[DNS]] issues | + | [[dig]] is a tool for troubleshooting [[DNS]] issues. It is very similar but preferred to the now obsolete [[nslookup]]. [[dig]] is included with the [[BIND]] [[DNS]] software, which is part of the base system. |
The command format is | The command format is | ||
− | dig @server.you.want.to. | + | dig [@server.you.want.to.query] [RECORDTYPE] record_you're_looking_for |
for example: | for example: | ||
dig @192.168.1.1 A freebsdwiki.net | 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: | 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: | ||
− | |||
− | |||
; <<>> DiG 9.2.3 <<>> @192.168.1.1 freebsdwiki.net a | ; <<>> DiG 9.2.3 <<>> @192.168.1.1 freebsdwiki.net a | ||
;; global options: printcmd | ;; global options: printcmd | ||
Line 25: | Line 23: | ||
;; WHEN: Sun Dec 25 16:26:35 2005 | ;; WHEN: Sun Dec 25 16:26:35 2005 | ||
;; MSG SIZE rcvd: 49 | ;; MSG SIZE rcvd: 49 | ||
− | |||
− | |||
==options== | ==options== | ||
-x reverse lookup | -x reverse lookup | ||
+ | |||
+ | |||
+ | To learn more about DNS, see also: [[root servers]], [[zone file]], [[DNS record types]] | ||
+ | |||
+ | For more DNS tools, see: [[whois]], [[nslookup]], [[host]], [[traceroute]] | ||
+ | |||
+ | [[Category:FreeBSD for Servers]] | ||
+ | [[Category:Common Tasks]] | ||
+ | [[Category:Ports and Packages]] | ||
+ | [[Category:DNS]] |
Latest revision as of 13:15, 5 October 2007
dig is a tool for troubleshooting DNS issues. It is very similar but preferred to the now obsolete nslookup. dig is included with the BIND DNS software, which is part of the base system.
The command format is
dig [@server.you.want.to.query] [RECORDTYPE] record_you're_looking_for
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:
; <<>> 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
[edit] options
-x reverse lookup
To learn more about DNS, see also: root servers, zone file, DNS record types
For more DNS tools, see: whois, nslookup, host, traceroute