rfc1433.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 1,011 行 · 第 1/3 页

TXT
1,011
字号






Network Working Group                                        J. Garrett
Request for Comments: 1433                       AT&T Bell Laboratories
                                                               J. Hagan
                                             University of Pennsylvania
                                                                J. Wong
                                                 AT&T Bell Laboratories
                                                             March 1993


                              Directed ARP

Status of this Memo

   This memo defines an Experimental Protocol for the Internet
   community.  Discussion and suggestions for improvement are requested.
   Please refer to the current edition of the "IAB Official Protocol
   Standards" for the standardization state and status of this protocol.
   Distribution of this memo is unlimited.

Abstract

   A router with an interface to two IP networks via the same link level
   interface could observe that the two IP networks share the same link
   level network, and could advertise that information to hosts (via
   ICMP Redirects) and routers (via dynamic routing protocols).
   However, a host or router on only one of the IP networks could not
   use that information to communicate directly with hosts and routers
   on the other IP network unless it could resolve IP addresses on the
   "foreign" IP network to their corresponding link level addresses.
   Directed ARP is a dynamic address resolution procedure that enables
   hosts and routers to resolve advertised potential next-hop IP
   addresses on foreign IP networks to their associated link level
   addresses.

Acknowledgments

   The authors are indebted to Joel Halpern of Network Systems
   Corporation and David O'Leary who provided valuable comments and
   insight to the authors, as well as ongoing moral support as the
   presentation of this material evolved through many drafts.  Members
   of the IPLPDN working group also provided valuable comments during
   presentations and through the IPLPDN mailing list.  Chuck Hedrick of
   Rutgers University, Paul Tsuchiya of Bell Communications Research,
   and Doris Tillman of AT&T Bell Laboratories provided early insight as
   well as comments on early drafts.






Garrett, Hagan & Wong                                           [Page 1]

RFC 1433                      Directed ARP                    March 1993


1.  Terminology

   A "link level network" is the upper layer of what is sometimes
   referred to (e.g., OSI parlance) as the "subnetwork", i.e., the
   layers below IP.  The term "link level" is used to avoid potential
   confusion with the term "IP sub-network", and to identify addresses
   (i.e., "link level address") associated with the network used to
   transport IP datagrams.

   From the perspective of a host or router, an IP network is "foreign"
   if the host or router does not have an address on the IP network.

2.  Introduction

   Multiple IP networks may be administered on the same link level
   network (e.g., on a large public data network).  A router with a
   single interface on two IP networks could use existing routing update
   procedures to advertise that the two IP networks shared the same link
   level network.  Cost/performance benefits could be achieved if hosts
   and routers that were not on the same IP network could use that
   advertised information, and exchange packets directly, rather than
   through the dual addressed router.  But a host or router can not send
   packets directly to an IP address without first resolving the IP
   address to its link level address.

   IP address resolution procedures are established independently for
   each IP network.  For example, on an SMDS network [1], address
   resolution may be achieved using the Address Resolution Protocol
   (ARP) [2], with a separate SMDS ARP Request Address (e.g., an SMDS
   Multicast Group Address) associated with each IP network.  A host or
   router that was not configured with the appropriate ARP Request
   Address would have no way to learn the ARP Request Address associated
   with an IP network, and would not send an ARP Request to the
   appropriate ARP Request Address.  On an Ethernet network a host or
   router might guess that an IP address could be resolved by sending an
   ARP Request to the broadcast address.  But if the IP network used a
   different address resolution procedure (e.g., administered address
   resolution tables), the ARP Request might go unanswered.

   Directed ARP is a procedure that enables a router advertising that an
   IP address is on a shared link level network to also aid in resolving
   the IP address to its associated link level address.  By removing
   address resolution constraints, Directed ARP enables dynamic routing
   protocols such as BGP [3] and OSPF [4] to advertise and use routing
   information that leads to next-hop addresses on "foreign" IP
   networks.  In addition, Directed ARP enables routers to advertise
   (via ICMP Redirects) next-hop addresses that are "foreign" to hosts,
   since the hosts can use Directed ARP to resolve the "foreign" next-



Garrett, Hagan & Wong                                           [Page 2]

RFC 1433                      Directed ARP                    March 1993


   hop addresses.

3.  Directed ARP

   Directed ARP uses the normal ARP packet format, and is consistent
   with ARP procedures, as defined in [1] and [2], and with routers and
   hosts that implement those procedures.

3.1  ARP Helper Address

   Hosts and routers maintain routing information, logically organized
   as a routing table.  Each routing table entry associates one or more
   destination IP addresses with a next-hop IP address and a physical
   interface used to forward a packet to the next-hop IP address.  If
   the destination IP address is local (i.e., can be reached without the
   aid of a router), the next-hop IP address is NULL (or a logical
   equivalent, such as the IP address of the associated physical
   interface).  Otherwise, the next-hop IP address is the address of a
   next-hop router.

   A host or router that implements Directed ARP procedures associates
   an ARP Helper Address with each routing table entry.  If the host or
   router has been configured to resolve the next-hop IP address to its
   associated link level address (or to resolve the destination IP
   address, if the next-hop IP address is NULL), the associated ARP
   Helper Address is NULL.  Otherwise, the ARP Helper Address is the IP
   address of the router that provided the routing information
   indicating that the next-hop address was on the same link level
   network as the associated physical interface.  Section 4 provides
   detailed examples of the determination of ARP Helper Addresses by
   dynamic routing procedures.

3.2  Address Resolution Procedures

   To forward an IP packet, a host or router searches its routing table
   for an entry that is the best match based on the destination IP
   address and perhaps other factors (e.g., Type of Service).  The
   selected routing table entry includes the IP address of a next-hop
   router (which may be NULL), the physical interface through which the
   IP packet should be forwarded, an ARP Helper Address (which may be
   NULL), and other information.  The routing function passes the next-
   hop IP address, the physical interface, and the ARP Helper Address to
   the address resolution function.  The address resolution function
   must then resolve the next-hop IP address (or destination IP address
   if the next-hop IP address is NULL) to its associated link level
   address.  The IP packet, the link level address to which the packet
   should be forwarded, and the interface through which the packet
   should be forwarded are then passed to the link level driver



Garrett, Hagan & Wong                                           [Page 3]

RFC 1433                      Directed ARP                    March 1993


   associated with the physical interface.  The link level driver
   encapsulates the IP packet in one or more link level frames (i.e.,
   may do fragmentation) addressed to the associated link level address,
   and forwards the frame(s) through the appropriate physical interface.
   The details of the functions performed are described via C pseudo-
   code below.

   The procedures are organized as two functions, Route() and Resolve(),
   corresponding to routing and address resolution.  In addition, the
   following low level functions are also used:

     Get_Route(IP_Add,Other) returns a pointer to the routing table
      entry with the destination field that best matches IP_Add.  If no
      matching entry is found, NULL is returned.  Other information such
      as Type of Service may be considered in selecting the best route.

     Forward(Packet,Link_Level_Add,Phys_Int) fragments Packet (if
      needed), and encapsulates Packet in one or more Link Level Frames
      addressed to Link_Level_Add, and forwards the frame(s) through
      interface, Phys_Int.

     Look_Up_Add_Res_Table(IP_Add,Phys_Int) returns a pointer to the
      link level address associated with IP_Add in the address
      resolution table associated with interface, Phys_Int.  If IP_Add
      is not found in the address resolution table, NULL is returned.

     Local_Add_Res(IP_Add,Phys_Int) returns a pointer to the Link Level
      address associated with IP_Add, using address resolution
      procedures associated with address, IP_Add, and interface,
      Phys_Int.  If address resolution is unsuccessful, NULL is
      returned.  Note that different address resolution procedures may
      be used for different IP networks.

     Receive_ARP_Response(IP_Add,Phys_Int) returns a pointer to an ARP
      Response received through interface, Phys_Int, that resolves
      IP_Add.  If no ARP response is received, NULL is returned.

     Dest_IP_Add(IP_Packet) returns the IP destination address from
      IP_Packet.

     Next_Hop(Entry) returns the IP address in the next-hop field of
      (routing table) Entry.

     Interface(Entry) returns the physical interface field of (routing
      table) Entry.

     ARP_Helper_Add(Entry) returns the IP address in the ARP Helper
      Address field of (routing table) Entry.



Garrett, Hagan & Wong                                           [Page 4]

RFC 1433                      Directed ARP                    March 1993


     ARP_Request(IP_Add) returns an ARP Request packet with IP_Add as
      the Target IP address.

     Source_Link_Level(ARP_Response) returns the link level address of
      the sender of ARP_Response.




   ROUTE(IP_Packet)
   {
   Entry = Get_Route(Dest_IP_Add(IP_Packet),Other(IP_Packet));
   If (Entry == NULL)  /* No matching entry in routing table */
     Return;  /*  Discard IP_Packet */
   else
     {  /* Resolve next-hop IP address to link level address */
     If (Next_Hop(Entry) != NULL) /* Route packet via next-hop router */
       Next_IP = Next_Hop(Entry);
     else  /* Destination is local */
       Next_IP = Dest_IP_Add(IP_Packet);
     L_L_Add = Resolve(Next_IP,Interface(Entry),ARP_Helper_Add(Entry));
     If (L_L_Add != NULL)
       Forward(IP_Packet,L_L_Add,Interface(Entry));
     else  /* Couldn't resolve next-hop IP address */
       Return;  /* Discard IP_Packet */
     Return;
     }
   }

   Figure 1:  C Pseudo-Code for the Routing function.





















Garrett, Hagan & Wong                                           [Page 5]

RFC 1433                      Directed ARP                    March 1993


   Resolve(IP_Add,Interface,ARP_Help_Add)
   {
   If ((L_L_Add = Look_Up_Add_Res_Table(IP_Add,Interface)) != NULL)
     {   /* Found it in Address Resolution Table */
     Return L_L_Add;
     }
   else
     {
     If (ARP_Help_Add == NULL)
       {  /* Do local Address Resolution Procedure */
       Return Local_Add_Res(IP_Add,Interface);
       }
     else  /* ARP_Help_Add != NULL */
       {
       L_L_ARP_Help_Add = Look_Up_Add_Res_Table(ARP_Help_Add,Interface);
       If (L_L_ARP_Help_Add == NULL)
                              /* Not in Address Resolution Table */
         L_L_ARP_Help_Add = Local_Add_Res(ARP_Help_Add,Interface);
       If (L_L_ARP_Help_Add == NULL)  /* Can't Resolve ARP Helper Add */
         Return NULL;  /*  Address Resolution Failed */
       else
         {  /* ARP for IP_Add */
         Forward(ARP_Request(IP_Add),L_L_ARP_Help_Add,Interface);
         ARP_Resp = Receive_ARP_Response(IP_Add,Interface);
         If (ARP_Resp == NULL) /* No ARP Response (after persistence) */
           Return NULL;  /* Address Resolution Failed */
         else
           Return Source_Link_Level(ARP_Resp);
           }
         }
       }
     }
   }

   Figure 2:  C Pseudo-Code for Address Resolution function.



3.3  Forwarding ARP Requests

   A host that implements Directed ARP procedures uses normal procedures
   to process received ARP Requests.  That is, if the Target IP address
   is the host's address, the host uses normal procedures to respond to
   the ARP Request.  If the Target IP address is not the host's address,
   the host silently discards the ARP Request.

   If the Target IP address of an ARP Request received by a router is
   the router's address, the router uses normal procedures to respond to



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?