old-www/LDP/nag2/x-087-2-issues.arp.html

203 lines
4.7 KiB
HTML

<HTML
><HEAD
><TITLE
>Address Resolution</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
REL="HOME"
TITLE="Linux Network Administrators Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="Issues of TCP/IP Networking"
HREF="x-087-2-issues.html"><LINK
REL="PREVIOUS"
TITLE="IP Addresses"
HREF="x-087-2-issues.ip-addresses.html"><LINK
REL="NEXT"
TITLE="IP Routing"
HREF="x-087-2-issues.routing.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Network Administrators Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x-087-2-issues.ip-addresses.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 2. Issues of TCP/IP Networking</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x-087-2-issues.routing.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="X-087-2-ISSUES.ARP"
>2.3. Address Resolution</A
></H1
><P
>Now that you've seen how IP addresses are composed, you may be wondering
how they are used on an Ethernet or Token Ring network to address different
hosts. After all, these protocols have their own addresses to identify hosts
that have absolutely nothing in common with an IP address, don't they? Right.</P
><P
>&#13;
A mechanism is needed to map IP addresses onto the addresses of the
underlying network. The mechanism used is the <I
CLASS="EMPHASIS"
>Address
Resolution Protocol</I
> (ARP). In fact, ARP is not confined to
Ethernet or Token Ring, but is used on other types of networks, such
as the amateur radio AX.25 protocol. The idea underlying ARP is
exactly what most people do when they have to find Mr. X in a throng
of 150 people: the person who wants him calls out loudly enough that
everyone in the room can hear them, expecting him to respond if he is
there. When he responds, we know which person he is.</P
><P
>When ARP wants to find the Ethernet address corresponding to a given
IP address, it uses an Ethernet feature called <I
CLASS="EMPHASIS"
>broadcasting</I
>, in which a datagram is addressed to
all stations on the network simultaneously. The broadcast datagram
sent by ARP contains a query for the IP address. Each receiving host
compares this query to its own IP address and if it matches, returns
an ARP reply to the inquiring host. The inquiring host can now
extract the sender's Ethernet address from the reply.</P
><P
>You may wonder how a host can reach an Internet address that may be on
a different network halfway around the world. The answer to this
question involves <I
CLASS="EMPHASIS"
>routing</I
>, namely finding the
physical location of a host in a network. We will discuss this issue
further in the next section.</P
><P
>Let's talk a little more about ARP. Once a host has discovered an
Ethernet address, it stores it in its ARP cache so that it doesn't
have to query for it again the next time it wants to send a datagram
to the host in question. However, it is unwise to keep this
information forever; the remote host's Ethernet card may be replaced
because of technical problems, so the ARP entry becomes
invalid. Therefore, entries in the ARP cache are discarded after some
time to force another query for the IP address.</P
><P
>&#13;
Sometimes it is also necessary to find the IP address associated with
a given Ethernet address. This happens when a diskless machine wants
to boot from a server on the network, which is a common situation on
Local Area Networks. A diskless client, however, has virtually no
information about itself&#8212;except for its Ethernet address! So it
broadcasts a message containing a request asking a boot server to
provide it with an IP address. There's another protocol for this
situation named <I
CLASS="EMPHASIS"
>Reverse Address Resolution
Protocol</I
> (RARP). Along with the BOOTP protocol, it serves
to define a procedure for bootstrapping diskless clients over the
network.</P
><P
></P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x-087-2-issues.ip-addresses.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x-087-2-issues.routing.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>IP Addresses</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="x-087-2-issues.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>IP Routing</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>