|
Viewed
Inside MCSE
|
Name ResolutionWhile IP is designed to work with the 32-bit IP addresses of the source and the destination hosts, computers are used by people who are not very good at using and remembering the IP addresses of the computers with which they wish to communicate. People are much better at using and remembering names than IP addresses. If a name is used as an alias for the IP address, there must exist a mechanism for assigning names to IP nodes to ensure its uniqueness and resolving a name to its IP address. In this section, we will discuss the mechanisms used for assigning and resolving host names (which are used by Windows Sockets applications), and NetBIOS names (which are used by NetBIOS applications). Host Name ResolutionA host name is an alias assigned to an IP node to identify it as a TCP/IP host. The host name can be up to 255 characters long and can contain alphabetic and numeric characters and the "-" and "." characters. Multiple host names can be assigned to the same host. For Windows NT–based computers, the host name does not have to match the Windows NT computer name. Windows Sockets applications, such as Microsoft Internet Explorer and the FTP utility, can use one of two values for the destination to be connected—the IP address or a host name. When the IP address is specified, name resolution is not needed. When a host name is specified, the host name must be resolved to an IP address before IP-based communication with the desired resource can begin. Host names can take various forms. The two most common forms are a nickname and a domain name. A nickname is an alias to an IP address that individual people can assign and use. A domain name is a structured name that follows Internet conventions. Domain NamesTo facilitate a variety of different types of organizations and their desires to have ascaleable, customizable naming scheme in which to operate, the InterNIC has created and maintains a hierarchical namespace called the Domain Name System(DNS). DNS is a naming scheme that looks similar to the directory structure for files on a disk. However, instead of tracing a file from the root directory through subdirectories to its final location and its file name, a host name is traced from its final location through its parent domains back up to the root. The unique name of the host, representing its position in the hierarchy, is called its Fully Qualified Domain Name (FQDN). The top-level domain namespace is shown in Figure 11 with example second level and subdomains.
Figure 11 The Domain Name System The parts of the domain namespace are:
Table 26 Internet top-level domain names
For example, for the FQDN ftpsrv.wcoast.slate.com.:
Domain names are not case sensitive. Organizations not connected to the Internet can implement whatever top and second-level domain names they want. However, typical implementations do adhere to the InterNIC specification so that an eventual participation in the Internet will not require a renaming process. Host Name Resolution Using a HOSTS File One common way to resolve a host name to an IP address is to use a locally stored database file which contains IP-address-to-host-name mappings. On most UNIX systems, this file is /etc/hosts. On Windows NT-based systems, it is the HOSTS file in the \SystemRoot\system32\drivers\etc directory. Here is an example of the contents of the HOSTS file:
Within the HOSTS file:
The advantage of using a HOSTS file is that it is customizable for the user. Each user can create whatever entries they want, including easy-to-remember nicknames for frequently accessed resources. However, the individual maintenance of the HOSTS file does not scale well to storing large numbers of FQDN mappings. Host Name Resolution Using a DNS ServerTo make host name resolution scaleable and centrally manageable, IP address mappings for FQDNs are stored on DNS servers. A DNS server is a computer which stores FQDN-to-IP-address mappings. To enable the querying of a DNS Server by a host computer, a component called the DNS resolver is enabled and configured with the IP address of the DNS server. The DNS resolver is a built-in component of TCP/IP protocol stacks supplied with most network operating systems, including Windows NT. When a Windows Sockets application is given an FQDN as the destination location, the application calls a Windows Sockets function to resolve the name to an IP address. The request is passed to the DNS resolver component in the TCP/IP protocol. The DNS resolver packages the FQDN request as a DNS Name Query packet and sends it to the DNS server. DNS is a distributed naming system. Rather than storing all the records for the entire namespace on each DNS server, each DNS server only stores the records for a specific portion of the namespace. The DNS server is authoritative for the portion of the namespace which corresponds to records stored on that DNS server. In the case of the Internet, hundreds of DNS servers store various portions of the Internet namespace. To facilitate the resolution of any valid domain name by any DNS server, DNS servers are also configured with pointer records to other DNS servers. The following process outlines what happens when the DNS resolver component on a host sends a DNS query to a DNS server. This example is shown in Figure 12 and is deliberately simplified to gain a basic understanding of the DNS resolution process. 1. The DNS resolver component formats a DNS Name Query containing the FQDN and sends it to the configured DNS server. 2. The DNS server checks the FQDN in the DNS Name Query against locally stored address records. If a record is found, the IP address corresponding to the requested FQDN is sent back to the client. 3. If the FQDN is not found, the DNS server forwards the request to a DNS server that is authoritative for the FQDN. 4. The authoritative DNS server returns the reply, containing the resolved IP address, back to the original DNS server. 5. The original DNS server sends the IP address mapping information to the client.
Figure 12 An example of resolving an FQDN using DNS servers To obtain the IP address of a server that is authoritative for the FQDN, DNS servers on the Internet go through an iterative process of querying multiple DNS servers until the authoritative server is found. Combining a Local Database File with DNSTCP/IP implementations, including Windows NT, allow the use of both a local database file and a DNS server to resolve host names. When a user specifies a host name in a TCP/IP command or utility, TCP/IP will: 1. Check the local database file (the HOSTS file) for a matching name. 2. If a matching name is not found in the local database file, the host name is packaged as a DNS Name Query and sent to the configured DNS server. Combining both methods gives the user the abilities to have a local database file to resolve personalized nicknames and to use the globally distributed DNS database to resolve FQDNs. |
| The MCP Logo is displayed on this web site in accordance with Microsoft Certified Professional Program and Logo Agreement. © Paramvir Likhari 1997 - 1999 |