What Is DIG : “DIG” stands for Domain Information Groper which is a Network Administration Command used for performing any query related with DNS (Domain Name Server). DIG also support the Internationalized Domain Name (IDN) queries. Basically DIG is the part of BIND domain name server. Origin of DIG has replaced the old tools like nslookupand the host program.
Example of DIG Command - :
;; Header:
$ dig redhat.com
; <<>> DiG 9.7.3-RedHat-9.7.3-2.el6 <<>> redhat.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62863
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 3
;; QUESTION SECTION:
;redhat.com. IN A
;; ANSWER SECTION:
redhat.com. 37 IN A 209.132.183.81
;; AUTHORITY SECTION:
redhat.com. 73 IN NS ns4.redhat.com.
redhat.com. 73 IN NS ns3.redhat.com.
redhat.com. 73 IN NS ns2.redhat.com.
redhat.com. 73 IN NS ns1.redhat.com.
;; ADDITIONAL SECTION:
ns1.redhat.com. 73 IN A 209.132.186.218
ns2.redhat.com. 73 IN A 209.132.183.2
ns3.redhat.com. 73 IN A 209.132.176.100
;; Query time: 13 msec
;; SERVER: 209.144.50.138#53(209.144.50.138)
;; WHEN: Thu Jan 12 10:09:49 2012
;; MSG SIZE rcvd: 164
Various Sections of DIG Command - :
1. Header : The header section shows DIG Version, Options Which DIG can use and other header related information.
2. Question : This section show that which kind of query you want to perform with the DIG Command.
3. Answer : The answer received from the DNS after executing DIG command will be displayed in this section.
4. Authority : The DNS server which will response after the DIG query will be shown in this section.
5. Additional : The servers which are shown in the Authority Section, their IP addresses will be shown in this section.
6. Stat : This section tells about the statistics of the DIG command used.
You can turn on or off all these sections according to your needs.
Example of DIG Command - :
;; Header:
$ dig redhat.com
; <<>> DiG 9.7.3-RedHat-9.7.3-2.el6 <<>> redhat.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62863
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 3
;; QUESTION SECTION:
;redhat.com. IN A
;; ANSWER SECTION:
redhat.com. 37 IN A 209.132.183.81
;; AUTHORITY SECTION:
redhat.com. 73 IN NS ns4.redhat.com.
redhat.com. 73 IN NS ns3.redhat.com.
redhat.com. 73 IN NS ns2.redhat.com.
redhat.com. 73 IN NS ns1.redhat.com.
;; ADDITIONAL SECTION:
ns1.redhat.com. 73 IN A 209.132.186.218
ns2.redhat.com. 73 IN A 209.132.183.2
ns3.redhat.com. 73 IN A 209.132.176.100
;; Query time: 13 msec
;; SERVER: 209.144.50.138#53(209.144.50.138)
;; WHEN: Thu Jan 12 10:09:49 2012
;; MSG SIZE rcvd: 164
Various Sections of DIG Command - :
1. Header : The header section shows DIG Version, Options Which DIG can use and other header related information.
2. Question : This section show that which kind of query you want to perform with the DIG Command.
3. Answer : The answer received from the DNS after executing DIG command will be displayed in this section.
4. Authority : The DNS server which will response after the DIG query will be shown in this section.
5. Additional : The servers which are shown in the Authority Section, their IP addresses will be shown in this section.
6. Stat : This section tells about the statistics of the DIG command used.
You can turn on or off all these sections according to your needs.