The hostname that needs to be translated is the function call that an application call in order to perform the translation.
DNS in the user's host then takes over, sending a query message into the network. All DNS query and reply messages are
sent within UDP datagrams to port 53. After a delay, ranging from milliseconds to seconds, DNS in the user's host receives
a DNS reply message that provides the desired mapping. This mapping is then passed to the invoking application.
A simple design for DNS would have one DNS server that contains all the mappings. In this centralized design, clients
simply direct all queries to the single DNS server, and the DNS server responds directly to the querying clients. Although
the simplicity of this design is attractive, it is inappropriate for today's Internet, with its vast number of hosts.
The problems with a centralized design includes:
- A single point of failure. If the DNS server crashes, so does the entire
Internet!
- Traffic volume. A single DNS server would have to handle all DNS queries.
- Distant Centralized database. A single DNS server cann;t be "close to"
all the querying clients.
- Maintenance. The single DNS server would have to keep records for all
Internet hosts.
In summary, a centralized database in a single DNS server simply doesn't scale.
A Distributed, Hierarchical Database
In order to deal with the issue of scale, the DNS uses a large number of servers, organized in a hierarchical fashion and
distributed around the world. No single DNS server has all of the mapping for all of the host in the Internet.
Instead, the mappings are distributed across--root DNS servers. To first approximate, there are three classes of DNS
servers--root DNS servers, top-level domain (TLD) DNS aervers, and authoritative DNS servers--organized in a hierarchy.
To understand how these three classes of servers interact, suppose a DNS client wants to determine the IP address for the
hostname the following events will take place. The client first contacts one of the roots servers, which returns IP
addresses for TLD servers for the top-level domain com. The client then contacts one of these TLD servers, which returns
the IP address of an authoritative server. Finally, the client contacts on of the authoritative servers for which returns
the IP address for the hostname.
Take a closer look at these three classes of DNS servers:
- Root DNS server. In the Internet there are 13 root DNS servers, most
of which are located in North America.
- Top-Level Domain (TLD) servers. These servers are responsible for top-level
doamins such as com, org, net edu, and gov, and all of the country top-level doamins such as uk, fr, ca, and jp.
- Authoritative DNS servers. Every orgainzation with pubicaly accessible
hosts on the Internet must porvide pubicly accessible DNS records that map the names of thos hosts to IP addresses.
The root, TLD, and authoritative DNS servers all belong to the hierarchy of DNS servers. There is another important
type of DNS, called the local DNS server. A local DNS server does not strictly belong to the hierarchy
of servers but is nevertheless central to the DNS architecture. Each ISP has a local DNS server. When a host connects
to an ISP, the ISP provides the host withthe IP addresses of one or more of its local DNS servers. You can easily determine
the IP address of your local DNS server by accessing network status windows in Windows or UNIX. A host's local
DNS server is typically "close to" the host. For an institutional ISP, the local DNS server may be on the same LAN as
the host; for a residential ISP, it is typically separted from the host by no more than a few routers. When a host makes
a DNS query, the query is sent to the local DNS server, which acts a proxy, forwarding the query into the DNS server hierarchy.
DNS Caching
DNS caching, a critically important feature of the DNS system. In truth, DNS extensively exploits DNS caching in
order to improve the delay performance and to reduce the number of DNS messages ricocheting around the Internet. The
idea behind DNS caching is very simple. In a query chain, when a DNS server receives a DNS reply it can cache the information
in the reply in its local memory.
If a hostname/IP address pair is cached in a DNS server and another query arrives to the DNS server for the same hostname,
the DNS server can provide the desired IP address, even if it is not authoritatice for the hostname. Because hosts and
mappings between hsotmanes and IP addresses are by no means permanent, DNS servers discard cahed information after a period
of time.
|