DNS Name Resolution

The designers of DNS wanted to avoid having to keep an up-to-date name resolution file on each computer. DNS instead places name resolution data on one or more special servers. The DNS servers provide name resolution services for the network (see Figure 11.2). If a computer on the network encounters a hostname where it is expecting an IP address, it sends a query to the server asking for the IP address associated with the hostname. If the DNS server has the address, it sends the address back to the requesting computer. The computer then invisibly substitutes the IP address for the hostname and executes the command. When a change occurs on the network (such as a new computer or a change to a hostname), the network administrator only has to change the DNS configuration once (on the DNS server). The new information will then be available to any computer that initiates a DNS query to the server. Also, the DNS server can be optimized for search speed and can support a larger database than would be possible with each computer searching separately through the cumbersome hosts file.

Figure 11.2. A DNS server provides name resolution services for the network.

graphics/11fig02.gif

The DNS server shown in Figure 11.2 provides several advantages over hosts filename resolution. It offers a single DNS configuration point for a local network and provides more efficient use of network resources. However, the configuration shown in Figure 11.2 still does not solve the problem of providing decentralized management of a vast network infrastructure. Like the hosts file, the configuration in Figure 11.2 would not scale well to a huge network like the Internet. The name server in Figure 11.2 could not operate efficiently with a database that included a record for every host on the Internet. Even if it could, the logistics of maintaining an all-Internet database would be prohibitive. Whoever configured the server would have to know about every change to any Internet host anywhere in the world.

A better solution, reasoned the designers, was to let every office or institution configure a local name server to operate as shown in Figure 11.2 and then to provide a means for all the name servers to talk to each other (see Figure 11.3). In this scenario, when a DNS client sends a name resolution request to a name server, the name server does one of the following:

  • If the name server can find the requested address in its own address database, it immediately sends the address to the client.

  • If the name server cannot find the address in its own records, it queries other name servers to find the address and then sends the address to the client.

Figure 11.3. On large networks, DNS servers communicate with each other to provide name resolution services.

graphics/11fig03.gif

You might be wondering how the first name server knows which name server to contact when it begins the query process that will lead to the address.

Actually, this query process is closely associated with the design of the DNS namespace. Keep in mind that DNS is not working strictly with a hostname. As described earlier in this hour, DNS works with fully qualified domain names (FQDNs). An FQDN consists of both a hostname and a name specifying the domain.

The DNS namespace is a multitiered arrangement of domains (see Figure 11.4). A domain is a collection of computers under a single authority sharing a common portion of the namespace (that is, bearing the same domain name). At the top of the DNS tree is a single node known as root. Root is sometimes shown as a period (.), although the actual symbol for root is a null character. Beneath root is a group of domains known as top level domains (TLDs). Figure 11.4 shows some of the TLDs for the world's most famous DNS namespace: the Internet. Top level domains include the familiar .com, .org, and .edu domains, as well as domains for national governments, such as .us (United States), .uk (United Kingdom), .fr (France), and .jp (Japan).

Figure 11.4. The DNS namespace.

graphics/11fig04.gif

By the Way

A new crop of top level domains was recently announced, including .biz, .coop, .info, and .museum.


Beneath each of these top level domains is another tier of domains that (in the case of the Internet) are operated by companies, institutions, or organizations. The institutional name is prefixed to the top level domain name. For instance, in Figure 11.5, DeSade College has the domain name DeSade.edu. The organization with authority over a domain can create one or more additional tiers of subdomains. At each level, the name of the local domain is prefixed to the parent domain name. For example, the department of recreational pyrotechnics at DeSade has the domain name flames.DeSade.edu (refer to Figure 11.5), and the department's popular lounge (which the students affectionately call "the dungeon") has the name dungeon.flames.DeSade.edu. In all, the DNS system supports up to 127 levels of domains, although a name of that length would evoke agony.

Figure 11.5. An appropriate DNS scenario.

graphics/11fig05.gif

By the Way

If you've worked much with the Internet, you have probably noticed that extended domain names with several levels (such as the scenario shown in Figure 11.5) are relatively uncommon. Web sites, especially in the crowded .com TLD, are typically referenced as the institutional domain name with the www prefix: www.ibm.com. However, keep in mind that a Web site might be served from a single server or group of servers at a single location. Multitiered domain names are encountered more commonly by network admins accessing resources on a large corporate network that spans several locations. TLDs in the public sector (such .gov) tend to make more use of multitiered names.


The domain name shows the chain of domains from the top of the tree. The name server in the domain sams.com holds name resolution information for hosts located in sams.com. The authoritative name server for a domain can delegate name resolution for a subdomain to another server. For instance, the authoritative name server in sams.com can delegate authority for the subdomain edit.sams.com to another name server. The name resolution records for the subdomain edit.sams.com are then located on the name server that has been delegated authority for the subdomain. Authority for name resolution is thus delegated throughout the tree, and the administrators for a given domain can have control of name-to-address mappings for the hosts in that domain.

When a host on the network needs an IP address, it usually sends what is called a recursive query to a nearby name server. This query tells the name server, "either give me the IP address associated with this name or else tell me that you can't find it." If the name server cannot find the requested address among its own records, it initiates a process of querying other name servers to obtain the address. This process is shown in Figure 11.6. Name server A is using what is called an iterative query to find the address. An iterative query tells the next name server "either send me the IP address or give me a clue to where I might find it."

Figure 11.6. The name resolution process.

graphics/11fig06.gif

The process for DNS name resolution is as follows (refer to Figure 11.6):

  1. Host1 sends a query to name server A asking for the IP address associated with the domain name trog.DogInStarlight.marines.mil.

  2. Name server A checks its own records to see if it has the requested address. If server A has the address, it returns the address to Host1.

  3. If name server A does not have the address, it initiates the process of finding the address. Name server A sends an iterative request for the address to name server B, a top level name server for the .mil domain, asking for the address associated with the name trog.DogInStarlight.marines.mil.

  4. Name server B is not able to supply the address, but it is able to send name server A the address of name server C, the name server for marines.mil.

  5. Name server A sends a request for the address to name server C. Name server C is not able to supply the address, but it is able to send the address of name server D, the name server for DogInStarlight.marines.com.

  6. Name server A sends a request for the IP address to name server D. Name server D looks up the address for the host trog.DogInStarlight.marines.mil and sends the address to name server A. Name server A then sends the address to Host1.

  7. Host1 initiates a connection to the host trog.DogInStarlight.marines.mil.

This process occurs thousands (if not millions) of times a day on the Internet. This tidy scenario is complicated somewhat by some additional features of the modern network, including address caching, DHCP, and dynamic DNS. However, the functionality of most TCP/IP networks depends on this form of DNS name resolution.

It is also important to note that the network is not required to have a separate name server for each node on the domain tree. A single name server can handle multiple domains. It is also common for multiple name servers to serve a single domain.



Sams Teach Yourself TCP/IP in 24 Hours
Sams Teach Yourself TCP/IP in 24 Hours (4th Edition)
ISBN: 0672329964
EAN: 2147483647
Year: 2003
Pages: 259
Authors: Joe Casad

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net