This preview shows page 1. Sign up to view the full content.
Unformatted text preview: menet2run/tcpip/tcp-ip-illustrated/dns_the.htm (4 of 18) [12/09/2001 14.47.06] Chapter 14. DNS: The Domain Name System Figure 14.4 flags field in the DNS header.
We'll start at the leftmost bit and describe each field.
q q q q q q
q QR is a 1-bit field: 0 means the message is a query, 1 means it's a response.
opcode is a 4-bit field. The normal value is 0 (a standard query). Other values are 1 (an inverse query) and 2
(server status request).
AA is a 1-bit flag that means "authoritative answer." The name server is authoritative for the domain in the
TC is a 1-bit field that means "truncated." With UDP this means the total size of the reply exceeded 512 bytes,
and only the first 512 bytes of the reply was returned.
RD is a 1-bit field that means "recursion desired." This bit can be set in a query and is then returned in the
response. This flag tells the name server to handle the query itself, called a recursive query. If the bit is not set,
and the requested name server doesn't have an authoritative answer, the requested name server returns a list of
other name servers to contact for the answer. This is called an iterative query. We'll see examples of both types
of queries in later examples.
RA is a 1-bit field that means "recursion available." This bit is set to 1 in the response if the server supports
recursion. We'll see in our examples that most name servers provide recursion, except for some root servers.
There is a 3-bit field that must be 0.
rcode is a 4-bit field with the return code. The common values are 0 (no error) and 3 (name error). A name error
is returned only from an authoritative name server and means the domain name specified in the query does not
exist. The next four 16-bit fields specify the number of entries in the four variable-length fields that complete the record. For
a query, the number of questions is normally 1 and the other three counts are 0. Similarly, for a reply the number of
answers is at leas...
View Full Document
- Spring '12