DNS

From WhyAskWhy.org Wiki
Revision as of 17:27, 10 February 2015 by Deoren (talk | contribs) (Added full examples for querying A record values.)

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 output

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

dig -t mx example.org

...

PTR

  • dig -x 1.2.3.4
  • host 1.2.3.4

References