You are on page 1of 5

DNS Protocol Messages

DNS records
DNS: distributed database storing resource records (RR)

RR format: (name, value, type, ttl)


Each DNS reply message carries one or more RRs
Type=A
name is hostname
value is IP address

Type=NS
name is domain (e.g. foo.com)
value is IP address of
authoritative DNS server
that knows how to obtain the
IP addresses for hosts in the
domain

DNS messages
DNS protocol : query and response messages, both with same message format

Message header
Identification:

16 bit nmber for


query
reply to query uses
same number
Flags:
Query (0) or reply(1)
recursion desired
recursion available

DNS Messages
Questions:
Indicate the number of queries in the question
section of the message.
The question section contains
(1) a name field that contains the name that is being
queried
(2) a type field that indicates the type of question
being asked

Answers (All 0s in the query message)

In reply message this section contains the


resource records for the name that was queried.
Reply can have multiple RRs

DNS protocol, messages


Name, type fields
for a query
RRs in reponse
to query
records for
authoritative servers
additional info that may be used

You might also like