Looking Up the Name and Number in the Phone Book (Host Table)


If you need to call someone and you know the person's name but not the phone number, you can just look up the information in the phone book. It's simple, easy, and convenient. However, it only works if the phone book that you have happens to have that person's name and number in it.

TCP/IP hosts can have the equivalent of a phone book sitting in a file. The local host file contains a list of TCP/IP host computer names and their corresponding IP addresses. That host computer just needs to look at the local host file for the name and read the address next to it. Figure 13-1 shows the basic process.

Figure 13-1. Using a PC's Local Host File


Figure 13-1 shows four steps, as follows:

1.

Hannah opens a browser and types in http://www.example.com.

2.

Before Hannah's PC can send an IP packet to the example.com web server at 150.1.3.3, she must look in her host file. The host file lists www.example.com, along with IP address 150.1.3.3. All the higher-layer worksuch as HTTP GETs, TCP connection establishment, and the likeflows in IP packets, and when Hannah sends those IP packets, they go to IP address 150.1.3.3.

3.

Hannah retrieves the IP address from the local host file.

4.

Hannah's PC then sends packets to the web server using destination IP address 150.1.3.3.

Even though using the local host file might be easy to understand, it has some drawbacks, just like when you use the phone book. Your phone book simply doesn't list the names and numbers of everyone on the planet. Such a book would probably fill your entire house, and finding the name would be a big hassle.

Similarly, a local host table does not solve all TCP/IP naming problems. People frequently add new server names in a single enterprise network, and many new server names are added to the Internet every day. In addition, the user of each PC is ultimately responsible for updating his own host file. Keeping the local host file updated and accurate is pretty impractical; even if the local host file could be kept updated, the file would probably get really large and unwieldy. As a result, most host computers do not use a local host file; instead, they use something called the Domain Name System (DNS), which you'll learn about in the next section.




Computer Networking first-step
Computer Networking First-Step
ISBN: 1587201011
EAN: 2147483647
Year: 2004
Pages: 173
Authors: Wendell Odom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net