Content

| 7.3 |  | Troubleshooting TCP/IP Application Layer Protocols |
| 7.3.8 |  | Name resolution |

Domain Name Service (DNS) is the service that translates computer and server names to IP addresses. These names are referred to as Fully-Qualified Domain Names (FQDN).

Before DNS, network servers were identified using the IP addresses. However, this became very cumbersome. Eventually, individuals started writing HOSTS files, which contained names of servers and IP addresses assigned to them. This way, users would FTP or Telnet to a system by using their names instead of the IP addresses. This worked well, and so the HOSTS file was placed on every system on the Internet.

Because administrators of each system maintained the files independently, this created new problems. First, if the text database changed, there was no way to update it automatically on every system. Essentially, the response was to create a centralized HOSTS file, which would be the definitive HOSTS file on the Internet. Routinely, administrators checked this central file for any changes and would update the HOSTS files on their local systems when there were changes.

This system had many problems. For example, with only one HOSTS file on the whole Internet, if that site went down, nobody else knew what any of the DNS names were. Secondly, as more and more systems were added, the HOSTS file started to get very big. Finally, the HOSTS names did not provide for any kind of hierarchy. Therefore if somebody at one site wanted to have a computer named Admin, nobody else in the whole world could have a computer named Admin.

The answer to these problems was Domain Name Service (DNS). DNS allows computer systems to resolve FQDN to IP addresses.

DNS Hierarchy
There are many DNS servers throughout the Internet. However, each DNS server stores only a portion of the entire Internet namespace. A DNS hierarchy enables DNS servers to find their neighbors and ask each other for information about a specific host.

A domain is a label in the DNS hierarchy. Each node in the DNS hierarchy represents a domain. Domains under the top-level domains represent individual organizations or entities. These domains can be further divided into subdomains to ease administration of an organization's host computers. Domains, starting with the top-level domains and branching out below, divide the total DNS name space. The top-level domain names are closely controlled by the InterNIC, a division of the Internet Assigned Numbers Authority (IANA) responsible for assigning these names.

Top-level domain names are part of most URLs. For example, .com, .edu, .net, .gov, and .org are top-level domain names. These top-level domains contain the basis for the rest of the domain naming structure. Individual organizations are granted second-level domain names within one or more of these top-level domains. Because names have to be unique in a domain, they must be registered.

When an organization wishes to acquire a second-level domain name, it must submit a request to the Internet Network Information Center (InterNIC). If the domain name is available and the InterNIC does not have a problem with the name, it is assigned to the organization in exchange for a small biannual fee. The organization itself is responsible for assigning third-level and lower domains.

How DNS is resolved
In Figure , the client makes a request to the corporate DNS server. The DNS server checks its cache to see if the query has already been resolved. In this situation, the corporate DNS server has no record of this query. Therefore, the corporate DNS switches roles and now acts as a client and issues an iterative query to the local ISP.

The ISP name server has no record of this resolved request. The ISP server replies back with a hint to query the root domain server.

The DNS server issues an iterative query at the top of the DNS hierarchy to the root level server. After each query and response the server goes down the DNS tree until it finally finds the correct resolved name.

Nslookup
The most effective command for testing and resolving DNS issues is the nslookup command.

If the lookup request fails, nslookup prints an error message. Figure lists possible error messages.

DNS and Routers
A router can be configured to use DNS lookups so that ping or traceroute commands can be used with a hostname rather than an IP address. Use the commands in Figure to do so.