Internet Access  «Prev   Next»
Lesson 6Configuring hosts files
ObjectiveDescribe how to configure hosts files.

Configuring Host Files

Computers read numbers (like IP addresses). Humans read words (like New York Times). Fortunately, there is a way for computers to translate words (or names) into numbers. That translation process is called name resolution. For example, when you enter http://www.yahoo.com in your browser's address field, the name www.yahoo.com is resolved into its corresponding IP address by the Internet protocol running on your computer. There are two ways this resolution can occur: hosts files or a DNS server.

What is a hosts file?

The original resolution method was to manually update local hosts files. A hosts file is an ASCII text file containing the name and the corresponding IP address of systems that you regularly communicate with. The system administrator would update the file as new systems came online. In the past, a hosts file was maintained by the IP address registry and would be periodically downloaded and edited by system administrators. As the number of hosts connected to the Internet increased, this method became impractical. So, University of California, Berkeley developed the Domain Name System (DNS).
The figure below is an example of a host configuration file.

Sample Host Configuration File

1. This file contains the mapping of IP addresses to host names.
Each entry should be kept on an individual line.
The IP address should be placed in the first column followed by the corresponding host name.
The IP address and the host name should be separated by at least one space.
Additionally , comments (such as these) may be inserted on individual lines or following the machine name denoted by a # symbol.
For example
102.54.94.97  rhino.acne.com   #source server
38.25.63.18   x.acne.com       # x client host


127.0.0.1 localhost 284.71.200.68 www.yahoo.com 192.18.97.195 www.sun.com

What is DNS?

Instead of maintaining local hosts files on every computer system, DNS uses database (DNS) servers and DNS clients (called resolvers). Through the hierarchy of Internet DNS servers, users can access by name any registered system.
If you are connected to the Internet using a dial-up connection (phone/modem line), your Internet service provider (ISP) automatically assigns the DNS address. If necessary, however, you can enter this information manually by entering DNS configuration information in the TCP/IP Properties dialog box as shown in the figure below.

Sample TCP/IP Domain Name Settings
Sample TCP/IP Domain Name Settings

In the next lesson, you will learn the differences between dynamic and static IP addressing.