DNS

From WhyAskWhy.org Wiki
Revision as of 17:33, 10 February 2015 by Deoren (talk | contribs) (Added some additional references.)
Jump to: navigation, search


TODO

  • Find a good parent page for this one
  • Add troubleshooting examples

Example queries

Domain

host example.org

example.org has address 93.184.216.34
example.org has IPv6 address 2606:2800:220:1:248:1893:25c8:1946

A

Normal

dig -t a www.whyaskwhy.org

; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> -t a www.whyaskwhy.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29612
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;www.whyaskwhy.org.             IN      A

;; ANSWER SECTION:
www.whyaskwhy.org.      7103    IN      A       74.207.228.106

;; Query time: 1 msec
;; SERVER: 131.204.2.131#53(131.204.2.131)
;; WHEN: Tue Feb 10 17:25:40 CST 2015
;; MSG SIZE  rcvd: 62

Brief

dig -t a www.whyaskwhy.org +short

74.207.228.106

host www.whyaskwhy.org

www.whyaskwhy.org has address 74.207.228.106

MX

Normal

dig -t mx google.com

; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> -t mx google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44319
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 6

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;google.com.                    IN      MX

;; ANSWER SECTION:
google.com.             556     IN      MX      20 alt1.aspmx.l.google.com.
google.com.             556     IN      MX      30 alt2.aspmx.l.google.com.
google.com.             556     IN      MX      40 alt3.aspmx.l.google.com.
google.com.             556     IN      MX      50 alt4.aspmx.l.google.com.
google.com.             556     IN      MX      10 aspmx.l.google.com.

;; ADDITIONAL SECTION:
alt1.aspmx.l.google.com. 58     IN      A       64.233.186.27
alt2.aspmx.l.google.com. 249    IN      A       64.233.184.26
alt3.aspmx.l.google.com. 249    IN      A       173.194.65.26
alt4.aspmx.l.google.com. 249    IN      A       173.194.71.26
aspmx.l.google.com.     249     IN      A       64.233.171.26

;; Query time: 10 msec
;; SERVER: 131.204.2.131#53(131.204.2.131)
;; WHEN: Tue Feb 10 17:29:08 CST 2015
;; MSG SIZE  rcvd: 227

host -t mx google.com

google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.

Brief

dig -t mx google.com +short

30 alt2.aspmx.l.google.com.
40 alt3.aspmx.l.google.com.
50 alt4.aspmx.l.google.com.
10 aspmx.l.google.com.
20 alt1.aspmx.l.google.com.

PTR

  • dig -x 1.2.3.4
  • host 1.2.3.4

References