DNS -The Internets Directory Service

DNS -The Internets Directory Service

We human beings can be recognized in many ways. For instance, we can be recognized by the names that appear on our birth certificates. We can be recognized by our social security numbers. We can be recognized by our driver's license numbers. Though each of these identifiers can be used to recognize people, within a given context one identifier may be more suitable than another. For instance, the computers at the IRS (the infamous tax-collecting agency in the United States) prefer to use fixed-length social security numbers rather than birth certificate names. On the other hand, ordinary people prefer the more mnemonic birth certificate names rather than social security numbers. (In fact, can you imagine saying, "Hi. My name is 132-67-9875. Please meet my husband, 178-87-1146").

Just as humans can be recognized in many ways, so too can Internet hosts. One identifier for a host is its hostname. Hostnames - such as cnn.com, www.yahoo.com, gaia.cs.umass.edu, and cis.poly.edu - are mnemonic and are therefore appreciated by humans. However, hostnames provide little, if any, information about the location within the Internet of the host. (A hostname such as www.eurecom.fr, which ends with the country code.fr, tells us that the host is probably in France, but doesn't say much more). Moreover, because hostnames can consist of variable-length alphanumeric characters, they would be difficult to process by routers. For these reasons, hosts are also recognized by so-called IP addresses.

We discuss IP addresses in some detail in "The Network Layer", but it is useful to say a few brief words about them now. An IP address consists of four bytes and has a rigid hierarchical structure. An IP address looks like 121.7.106.83, where each period separates one of the bytes expressed in decimal notation from 0 to 255. An IP address is hierarchical because as we scan the address from left to right, we get more and more particular information about where the host is located in the Internet (that is, within which network, in the network of networks). Likewise, when we scan a postal address from bottom to top, we get more and more particular information about where the addressee is located.

Services Provided by DNS


We have just seen that there are two ways to recognize a host - by a hostname and by an IP address. People prefer the more mnemonic hostname identifier, while routers prefer fixed-length, hierarchically structured IP address. In order to reconcile these preferences, we need a directory service that translates hostnames to IP addresses. This is the main task of the Internets domain name system (DNS). The DNS is (1) a distributed database implemented in a hierarchy of DNS servers and (2) an application-layer protocol that allows hosts to query the distributed database. The DNS servers are frequently UNIX machines running the Berkeley Internet Name Domain (BIND) software [BIND 2009]. The DNS protocol runs over UDP and uses port 53.

DNS is usually employed by other application-layer protocols - including HTTP, SMTP and FTP - to translate user-supplied hostnames to IP addresses. As an example, assume what happens when a browser (that is, an HTTP client), running on some users host, requests the URL www.someschool.edu/index.html. In order for the users host, to be able to send an HTTP request message to the Web server www.someschool.edu, the users host must first get the IP address of www.someschool.edu. This is done as follows.

1. The same user machine runs the client side of the DNS application.

2.  The browser extracts the hostname, www.someschool.edu, from the URL and passes the hostname to
      the client side of the DNS application.

3. The DNS client sends a query containing the hostname to a DNS server.

4.  The DNS client eventually receives a reply, which includes the IP address for the hostname.

5.  Once the browser receives the IP address from DNS, it can initiate a TCP connection to the HTTP server
     process located at port 80 at that IP address.

We see from this example that DNS adds an additional delay - sometimes substantial - to the Internet applications that use it. Luckily, as we discuss below, the desired IP address is frequently cached in a "nearby" DNS server, which helps to reduce DNS network traffic as well as the average DNS delay.

DNS provides a few other important services in addition to translating hostname to IP address:

Host aliasing. A host with a complicated hostname can have one or more alias names. For instance, a hostname such as relay1.west-coast.enterprise.com could have, say, two aliases such as enterprise.com and www.enterprise.com. In this case, the hostname relay1.west-coast.enterprise.com is said to be a canonical hostname. Alias hostnames, when present, are usually more mnemonic than canonical hostnames.

PRINCIPLES IN PRACTICE

DNS can be invoked by an application to get the canonical hostname for a supplied alias hostname as well as the IP address of the host.

●  Mail server aliasing. For obvious reasons, it is highly desirable that e-mail addresses be mnemonic. For instance, if Bob has an account with Hotmail, Bob's e-mail address might be as simple as bob@hotmail.com. However, the hostname of the Hotmail mail server is more complicated and much less mnemonic than simply hotmail.com (for example, the canonical hostname might be something like relay1.west-coast.hotmail.com). DNS can be invoked by a mail application to get the canonical hostname for a supplied alias hostname as well as the IP address of the host. Actually, the MX record (see below) permits a company's mail server and Web server to have identical (aliased) hostnames; for instance, a company's Web server and mail server can both be called enterprise.com

●  Load distribution. DNS is also used to carry out load distribution among replicated servers, such as replicated Web servers. Busy sites, such as cnn.com, are replicated over multiple servers, with each server running on a different end system and each having a different IP address. For replicated Web servers, a set of IP addresses is thus associated with one canonical hostname. The DNS database includes this set of IP addresses. When clients make a DNS query for a name mapped to a set of addresses, the server responds with the entire set of IP addresses, but rotates the ordering of the addresses within each reply. Because a client usually sends its HTTP request message to the IP address that is listed first in the set, DNS rotation distributes the traffic among the replicated servers. DNS rotation is also used for e-mail so that multiple mail servers can have the same alias name. Recently, content distribution companies such as Akamai  [Akamai 2009] have used DNS in more complicated ways to provide Web content distribution (see "Multimedia Networking").

The DNS is specified in RFC 1034 and RFC 1035, and updated in various additional RFCs. It is a complex system, and we only touch upon key aspects of its operation here. The interested reader is referred to these RFCs and the book by Abitz and Liu [Abitz 1993]; see also the retrospective paper [Mockapetris 1988], which provides a nice description of the what and why of DNS, and [Mockapetris 2005].



Tags

canonical hostname, hierarchical structure, dns servers, routers, internet applications, end system

Copy Right

The contents available on this website are copyrighted by TechPlus unless otherwise indicated. All rights are reserved by TechPlus, and content may not be reproduced, published, or transferred in any form or by any means, except with the prior written permission of TechPlus.