Address Resolution Protocol and the Domain Name System

Network designers should try to make using the network as simple as possible. At most, users might want to remember the name of another computer with which they want to communicate, such as remembering the name of a web site. They certainly do not want to remember the IP address, nor do they want to try to remember any MAC addresses! So, TCP/

IP needs to have protocols that dynamically discover all the necessary information to allow communications, without the user knowing more than a name.

You might not even think that you need to know the name of another computer. For instance, when you open your browser, you probably have a default home page configured that the browser immediately downloads. You might not think of that URL string as a name, but the universal resource locator (URL) for the home page has a name embedded in it. For instance, in a URL such as www.skylinecomputer.com/Train_Welcome.asp, the www.skylinecomputer.com part is actually the name of the web server for the company that I work for. So, whether you type in the name of another networked computer or it is implied by what you see on your screen, the user typically identifies a remote computer by using a name.

So, TCP/IP needs a way to let a computer find the IP address of another computer based on its name. TCP/IP also needs a way to find MAC addresses associated with other computers on the same LAN subnet. Figure 5-7 outlines the problem.

Figure 5-7 Hannah Knows Jessie's Name, Needs IP Address and MAC Address

Hannah Jessie

* Destination MAC Address = ????.????.???? Source MAC Address = 0200.1111.1111

Eth

IP

UDP

Ad Data

Eth

* Destination IP Address = ?.?.?.? -Source IP Address = 10.1.1.1

* Destination IP Address = ?.?.?.? -Source IP Address = 10.1.1.1

* Information that Hannah Needs to Learn

Hannah knows her own name, IP address, and MAC address because those things are configured in advance. What Hannah does not know are Jessie's IP and MAC addresses. To find the two missing facts, Hannah uses the Domain Name System (DNS) and the Address Resolution Protocol (ARP). Hannah knows the IP address of a DNS server because the address was preconfigured on Hannah's machine. Hannah now sends a DNS request to the DNS, asking for Jessie's IP address. The DNS replies with the address, 10.1.1.2. Figure 5-8 shows the simple process.

Figure 5-8 DNS Request and Reply

DNS Hannah Jessie

Figure 5-8 DNS Request and Reply

DNS Hannah Jessie

Is 10.1.1.2.

Hannah simply sends a DNS request to the server, supplying the name jessie, or jessie.skylinecomputer.com, and the DNS replies with the IP address (10.1.1.2, in this case). Effectively, the same thing happens when you surf the Internet and connect to any web site. Your PC somehow knows the IP address of the DNS; that information can be preconfigured or learned using Dynamic Host Configuration Protocol (DHCP), which is covered later in this chapter. Your PC sends a request, just like Hannah's request for Jessie, asking the DNS to resolve the name into an IP address. After that happens, your PC can start requesting that the web page be sent.

Back to the example with Hannah. Hannah still needs to know the Ethernet MAC address used by 10.1.1.2, so Hannah issues something called an ARP broadcast. An ARP broadcast is sent to a broadcast Ethernet address, so everyone on the LAN receives it. Because Jessie is on the LAN, Jessie receives the ARP broadcast. Because Jessie's IP address is 10.1.1.2 and the ARP broadcast is looking for the MAC address associated with 10.1.1.2, Jessie replies with her own MAC address. Figure 5-9 outlines the process.

Figure 5-9 Sample ARP Process

DNS Hannah Jessie

Figure 5-9 Sample ARP Process

DNS Hannah Jessie

Are 10.1.1.2, Tell Me MAC Address Is

Your MAC Address! 0200.2222.2222.

Are 10.1.1.2, Tell Me MAC Address Is

Your MAC Address! 0200.2222.2222.

Now Hannah knows the destination IP and Ethernet addresses that she should use when sending frames to Jessie, and the packet in Figure 5-7 can be sent successfully.

0 0

Post a comment