Difference between revisions of "Dig"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 1: Line 1:
 
The [[command]] [[dig]] allows you to query a name server for IP addresses like this:
 
The [[command]] [[dig]] allows you to query a name server for IP addresses like this:
<pre>
 
# dig www.linuxintro.org
 
  
; <<>> DiG 9.7.3-P1 <<>> www.linuxintro.org
+
# dig www.linuxintro.org
;; global options: +cmd
+
;; Got answer:
+
; <<>> DiG 9.7.3-P1 <<>> www.linuxintro.org
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 884
+
;; global options: +cmd
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
+
;; Got answer:
 
+
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 884
;; QUESTION SECTION:
+
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;www.linuxintro.org.            IN      A
+
 
+
;; QUESTION SECTION:
;; ANSWER SECTION:
+
;www.linuxintro.org.            IN      A  
www.linuxintro.org.    14400  IN      A      '''92.51.132.237'''
+
 
+
;; ANSWER SECTION:
;; Query time: 67 msec
+
www.linuxintro.org.    14400  IN      A      '''92.51.132.237'''
;; SERVER: 192.168.0.1#53(192.168.0.1)
+
;; WHEN: Sat Jul  2 14:34:22 2011
+
;; Query time: 67 msec
;; MSG SIZE  rcvd: 52
+
;; SERVER: 192.168.0.1#53(192.168.0.1)
</pre>
+
;; WHEN: Sat Jul  2 14:34:22 2011
 +
;; MSG SIZE  rcvd: 52
  
 
In this example we see the IP address of www.linuxintro.org is ''92.51.132.237''.
 
In this example we see the IP address of www.linuxintro.org is ''92.51.132.237''.

Revision as of 12:41, 2 July 2011

The command dig allows you to query a name server for IP addresses like this:

# dig www.linuxintro.org

; <<>> DiG 9.7.3-P1 <<>> www.linuxintro.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 884
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

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

;; ANSWER SECTION:
www.linuxintro.org.     14400   IN      A       92.51.132.237

;; Query time: 67 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Sat Jul  2 14:34:22 2011
;; MSG SIZE  rcvd: 52

In this example we see the IP address of www.linuxintro.org is 92.51.132.237.

See also