O'Reilly logo

MCSE: Windows 2000 Exams in a Nutshell by Paul Murphy, Michael Moncur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hostname Resolution

TCP/IP supports hostnames, or alphanumeric aliases corresponding to particular IP addresses. These provide a user-friendly alternative to IP addresses and can be used in most places an IP address would be accepted.

When you attempt to access a remote machine via its hostname, a process called hostname resolution occurs. Windows NT clients use the following methods, in order, to attempt to resolve a hostname:

  1. Comparison with the local hostname

  2. The HOSTS file

  3. Any configured DNS servers

  4. NetBIOS name resolution

Steps 1-3 deal with TCP/IP hostname resolution. If these methods fail, the client attempts to use NetBIOS resolution, described in the next section. The following sections discuss the methods of TCP/IP hostname resolution.

The HOSTS File

The simplest method of hostname resolution uses the HOSTS file. This is a lookup table formatted as an ASCII text file and stored in \systemroot\drivers\etc\HOSTS. This file follows the format of the HOSTS file in BSD Unix 4.3.

The HOSTS file lists IP addresses, each followed by one or more hostnames to act as aliases for that address, separated by spaces or tabs. The # symbol begins a comment. The following is a simple example of a HOSTS file:

# HOSTS file
# (This is a comment)
127.0.0.1       localhost     # Loopback to local host
192.168.0.1     thismachine   # Alias to my actual address
209.68.11.152   starling      # A frequently used host

Entries in the HOSTS file are resolved very quickly and do not require connection to a name server, so this file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required