Services Provided by DNS

Services Provided by DNS

PCBWay

We have just seen that there are two ways to identify a host – by a hostname and by an IP address. People prefer the more mnemonic hostname identifier, while routers prefer fixed-length , hierarchical structured IP addresses. In order to reconcile these preferences, we need a directory service that translates hostnames to IP addresses. This is the main task of the Internet’s domain name system (DNS). The DNS is a distributed database implemented in a hierarchy of DNS servers, and an application-layer protocol that allows hosts to query the distributed database.

The DNS servers are often UNIX machines running the Berkeley Internet Domain (BIND) software [BIND 2012] . The DNS protocol runs over UDP and uses port 53.

DNS is commonly employed by other application-layer protocols-including HTTP, SMTP, and FTP – to translate user-supplied hostnames to IP addresses.

As an example, consider what happens when a browser (that is, an HTTP client), running on some user’s host, requests the URL www.someschool.edy/index.html . In order for the user’s host to be able to send an HTTP request message to the web server www.someschool.edu, the user’s host must first obtain 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 DSN 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 and that IP address.

We see from this example that DNS adds an additional delay – sometimes substantial – to the internet applications that use it. Fortunately, as we discuss below, the desired IP address is often 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 hostnames to IP addresses:

Host Aliasing

A host with a complicated hostname can have one or more alias names. For example, 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 canonical hostname. Alias hostnames, when present, are typically more mnemonic than canonical hostnames. DNS can be invoked b an application to obtain 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 by mnemonic. For example, if Bob has an account with Hotmail, Bob’s e-mail address might be as simple as bob@hotmail.com. However, the hostname of 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 obtain the canonical hostname for a supplied alias hostname as well as the IP address of the host. In fact, the MX record (see below) permits a company’s mail server and web server to have identical (aliased) hostnames; for example, a company’s web server and mail server can both be called enterprise.com.

Load Distribution

DNS is also used to perform load distribution among replicated servers, such as replicated Web servers. Busy sites, such as cnn.com, are replicated over multiple servers, with each running on a different end system and having a different IP address. For replicated web servers, a set of IP addresses is thus associated with one canonical hostname. The DNS database contains 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, by rotates the ordering of the addresses within each reply. Because a client typically 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.

DNA rotation is also used for e-mail so that multiple mail servers can have the same alias name. also, content distribution companies such as Akamai have used DNS in more sophisticated ways to provide web content distribution.

The DNS is specified in RFC 1034 and RFC 1035, and updated in several additional RFCs. It is a complex system, and we only touch upon key aspect of its operation here. The interested reader is referred to these RFCs and the book by Albitz and Liu.