RFC 883 November 1983
Domain Names - Implementation and Specification
The contents of standard queries and responses
When a name server processes a standard query, it first determines
whether it is an authority for the domain name specified in the
query.
If the name server is an authority, it returns either:
1. the specified resource information
2. an indication that the specified name does not exist
3. an indication that the requested resource information does
not exist
If the name server is not an authority for the specified name, it
returns whatever relevant resource information it has along with
resource records that the requesting resolver can use to locate an
authoritative name server.
Standard query and response example
The overall structure of a query for retrieving information for
Internet mail for domain F.ISI.ARPA is shown below:
+-----------------------------------------+
Header | OPCODE=QUERY, ID=2304 |
+-----------------------------------------+
Question |QTYPE=MAILA, QCLASS=IN, QNAME=F.ISI.ARPA |
+-----------------------------------------+
Answer | |
+-----------------------------------------+
Authority | |
+-----------------------------------------+
Additional | |
+-----------------------------------------+
The header includes an opcode field that specifies that this
datagram is a query, and an ID field that will be used to
associate replies with the original query. (Some additional
header fields have been omitted for clarity.) The question
section specifies that the type of the query is for mail agent
information, that only ARPA Internet information is to be
considered, and that the domain name of interest is F.ISI.ARPA.
The remaining sections are empty, and would not use any octets in
a real query.
RFC 883 November 1983
Domain Names - Implementation and Specification
One possible response to this query might be:
+-----------------------------------------+
Header | OPCODE=RESPONSE, ID=2304 |
+-----------------------------------------+
Question |QTYPE=MAILA, QCLASS=IN, QNAME=F.ISI.ARPA |
+-----------------------------------------+
Answer | |
+-----------------------------------------+
=10= |