The Domain Name System (DNS) provides a hierarchy of names for computers and
services on the Internet or other networks. Its most noteworthy function is
the translation of domain names such as example.com into IP addresses. DNS
is required for the Internet to function, operates on a global scale, and is
DNS servers normally accept messages on UDP port 53. The DNS protocol has two
message types, queries and replies; both use the same format. These
messages are used to transfer resource records (RRs). A RR contains a name,
a time-to-live (TTL), a class (normally IN), a type, and a value. For
example, an A-type resource record specifies the IPv4 address associated
with a domain. The domain name space is divided into DNS zones and a server
is considered authoritative if it has authority for a particular zone.
An "A" resource record for example.com
example.com. 3600 IN A 184.108.40.206
A DNS request involves the following parts (in the common case):
The resolver receives the request from the client and
makes further requests as necessary to obtain the authoritative record.
A root nameserver can be queried to acquire more
information about a particular top-level domain (TLD), such as com.
A TLD nameserver provides information about domains ending
in a particular TLD.
Finally, an authoritative nameserver is one that
contains the actual DNS records for a particular DNS zone.
Example 1. DNS request and resolution
For example, consider a user attempting to connect to a website at
example.com. Before attempting to connect, the system must acquire the IP
address for that domain (an A record for IPv4). Here is the basic process
for resolving an uncached record: