失效链接处理 |
TCP IP Illustrated Volume 1 The Protocols 1st Edition PDF 下载
本站整理下载:
相关截图:
主要内容:
4.1 Introduction
The problem that we deal with in this chapter is that IP addresses only make sense to the TCP/IP protocol
suite. A data link such as an Ethernet or a token ring has its own addressing scheme (often 48-bit addresses) to
which any network layer using the data link must conform. A network such as an Ethernet can be used by
different network layers at the same time. For example, a collection of hosts using TCP/IP and another
collection of hosts using some PC network software can share the same physical cable.
When an Ethernet frame is sent from one host on a LAN to another, it is the 48-bit Ethernet address that
determines for which interface the frame is destined. The device driver software never looks at the destination
IP address in the IP datagram.
Address resolution provides a mapping between the two different forms of addresses: 32-bit IP addresses and
whatever type of address the data link uses. RFC 826 [Plummer 1982] is the specification of ARP.
Figure 4.1 shows the two protocols we talk about in this chapter and the next: ARP (address resolution
protocol) and RARP (reverse address resolution protocol).
Figure 4.1 Address resolution protocols: ARP and RARP.
ARP provides a dynamic mapping from an IP address to the corresponding hardware address. We use the term
dynamic since it happens automatically and is normally not a concern of either the application user or the
system administrator.
RARP is used by systems without a disk drive (normally diskless workstations or X terminals) but requires
manual configuration by the system administrator. We describe it in Chapter 5.
4.2 An Example
Whenever we type a command of the form
% ftp bsdi
the following steps take place. These numbered steps are shown in Figure 4.2.
The application, the FTP client, calls the function gethostbyname(3) to convert the hostname
(bsdi) into its 32-bit IP address. This function is called a resolver in the DNS (Domain Name System),
which we describe in Chapter 14. This conversion is done using the DNS, or on smaller networks, a
static hosts file (/etc/hosts).
1.
The FTP client asks its TCP to establish a connection with that IP address. 2.
TCP sends a connection request segment to the remote host by sending an IP datagram to its IP address.
(We'll see the details of how this is done in Chapter 18.)
|