The Domain Name System is a distributed
database. This structure allows local control of the segments of the
overall database, yet data in each segment is available across the
entire network through a client/server scheme. Robustness and
adequate performance are achieved through replication and caching.
Programs called
name servers constitute the server half of
DNS's client/server mechanism. Name servers contain information
about some segments of the database and make that information
available to clients, called resolvers.
Resolvers are often just library routines that create queries and
send them across a network to a name
server.
The
structure of the DNS database, shown in Figure 1-1,
is similar to the structure of the Windows filesystem. The whole
database (or filesystem) is pictured as an inverted tree, with the
root node at the top. Each node in the tree has a text label, which
identifies the node relative to its parent. This is roughly analogous
to a "relative pathname" in a filesystem, like
bin. One label—the null label, or
""—is reserved for the root node. In text, the root
node is written as a single dot (.). In the Windows filesystem, the
root is written as a backslash (\ ).
Each node is also the root of a new subtree of the overall tree. Each
of these subtrees represents a partition of the overall
database—a "directory" in the Windows filesystem,
or a domain in the Domain Name System. Each
domain or directory can be further divided into additional
partitions, called subdomains in DNS, like a
filesystem's "subdirectories." Subdomains, like
subdirectories, are drawn as children of their parent
domains.
Every domain
has a unique name, like every directory. A domain's
domain name identifies its position in the
database, much as a directory's "absolute pathname"
specifies its place in the filesystem. In DNS, the domain name is the
sequence of labels from the node at the root of the domain to the
root of the whole tree, with dots (.) separating the labels. In the
Windows filesystem, a directory's absolute pathname is the list
of relative names read from root to leaf (the opposite direction from
DNS, as shown in Figure 1-2), using a slash to
separate the names.