Section: dns
Family Number
UDP 53
TCP 53

Endian: endian_big
Protocol description
Reference: RFC-1034
Reference: RFC-1035

The goal of domain names is to provide a mechanism for naming resources in such a way that the names are usable in different hosts, networks, protocol families, internets, and administrative organizations.

Todd Lewis commentary: Having taken part in a DNS server implementation, I have very mixed feelings about the Domain Name System. It's certainly an interesting protocol, being the most widely-deployed UDP protocol and, by some counts, the most active protocol on the Internet. However, it is also a very broken protocol in several respects. The resource record (RR) type system was supposed to be extensible, but extending is almost guaranteed to break existing software. There are intricate rules in RFC-1035 concerning case, but they serve both to render case useless and very difficult for implementors, resulting in the worst of both worlds; it would have been much better for everyone involved if case handling were unspecified. I doubt that internationalization was a well-understood matter when the standard was written; it certainly was not well-understood by me at the time, but then again, I was in elementary school. All things considered, DNS has served us well, but it definitely shows its age.

Hank's DNS support is restricted to header fields; I would very much like to support matching on DNS RRs. Adding such support is encouraged.

Name: Hdr
Name: Hdr
Field name Field type Field size Field description
id Integer 16 A 16 bit identifier assigned by the program that generates any kind of query. This identifier is copied the corresponding reply and can be used by the requester to match up replies to outstanding queries.
qr Integer 16 A one bit field that specifies whether this message is a query (0), or a response (1).
opcode Integer 4 A four bit field that specifies kind of query in this message. This value is set by the originator of a query and copied into the response. The values are: 0 a standard query (QUERY) 1 an inverse query (IQUERY) 2 a server status request (STATUS) 3-15 reserved for future use
aa Integer 1 Authoritative Answer - this bit is valid in responses, and specifies that the responding name server is an authority for the domain name in question section. . Note that the contents of the answer section may have multiple owner names because of aliases. The AA bit corresponds to the name which matches the query name, or the first owner name in the answer section.
tc Integer 1 TrunCation - specifies that this message was truncated due to length greater than that permitted on the transmission channel.
rd Integer 1 Recursion Desired - this bit may be set in a query and is copied into the response. If RD is set, it directs the name server to pursue the query recursively. Recursive query support is optional.
ra Integer 1 Recursion Available - this be is set or cleared in a response, and denotes whether recursive query support is available in the name server.
z Integer 3 Reserved for future use. Must be zero in all queries and responses.
tcode Integer 4 Response code - this 4 bit field is set as part of responses. The values have the following interpretation: 0 No error condition 1 Format error - The name server was unable to interpret the query. 2 Server failure - The name server was unable to process this query due to a problem with the name server. 3 Name Error - Meaningful only for responses from an authoritative name server, this code signifies that the domain name referenced in the query does not exist. 4 Not Implemented - The name server does not support the requested kind of query. 5 Refused - The name server refuses to perform the specified operation for policy reasons. For example, a name server may not wish to provide the information to the particular requester, or a name server may not wish to perform a particular operation (e.g., zone transfer) for particular data. 6-15 Reserved for future use.
qdcount Integer 16 an unsigned 16 bit integer specifying the number of entries in the question section.
ancount Integer 16 an unsigned 16 bit integer specifying the number of resource records in the answer section.
nscount Integer 16 an unsigned 16 bit integer specifying the number of name server resource records in the authority records section.
arcount Integer 16 an unsigned 16 bit integer specifying the number of resource records in the additional records section.

RCS ID: "$Id: dns.xml,v 1.2 2001/10/29 06:52:01 tlewis Exp $"