Movatterモバイル変換
[0]ホーム
[RFC Home] [TEXT|PDF|HTML] [Tracker] [IPR] [Errata] [Info page]
INTERNET STANDARD
Updated by:5227,5494Errata ExistNetwork Working Group David C. PlummerRequest For Comments: 826 (DCP@MIT-MC) November 1982An Ethernet Address Resolution Protocol-- or --Converting Network Protocol Addresses to 48.bit Ethernet Address for Transmission on Ethernet Hardware AbstractThe implementation of protocol P on a sending host S decides,through protocol P's routing mechanism, that it wants to transmitto a target host T located some place on a connected piece of10Mbit Ethernet cable. To actually transmit the Ethernet packeta 48.bit Ethernet address must be generated. The addresses ofhosts within protocol P are not always compatible with thecorresponding Ethernet address (being different lengths orvalues). Presented here is a protocol that allows dynamicdistribution of the information needed to build tables totranslate an address A in protocol P's address space into a48.bit Ethernet address.Generalizations have been made which allow the protocol to beused for non-10Mbit Ethernet hardware. Some packet radionetworks are examples of such hardware.--------------------------------------------------------------------The protocol proposed here is the result of a great deal ofdiscussion with several other people, most notably J. NoelChiappa, Yogen Dalal, and James E. Kulp, and helpful commentsfrom David Moon.[The purpose of this RFC is to present a method of ConvertingProtocol Addresses (e.g., IP addresses) to Local NetworkAddresses (e.g., Ethernet addresses). This is a issue of generalconcern in the ARPA Internet community at this time. Themethod proposed here is presented for your consideration andcomment. This is not the specification of a Internet Standard.]
Notes:------This protocol was originally designed for the DEC/Intel/Xerox10Mbit Ethernet. It has been generalized to allow it to be usedfor other types of networks. Much of the discussion will bedirected toward the 10Mbit Ethernet. Generalizations, whereapplicable, will follow the Ethernet-specific discussion.DOD Internet Protocol will be referred to as Internet.Numbers here are in the Ethernet standard, which is high bytefirst. This is the opposite of the byte addressing of machinessuch as PDP-11s and VAXes. Therefore, special care must be takenwith the opcode field (ar$op) described below.An agreed upon authority is needed to manage hardware name spacevalues (see below). Until an official authority exists, requestsshould be submitted to David C. Plummer Symbolics, Inc. 243 Vassar Street Cambridge, Massachusetts 02139Alternatively, network mail can be sent to DCP@MIT-MC.The Problem:------------The world is a jungle in general, and the networking gamecontributes many animals. At nearly every layer of a networkarchitecture there are several potential protocols that could beused. For example, at a high level, there is TELNET and SUPDUPfor remote login. Somewhere below that there is a reliable bytestream protocol, which might be CHAOS protocol, DOD TCP, XeroxBSP or DECnet. Even closer to the hardware is the logicaltransport layer, which might be CHAOS, DOD Internet, Xerox PUP,or DECnet. The 10Mbit Ethernet allows all of these protocols(and more) to coexist on a single cable by means of a type fieldin the Ethernet packet header. However, the 10Mbit Ethernetrequires 48.bit addresses on the physical cable, yet mostprotocol addresses are not 48.bits long, nor do they necessarilyhave any relationship to the 48.bit Ethernet address of thehardware. For example, CHAOS addresses are 16.bits, DOD Internetaddresses are 32.bits, and Xerox PUP addresses are 8.bits. Aprotocol is needed to dynamically distribute the correspondencesbetween a <protocol, address> pair and a 48.bit Ethernet address.
Motivation:-----------Use of the 10Mbit Ethernet is increasing as more manufacturerssupply interfaces that conform to the specification published byDEC, Intel and Xerox. With this increasing availability, moreand more software is being written for these interfaces. Thereare two alternatives: (1) Every implementor invents his/her ownmethod to do some form of address resolution, or (2) everyimplementor uses a standard so that his/her code can bedistributed to other systems without need for modification. Thisproposal attempts to set the standard.Definitions:------------Define the following for referring to the values put in the TYPEfield of the Ethernet packet header: ether_type$XEROX_PUP, ether_type$DOD_INTERNET, ether_type$CHAOS,and a new one: ether_type$ADDRESS_RESOLUTION.Also define the following values (to be discussed later): ares_op$REQUEST (= 1, high byte transmitted first) and ares_op$REPLY (= 2),and ares_hrd$Ethernet (= 1).Packet format:--------------To communicate mappings from <protocol, address> pairs to 48.bitEthernet addresses, a packet format that embodies the AddressResolution protocol is needed. The format of the packet follows. Ethernet transmission layer (not necessarily accessible to the user): 48.bit: Ethernet address of destination 48.bit: Ethernet address of sender 16.bit: Protocol type = ether_type$ADDRESS_RESOLUTION Ethernet packet data: 16.bit: (ar$hrd) Hardware address space (e.g., Ethernet, Packet Radio Net.) 16.bit: (ar$pro) Protocol address space. For Ethernet hardware, this is from the set of type fields ether_typ$<protocol>. 8.bit: (ar$hln) byte length of each hardware address 8.bit: (ar$pln) byte length of each protocol address 16.bit: (ar$op) opcode (ares_op$REQUEST | ares_op$REPLY) nbytes: (ar$sha) Hardware address of sender of this packet, n from the ar$hln field. mbytes: (ar$spa) Protocol address of sender of this packet, m from the ar$pln field. nbytes: (ar$tha) Hardware address of target of this packet (if known). mbytes: (ar$tpa) Protocol address of target.
Packet Generation:------------------As a packet is sent down through the network layers, routingdetermines the protocol address of the next hop for the packetand on which piece of hardware it expects to find the stationwith the immediate target protocol address. In the case of the10Mbit Ethernet, address resolution is needed and some lowerlayer (probably the hardware driver) must consult the AddressResolution module (perhaps implemented in the Ethernet supportmodule) to convert the <protocol type, target protocol address>pair to a 48.bit Ethernet address. The Address Resolution moduletries to find this pair in a table. If it finds the pair, itgives the corresponding 48.bit Ethernet address back to thecaller (hardware driver) which then transmits the packet. If itdoes not, it probably informs the caller that it is throwing thepacket away (on the assumption the packet will be retransmittedby a higher network layer), and generates an Ethernet packet witha type field of ether_type$ADDRESS_RESOLUTION. The AddressResolution module then sets the ar$hrd field toares_hrd$Ethernet, ar$pro to the protocol type that is beingresolved, ar$hln to 6 (the number of bytes in a 48.bit Ethernetaddress), ar$pln to the length of an address in that protocol,ar$op to ares_op$REQUEST, ar$sha with the 48.bit ethernet addressof itself, ar$spa with the protocol address of itself, and ar$tpawith the protocol address of the machine that is trying to beaccessed. It does not set ar$tha to anything in particular,because it is this value that it is trying to determine. Itcould set ar$tha to the broadcast address for the hardware (allones in the case of the 10Mbit Ethernet) if that makes itconvenient for some aspect of the implementation. It then causesthis packet to be broadcast to all stations on the Ethernet cableoriginally determined by the routing mechanism.
Packet Reception:-----------------When an address resolution packet is received, the receivingEthernet module gives the packet to the Address Resolution modulewhich goes through an algorithm similar to the following.Negative conditionals indicate an end of processing and adiscarding of the packet.?Do I have the hardware type in ar$hrd?Yes: (almost definitely) [optionally check the hardware length ar$hln] ?Do I speak the protocol in ar$pro? Yes: [optionally check the protocol length ar$pln] Merge_flag := false If the pair <protocol type, sender protocol address> is already in my translation table, update the sender hardware address field of the entry with the new information in the packet and set Merge_flag to true. ?Am I the target protocol address? Yes: If Merge_flag is false, add the triplet <protocol type, sender protocol address, sender hardware address> to the translation table. ?Is the opcode ares_op$REQUEST? (NOW look at the opcode!!) Yes: Swap hardware and protocol fields, putting the local hardware and protocol addresses in the sender fields. Set the ar$op field to ares_op$REPLY Send the packet to the (new) target hardware address on the same hardware on which the request was received.Notice that the <protocol type, sender protocol address, senderhardware address> triplet is merged into the table before theopcode is looked at. This is on the assumption that communcationis bidirectional; if A has some reason to talk to B, then B willprobably have some reason to talk to A. Notice also that if anentry already exists for the <protocol type, sender protocoladdress> pair, then the new hardware address supersedes the oldone. Related Issues gives some motivation for this.Generalization: The ar$hrd and ar$hln fields allow this protocoland packet format to be used for non-10Mbit Ethernets. For the10Mbit Ethernet <ar$hrd, ar$hln> takes on the value <1, 6>. Forother hardware networks, the ar$pro field may no longercorrespond to the Ethernet type field, but it should beassociated with the protocol whose address resolution is beingsought.
Why is it done this way??-------------------------Periodic broadcasting is definitely not desired. Imagine 100workstations on a single Ethernet, each broadcasting addressresolution information once per 10 minutes (as one possible setof parameters). This is one packet every 6 seconds. This isalmost reasonable, but what use is it? The workstations aren'tgenerally going to be talking to each other (and therefore have100 useless entries in a table); they will be mainly talking to amainframe, file server or bridge, but only to a small number ofother workstations (for interactive conversations, for example).The protocol described in this paper distributes information asit is needed, and only once (probably) per boot of a machine.This format does not allow for more than one resolution to bedone in the same packet. This is for simplicity. If things weremultiplexed the packet format would be considerably harder todigest, and much of the information could be gratuitous. Thinkof a bridge that talks four protocols telling a workstation allfour protocol addresses, three of which the workstation willprobably never use.This format allows the packet buffer to be reused if a reply isgenerated; a reply has the same length as a request, and severalof the fields are the same.The value of the hardware field (ar$hrd) is taken from a list forthis purpose. Currently the only defined value is for the 10MbitEthernet (ares_hrd$Ethernet = 1). There has been talk of usingthis protocol for Packet Radio Networks as well, and this willrequire another value as will other future hardware mediums thatwish to use this protocol.For the 10Mbit Ethernet, the value in the protocol field (ar$pro)is taken from the set ether_type$. This is a natural reuse ofthe assigned protocol types. Combining this with the opcode(ar$op) would effectively halve the number of protocols that canbe resolved under this protocol and would make a monitor/debuggermore complex (see Network Monitoring and Debugging below). It ishoped that we will never see 32768 protocols, but Murphy madesome laws which don't allow us to make this assumption.In theory, the length fields (ar$hln and ar$pln) are redundant,since the length of a protocol address should be determined bythe hardware type (found in ar$hrd) and the protocol type (foundin ar$pro). It is included for optional consistency checking,and for network monitoring and debugging (see below).The opcode is to determine if this is a request (which may causea reply) or a reply to a previous request. 16 bits for this isoverkill, but a flag (field) is needed.The sender hardware address and sender protocol address areabsolutely necessary. It is these fields that get put in atranslation table.
The target protocol address is necessary in the request form ofthe packet so that a machine can determine whether or not toenter the sender information in a table or to send a reply. Itis not necessarily needed in the reply form if one assumes areply is only provoked by a request. It is included forcompleteness, network monitoring, and to simplify the suggestedprocessing algorithm described above (which does not look at theopcode until AFTER putting the sender information in a table).The target hardware address is included for completeness andnetwork monitoring. It has no meaning in the request form, sinceit is this number that the machine is requesting. Its meaning inthe reply form is the address of the machine making the request.In some implementations (which do not get to look at the 14.byteethernet header, for example) this may save some registershuffling or stack space by sending this field to the hardwaredriver as the hardware destination address of the packet.There are no padding bytes between addresses. The packet datashould be viewed as a byte stream in which only 3 byte pairs aredefined to be words (ar$hrd, ar$pro and ar$op) which are sentmost significant byte first (Ethernet/PDP-10 byte style).
Network monitoring and debugging:---------------------------------The above Address Resolution protocol allows a machine to gainknowledge about the higher level protocol activity (e.g., CHAOS,Internet, PUP, DECnet) on an Ethernet cable. It can determinewhich Ethernet protocol type fields are in use (by value) and theprotocol addresses within each protocol type. In fact, it is notnecessary for the monitor to speak any of the higher levelprotocols involved. It goes something like this:When a monitor receives an Address Resolution packet, it alwaysenters the <protocol type, sender protocol address, senderhardware address> in a table. It can determine the length of thehardware and protocol address from the ar$hln and ar$pln fieldsof the packet. If the opcode is a REPLY the monitor can thenthrow the packet away. If the opcode is a REQUEST and the targetprotocol address matches the protocol address of the monitor, themonitor sends a REPLY as it normally would. The monitor willonly get one mapping this way, since the REPLY to the REQUESTwill be sent directly to the requesting host. The monitor couldtry sending its own REQUEST, but this could get two monitors intoa REQUEST sending loop, and care must be taken.Because the protocol and opcode are not combined into one field,the monitor does not need to know which request opcode isassociated with which reply opcode for the same higher levelprotocol. The length fields should also give enough informationto enable it to "parse" a protocol addresses, although it has noknowledge of what the protocol addresses mean.A working implementation of the Address Resolution protocol canalso be used to debug a non-working implementation. Presumably ahardware driver will successfully broadcast a packet with Ethernettype field of ether_type$ADDRESS_RESOLUTION. The format of thepacket may not be totally correct, because initialimplementations may have bugs, and table management may beslightly tricky. Because requests are broadcast a monitor willreceive the packet and can display it for debugging if desired.
An Example:-----------Let there exist machines X and Y that are on the same 10MbitEthernet cable. They have Ethernet address EA(X) and EA(Y) andDOD Internet addresses IPA(X) and IPA(Y) . Let the Ethernet typeof Internet be ET(IP). Machine X has just been started, andsooner or later wants to send an Internet packet to machine Y onthe same cable. X knows that it wants to send to IPA(Y) andtells the hardware driver (here an Ethernet driver) IPA(Y). Thedriver consults the Address Resolution module to convert <ET(IP),IPA(Y)> into a 48.bit Ethernet address, but because X was juststarted, it does not have this information. It throws theInternet packet away and instead creates an ADDRESS RESOLUTIONpacket with (ar$hrd) = ares_hrd$Ethernet (ar$pro) = ET(IP) (ar$hln) = length(EA(X)) (ar$pln) = length(IPA(X)) (ar$op) = ares_op$REQUEST (ar$sha) = EA(X) (ar$spa) = IPA(X) (ar$tha) = don't care (ar$tpa) = IPA(Y)and broadcasts this packet to everybody on the cable.Machine Y gets this packet, and determines that it understandsthe hardware type (Ethernet), that it speaks the indicatedprotocol (Internet) and that the packet is for it((ar$tpa)=IPA(Y)). It enters (probably replacing any existingentry) the information that <ET(IP), IPA(X)> maps to EA(X). Itthen notices that it is a request, so it swaps fields, puttingEA(Y) in the new sender Ethernet address field (ar$sha), sets theopcode to reply, and sends the packet directly (not broadcast) toEA(X). At this point Y knows how to send to X, but X stilldoesn't know how to send to Y.Machine X gets the reply packet from Y, forms the map from<ET(IP), IPA(Y)> to EA(Y), notices the packet is a reply andthrows it away. The next time X's Internet module tries to senda packet to Y on the Ethernet, the translation will succeed, andthe packet will (hopefully) arrive. If Y's Internet module thenwants to talk to X, this will also succeed since Y has rememberedthe information from X's request for Address Resolution.
Related issue:---------------It may be desirable to have table aging and/or timeouts. Theimplementation of these is outside the scope of this protocol.Here is a more detailed description (thanks to MOON@SCRC@MIT-MC).If a host moves, any connections initiated by that host willwork, assuming its own address resolution table is cleared whenit moves. However, connections initiated to it by other hostswill have no particular reason to know to discard their oldaddress. However, 48.bit Ethernet addresses are supposed to beunique and fixed for all time, so they shouldn't change. A hostcould "move" if a host name (and address in some other protocol)were reassigned to a different physical piece of hardware. Also,as we know from experience, there is always the danger ofincorrect routing information accidentally getting transmittedthrough hardware or software error; it should not be allowed topersist forever. Perhaps failure to initiate a connection shouldinform the Address Resolution module to delete the information onthe basis that the host is not reachable, possibly because it isdown or the old translation is no longer valid. Or perhapsreceiving of a packet from a host should reset a timeout in theaddress resolution entry used for transmitting packets to thathost; if no packets are received from a host for a suitablelength of time, the address resolution entry is forgotten. Thismay cause extra overhead to scan the table for each incomingpacket. Perhaps a hash or index can make this faster.The suggested algorithm for receiving address resolution packetstries to lessen the time it takes for recovery if a host doesmove. Recall that if the <protocol type, sender protocoladdress> is already in the translation table, then the senderhardware address supersedes the existing entry. Therefore, on aperfect Ethernet where a broadcast REQUEST reaches all stationson the cable, each station will be get the new hardware address.Another alternative is to have a daemon perform the timeouts.After a suitable time, the daemon considers removing an entry.It first sends (with a small number of retransmissions if needed)an address resolution packet with opcode REQUEST directly to theEthernet address in the table. If a REPLY is not seen in a shortamount of time, the entry is deleted. The request is sentdirectly so as not to bother every station on the Ethernet. Justforgetting entries will likely cause useful information to beforgotten, which must be regained.Since hosts don't transmit information about anyone other thanthemselves, rebooting a host will cause its address mapping tableto be up to date. Bad information can't persist forever by beingpassed around from machine to machine; the only bad informationthat can exist is in a machine that doesn't know that some othermachine has changed its 48.bit Ethernet address. Perhapsmanually resetting (or clearing) the address mapping table willsuffice.This issue clearly needs more thought if it is believed to beimportant. It is caused by any address resolution-like protocol.
[8]ページ先頭