About
A DNS lookup is a request to a DNS server in order to translate a DNS name to an IP and vice versa.
Beware that not all DNS client are performing a lookup on the content of the host file as ping does.
Example of response knwon as replies
Each message consists of:
- a header
- and four sections:
- question,
- answer,
- authority,
- and an additional space.
A header field (flags) controls the content of these four sections
Example of A record query against datacadamia.com
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56993
;; flags: qr rd ra ; qd: 1 an: 2 au: 0 ad: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0; flags: ; udp: 512
;; QUESTIONS:
;; datacadamia.com., type = A, class = IN
;; ANSWERS:
datacadamia.com. 300 IN A 188.114.96.0
datacadamia.com. 300 IN A 188.114.97.0
;; AUTHORITY RECORDS:
;; ADDITIONAL RECORDS:
;; Message size: 76 bytes
Type
Forward
A forward lookup translate a DNS name to an IP. See What is a DNS Forward Lookup?
Reverse
A reverse lookup translate a an IP to a DNS name. See DNS - rDNS - Reverse DNS (lookup|resolution) - from IP to name