|
Computer Networking first-step Authors: Odom W Published year: 2004 Pages: 87-88/173 |
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 :
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. |
Asking Someone Else to Look Up the Phone Number (IP Address) for YouInstead of using your local phone book, you can always call the phone company and ask for help. Phone companies call this service directory assistance , and almost everyone else in the U.S. calls the service information . You just call directory assistance (dialing 411 in the U.S.), tell the operator the name of the person or business that you want to call, and the operator tells you the number. The TCP/IP protocol called DNS behaves something like a phone company's directory assistance service. DNS defines protocols for the purpose of discovering which names correspond to which IP address. DNS also defines the structure and format of TCP/IP host names . Similar to the way that you can dial 411 in the U.S. and get help finding a phone number, a TCP/IP host can send a message to a DNS server to get help finding an IP address. DNS defines how to figure out names and IP addresses for the entire Internet, as well as inside a single site at a single company. In the next sections, you'll first walk through the simpler processes used inside a single company; then you'll learn about DNS in the Internet and the conventions for what names look like. Asking for Name Resolution Help Inside the CompanyWhen you use directory assistance in the U.S., you pick up the phone and dial 411. To use DNS inside a single company, each TCP/IP host asks for help from a computer that is running a service called a DNS server . For the process to work, two key facts must be true:
The DNS server is a computer that is running DNS server software. The DNS server has a list of all the TCP/IP host names in the network, along with their corresponding IP addresses. You can think of the list as the same general concept as a local host table, but instead of needing a copy on every host computer, there's one copy on the DNS server. Keeping one copy of the list of names and IP addresses current is much easier than having everyone in the company try to do the same! As you'll learn more about in the section titled "Asking for Name Resolution Help Outside the Company," a DNS server doesn't need to know all the names and IP addresses in the Internet, but just a small portion of them. To support DNS, each TCP/IP host needs to know the IP address of the DNS server. It's similar to the idea that everyone in the U.S. knows to dial 411 to get telephone directory assistance. In this case, the DNS server's IP address is 150.1.3.4, and Hannah needs to know that address before she can send packets to the server. Hannah's PC has two ways of knowing the DNS server's IP address. First, the address might be statically configured at Hannah's PC. Alternatively, Hannah might dynamically learn that address using the DHCP protocol, as mentioned in Chapter 10, "Delivering the Goods to the Right Street (IP) Address." Regardless of how Hannah knows that her DNS is at 150.1.3.4, she must know that fact ahead of time. The main concept is simple, as shown in Figure 13-2. This time, Hannah is inside the fictitious example.com corporation's enterprise network. Figure 13-2. Resolving Names and Addresses: The Basic DNS Process
Figure 13-2 shows four steps, which can be explained as follows :
For DNS to work well inside a company, someone must be responsible for supporting it. That work includes updating and changing the list of names and IP addresses. When new names are added, old ones are no longer used, and when TCP/IP hosts change their IP addresses, that person has to keep the DNS server updated.
Asking for Name Resolution Help Outside the CompanyYour local telephone company has a list of all its customers and their local phone numbers. But there are a lot of people in the world who are not customers of your local telephone company, so those people won't be on your local phone company's list of names. However, these days, you can typically dial 411 in the U.S. and get help finding a phone number of someone anywhere in the country. But if you use one local phone company, say Bell South, and the person you are calling is a customer of Verizon, how can the Bell South directory assistance person help you find the phone number? As it turns out, the phone companies share information about the names and phone numbers so that they can each provide better customer service to their own local customers. In effect, the master list of names and phone numbers is distributed among lots of phone companies. A similar kind of thing happens with DNS, although there are some underlying differences. Multiple DNS servers work together, with each DNS holding different sets of names and IP addresses. Figure 13-3 points out the need for DNS servers to cooperate to support name resolution for any name. In this case, Hannah is still in the example.com enterprise network, but now she wants to reach the http://www.fredsco.com website, which is located in the Fredsco enterprise network. Figure 13-3. DNS Request Is Made, but DNS Server Doesn't Know the Name
The key to understanding the problem and its solution is to know that a DNS server only knows about some of the names and addresses. For instance, the example.com company's DNS server (150.1.3.4) only knows about names that end with "example.com." The three steps numbered in Figure 13-3 show how Hannah does not learn the IP address of www.fredsco.com from her name server:
Hannah's PC does not learn the IP address of www.fredsco.com, so she can't reach the www.fredsco.com website. She'll probably see a message in her browser window that implies that the site cannot be found. The DNS in the Fredsco enterprise network knows the name www.fredsco.com and its IP address. However, Hannah, like all well-behaved TCP/IP hosts, asks the only DNS server she knows about for name resolution help. To solve the problem, the DNS servers must work together, as shown in Figure 13-4. Figure 13-4. How DNSs Work Together
Here's the process shown in Figure 13-4:
Ultimately, Hannah learns the IP address of the www.fredsco.com web server. Before this process could work, special DNS servers, called root DNS servers , are installed somewhere in the Internet. Root DNS servers do not really perform name resolution; rather, they know the IP addresses of several other DNS servers. (In Figure 13-4, the DNS server at IP address 1.1.1.1 served as a root DNS server.) Each company's DNS server can refer to one or more root servers, so when it doesn't know a name, a DNS server can ask a root DNS server for help. The root DNS refers the original DNS server to the right DNS server, as in Figure 13-4. After Hannah knows the IP address of the server, everything else can happen as was described in earlier chapters because the name resolution process is complete. For instance, Hannah can send packets to the web server, and those packets can hold TCP segments. Those TCP segments, in turn , hold HTTP messages, as well as the contents of a web page. How Names Should Be FormattedFor the DNS processes to work well, DNS defines some rules for how hosts are named. This section covers the structure and meaning of TCP/IP host names, plus some terminology related to name resolution. First, the names must follow a format that helps the DNS servers decide which DNS should handle DNS requests for a particular name. You have probably noticed that the names used in this chapter, such as www.example.com and www.fredsco.com, have some sort of organization and structure. The last part of the name actually helps identify the DNS that can resolve the name. TCP/IP hosts are organized into groups of hosts called domains . A domain consists of all hosts whose names end with the same text. For instance, the names www.example.com, ftp.example.com, and smtp.example.com would all be host names inside the example.com domain. The part in common among all the namesexample.com in this caseis called the domain name . One or more DNS servers are considered to be the authoritative DNS server for a particular domain. That means that any names that end in that domain name should be resolved by that DNS server, and that DNS server has the ultimate authority for which names have which IP addressesat least for names in that domain. For instance, in Figure 13-4, the DNS server at address 150.1.3.4 was the authoritative DNS for domain example.com. The structure of the DNS system works well. Inside a single company, the DNS administrator can change and add all the names he wants to. As long as the root DNS server knows the list of all the DNS servers and the domain names that they support, anyone on the Internet can ask for name resolution, have the request referred to the right DNS server, and learn the correct IP address. |
|
Computer Networking first-step Authors: Odom W Published year: 2004 Pages: 87-88/173 |
![]() Networking All-in-One For Dummies | ![]() TCP/IP First-Step | ![]() Routing First-Step | ![]() Network Know-How: An Essential Guide for the Accidental Admin |