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:
Comparison with the local hostname
The HOSTS file
Any configured DNS servers
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 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
# 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 188.8.131.52 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 ...