Book Image

DNS in Action

By : CP Books a.s.
Book Image

DNS in Action

By: CP Books a.s.

Overview of this book

The Domain Name System is one of the foundations of the internet. It is the system that allows the translation of human-readable domain names into machines-readable IP addresses and the reverse translation of IP addresses into domain names. This book describes the basic DNS protocol and its extensions; DNS delegation and registration, including for reverse domains; using DNS servers in networks that are not connected to the internet; and using DNS servers on firewall machines. Many detailed examples are used throughout the book to show perform various configuration and administration tasks.
Table of Contents (16 chapters)
DNS in Action
Credits
About the Authors
Preface
Country Codes and RIRs
Index

2.3 DNS Query


The DNS QUERY operation consists of a query and an answer. A query contains a request for an RR (or several RRs) from the DNS database. The answer either contains the particular RR or is a denial. The RR contained in an answer can be the ultimate answer or help the client to formulate another DNS QUERY to achieve the aim, i.e., to formulate another iteration.

2.3.1 DNS Query Packet Format

DNS query uses the same packet format for both queries and answers as shown in the following figure:

Figure 2.2: DNS Query packet format

A packet can consist of up to five sections. Each packet has to contain the HEADER section.

The term ‘query’ is used in two senses:

  1. 1. A DNS QUERY operation. A basic DNS protocol operation through which records (RR) are searched for in DNS databases. Several other operations will be discussed in the next chapter.

  2. 2. The DNS QUERY operation always consists of a query (sent by a client) and an answer to it sent to the client by the name server. The client is either...