Networking / Beginners

Packet Information

Each DNS packet begins with a session identifier. The query, as well as any responses, uses the same session identifier.

After the identifier, the packet header contains 2 bytes for flags and return codes. The flags specify the type of packet (query or reply), type of query (forward/ standard, reverse/inverse, or status), and whether the information is authoritative. The return code specifies if the query succeeded or failed.

The amount of information in the four data segments varies. A simple query usually has one set of information in the query section and no data in the other three sections. In contrast, a simple reply may repeat the query but will contain information in the answer section. Additional information, such as pointers to authoritative name servers, is included in the remaining two sections.

[Previous] [Contents] [Next]