Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Address Resolution Protocol

From Wikipedia, the free encyclopedia
Associates addresses in the layers of a networked device implementation
Internet protocol suite
Application layer
Transport layer
Internet layer
Link layer

TheAddress Resolution Protocol (ARP) is acommunication protocol for discovering thelink layer address, such as aMAC address, associated with aninternet layer address, typically anIPv4 address. The protocol, part of theInternet protocol suite, was defined in 1982 byRFC 826, which isInternet Standard STD 37.

ARP enables a host to send, for example, an IPv4 packet to another node in the local network by providing a protocol to get the MAC address associated with an IP address. The host broadcasts a request containing the target node's IP address, and the node with that IP address replies with its MAC address.

ARP has been implemented with many combinations of network and data link layer technologies, such asIPv4,Chaosnet,DECnet and XeroxPARC Universal Packet (PUP) usingIEEE 802 standards,FDDI,X.25,Frame Relay andAsynchronous Transfer Mode (ATM).

InInternet Protocol Version 6 (IPv6) networks, the functionality of ARP is provided by theNeighbor Discovery Protocol (NDP).

Operating scope

[edit]

The Address Resolution Protocol is arequest–response protocol. Its messages are directly encapsulated by a link layer protocol. It is communicated within the boundaries of a singlesubnetwork and is neverrouted.

Packet structure

[edit]

The Address Resolution Protocol uses a simple message format containing one address resolution request or response. The packets are carried at thedata link layer of the underlying network as raw payload. In the case of Ethernet, a0x0806EtherType value is used to identify ARP frames.

The size of the ARP message depends on the link layer and network layer address sizes. The messageheader specifies the types of network in use at each layer as well as the size of addresses of each. The message header is completed with the operation code for request (1) and reply (2). The payload of the packet consists of four addresses, the hardware and protocol address of the sender and receiver hosts.

The principal packet structure of ARP packets is shown in the following table which illustrates the case of IPv4 networks running on Ethernet. In this scenario, the packet has 48-bit fields for the sender hardware address (SHA) and target hardware address (THA), and 32-bit fields for the corresponding sender and target protocol addresses (SPA and TPA). The ARP packet size in this case is 28 bytes.

ARP packet for resolving an Internet Protocol version 4 address over Ethernet
OffsetOctet0123
OctetBit012345678910111213141516171819202122232425262728293031
00Hardware Type (1)Protocol Type (0x0800)
432Hardware Length (6)Protocol Length (4)Operation
864Sender Hardware Address
1296 Sender Protocol Address
16128Sender Protocol Address (cont.)Target Hardware Address
20160 
24192Target Protocol Address
Hardware Type (HTYPE): 16 bits
This field specifies the network link protocol type.[1] In this example, a value of1 indicatesEthernet.
Protocol Type (PTYPE): 16 bits
This field specifies the internetwork protocol for which the ARP request is intended. For IPv4, this has the value0x0800. The permitted PTYPE values share a numbering space with those forEtherType.[1][2]
Hardware Length (HLEN): 8 bits
Length (inoctets) of a hardware address. For Ethernet, the address length is6.
Protocol Length (PLEN): 8 bits
Length (in octets) of internetwork addresses. The internetwork protocol is specified in PTYPE. In this example: IPv4 address length is4.
Operation (OPER): 16 bits
Specifies the operation that the sender is performing: 1 for request, 2 for reply.
Sender Hardware Address (SHA): 48 bits
Media address of the sender. In an ARP request this field is used to indicate the address of the host sending the request. In an ARP reply this field is used to indicate the address of the host that the request was looking for.
Sender protocol address (SPA): 32 bits
Internetwork address of the sender.
Target hardware address (THA): 48 bits
Media address of the intended receiver. In an ARP request this field is ignored. In an ARP reply this field is used to indicate the address of the host that originated the ARP request.
Target protocol address (TPA): 32 bits
Internetwork address of the intended receiver.

ARP parameter values have been standardized and are maintained by theInternet Assigned Numbers Authority (IANA).[1]

TheEtherType for ARP is0x0806. This appears in the Ethernet frame header when the payload is an ARP packet and is not to be confused with PTYPE, which appears within this encapsulated ARP packet.

Layering

[edit]

ARP's placement within theInternet protocol suite and theOSI model may be a matter of confusion or even of dispute.RFC 826 places it into thelink layer and characterizes it as a tool to inquire about the "higher level layer", such as the Internet layer.[3]RFC 1122 also discusses ARP in its link layer section.[4]Richard Stevens places ARP in OSI's data link layer[5] while newer editions associate it with the network layer or introduce an intermediate OSI layer 2.5.[6]

Example

[edit]

Two computers,A andB, are connected to the samelocal area network with no interveninggateway orrouter.A has a packet to send to IP address192.168.0.55 which happens to be the address ofB.

Before sending the packet toB,A broadcasts an ARP request message – addressed with the broadcast MAC addressFF:FF:FF:FF:FF:FF and requesting response from the node with IP address192.168.0.55. All nodes of the network receive the message, but onlyB replies since it has the requested IP address.B responds with an ARP response message containing its MAC addresses whichA receives.A sends the data packet on the link addressed withB's MAC address.

Typically, a network node maintains alookup cache that associates IP and MAC addressees. In this example, ifA had the lookup cached, then it would not need to broadcast the ARP request. Also, whenB received the request, it could cache the lookup toA so that ifB needs to send a packet toA later, it does not need to use ARP to lookup its MAC address. Finally, whenA receives the ARP response, it can cache the lookup for future messages addressed to the same IP address.[7]

ARP probe

[edit]

AnARP probe in IPv4 is an ARP request constructed with the SHA of the probing host, an SPA of all 0s, a THA of all 0s, and a TPA set to the IPv4 address being probed for. If some host on the network regards the IPv4 address (in the TPA) as its own, it will reply to the probe (via the SHA of the probing host) thus informing the probing host of the address conflict. If instead there is no host which regards the IPv4 address as its own, then there will be no reply. When several such probes have been sent, with slight delays, and none receive replies, it can reasonably be expected that no conflict exists. As the original probe packet contains neither a valid SHA/SPA nor a valid THA/TPA pair, there is no risk of any host using the packet to update its cache with problematic data. Before beginning to use an IPv4 address (whether received from manual configuration, DHCP, or some other means), a host implementing this specification must test to see if the address is already in use, by broadcasting ARP probe packets.[8][9]

ARP announcements

[edit]

ARP may also be used as a simple announcement protocol. This is useful for updating other hosts' mappings of a hardware address when the sender's IP address or MAC address changes. Such an announcement, also called agratuitous ARP (GARP) message, is usually broadcast as anARP request containing the SPA in the target field (TPA=SPA), with THA set to zero. An alternative way is to broadcast anARP reply with the sender's SHA and SPA duplicated in the target fields (TPA=SPA, THA=SHA).

TheARP request andARP reply announcements are both standards-based methods,[10]: §4.6  but theARP request method is preferred.[11]: §3  Some devices may be configured for the use of either of these two types of announcements.[12]

An ARP announcement is not intended to solicit a reply; instead, it updates any cached entries in the ARP tables of other hosts that receive the packet. The operation code in the announcement may be either request or reply; the ARP standard specifies that the opcode is only processed after the ARP table has been updated from the address fields.[13][10]: §4.6 [14]: §4.4.1 

Many operating systems issue an ARP announcement during startup. This helps to resolve problems that would otherwise occur if, for example, anetwork card was recently changed (changing the IP-address-to-MAC-address mapping) and other hosts still have the old mapping in their ARP caches.

ARP announcements are also used by some network interfaces to provide load balancing for incoming traffic. In ateam of network cards, it is used to announce a different MAC address within the team that should receive incoming packets.

ARP announcements can be used in theZeroconf protocol to allow automatic assignment of alink-local address to an interface where no other IP address configuration is available. The announcements are used to ensure an address chosen by a host is not in use by other hosts on the network link.[15]

This function can be dangerous from a cybersecurity viewpoint since an attacker can obtain information about the other hosts of its subnet to save in their ARP cache (ARP spoofing) an entry where the attacker MAC is associated, for instance, to the IP of thedefault gateway, thus allowing them tointercept all the traffic to external networks.

ARP mediation

[edit]

ARP mediation refers to the process of resolving layer-2 addresses through avirtual private wire service (VPWS) when different resolution protocols are used on the connected circuits, e.g.,Ethernet on one end andFrame Relay on the other. InIPv4, eachprovider edge (PE) device discovers the IP address of the locally attachedcustomer edge (CE) device and distributes that IP address to the corresponding remote PE device. Then each PE device responds to local ARP requests using the IP address of the remote CE device and the hardware address of the local PE device. InIPv6, each PE device discovers the IP address of both local and remote CE devices and then intercepts localNeighbor Discovery (ND) andInverse Neighbor Discovery (IND) packets and forwards them to the remote PE device.[16]

Inverse ARP and Reverse ARP

[edit]

Inverse Address Resolution Protocol (Inverse ARP orInARP) is used to obtainnetwork layer addresses (for example,IP addresses) of other nodes fromdata link layer (Layer 2) addresses. Since ARP translates layer-3 addresses to layer-2 addresses, InARP may be described as its inverse. In addition, InARP is implemented as a protocol extension to ARP: it uses the same packet format as ARP, but different operation codes.

InARP is primarily used inFrame Relay (DLCI) and ATM networks, in which layer-2 addresses ofvirtual circuits are sometimes obtained from layer-2 signaling, and the corresponding layer-3 addresses must be available before those virtual circuits can be used.[17]

TheReverse Address Resolution Protocol (Reverse ARP or RARP), like InARP, translates layer-2 addresses to layer-3 addresses. However, in InARP the requesting station queries the layer-3 address of another node, whereas RARP is used to obtain the layer-3 address of the requesting station itself for address configuration purposes. RARP is obsolete; it was replaced byBOOTP, which was later superseded by theDynamic Host Configuration Protocol (DHCP).[18]

ARP spoofing and proxy ARP

[edit]
Main articles:ARP spoofing andProxy ARP
A successfulARP spoofing attack allows an attacker to perform aman-in-the-middle attack.

Because ARP does not provide methods for authenticating ARP replies on a network, ARP replies can come from systems other than the one with the required Layer 2 address. An ARPproxy is a system that answers the ARP request on behalf of another system for which it will forward traffic, normally as a part of the network's design, such as for a dialup internet service. By contrast, in ARPspoofing the answering system, orspoofer, replies to a request for another system's address with the aim of intercepting data bound for that system. A malicious user may use ARP spoofing to perform aman-in-the-middle ordenial-of-service attack on other users on the network. Various software exists to both detect and perform ARP spoofing attacks, though ARP itself does not provide any methods of protection from such attacks.[19]

Alternatives

[edit]

Computers may maintain lists of known addresses, rather than using an active protocol. In this method, each computer maintains a database of the mapping ofLayer 3 addresses (e.g.,IP addresses) toLayer 2 addresses (e.g.,EthernetMAC addresses). This data is maintained primarily by interpreting ARP packets from the local network link. Thus, it is often called theARP cache. Since at least the 1980s,[20] networked computers have a utility calledarp for interrogating or manipulating this database.[21][22][23]

Historically, other methods were used to maintain the mapping between addresses, such as static configuration files,[24] or centrally maintained lists.

ARP stuffing

[edit]

Embedded systems such as networked cameras[25] and networked power distribution devices,[26] which lack a user interface, can use so-calledARP stuffing to make an initial network connection, although this is a misnomer, as ARP is not involved.

ARP stuffing is accomplished as follows:

  1. The user's computer has an IP addressstuffed manually into its address table (normally with thearp command with the MAC address taken from a label on the device)
  2. The computer sends special packets to the device, typically aping packet with a non-default size.
  3. The device then adopts this IP address
  4. The user then communicates with it bytelnet orweb protocols to complete the configuration.

Such devices typically have a method to disable this process once the device is operating normally, as the capability can make it vulnerable to attack.

Standards documents

[edit]
  • RFC 826  – "An Ethernet Address Resolution Protocol,"Internet Standard 37.
  • RFC 903  – "A Reverse Address Resolution Protocol,"Internet Standard 38.
  • RFC 2390 – "Inverse Address Resolution Protocol,"Draft Standard.
  • RFC 5227 – "IPv4 Address Conflict Detection,"Proposed Standard.

See also

[edit]
  • Arping – Software utility for discovering and probing hosts on a computer network
  • Arptables – Network administrator's tool
  • Arpwatch – Computer networking software tool
  • Bonjour Sleep Proxy – Open source component of zero configuration networking
  • Cisco HDLC – Extension to the High-Level Data Link Control (HDLC) network protocol
  • Neighbor Discovery Protocol – Protocol in the Internet protocol suite used with IPv6

References

[edit]
  1. ^abc"Address Resolution Protocol (ARP) Parameters".www.iana.org. Retrieved2018-10-16.
  2. ^D. Eastlake, 3rd; J. Abley; Y. Li (April 2024).IANA Considerations and IETF Protocol and Documentation Usage for IEEE 802 Parameters.Internet Engineering Task Force.doi:10.17487/RFC9542.ISSN 2070-1721. BCP 141. RFC9542.Best Current Practice 141. ObsoletesRFC 7042.
  3. ^David C. Plummer (November 1982).An Ethernet Address Resolution Protocol. Network Working Group.doi:10.17487/RFC0826. STD 37. RFC826.Internet Standard 37. sec. Network monitoring and debugging. Updated byRFC 5227 and5494.
  4. ^R. Braden, ed. (October 1989).Requirements for Internet Hosts -- Communication Layers. Network Working Group.doi:10.17487/RFC1122. STD 3. RFC1122.Internet Standard 3. Updated byRFC 1349,4379,5884,6093,6298,6633,6864,8029 and9293.
  5. ^W. Richard Stevens,TCP/IP Illustrated, Volume 1: The Protocols, Addison Wesley, 1994, ISBN 0-201-63346-9.
  6. ^W. Richard Stevens,TCP/IP Illustrated, Volume 1: The Protocols, Addison Wesley, 2011, ISBN 0-321-33631-3, page 14
  7. ^Chappell, Laura A.; Tittel, Ed (2007).Guide to TCP/IP (Third ed.). Thomson Course Technology. pp. 115–116.ISBN 9781418837556.
  8. ^S. Cheshire (July 2008).IPv4 Address Conflict Detection. Network Working Group.doi:10.17487/RFC5227.RFC5227.Proposed Standard. UpdatesRFC 826.
  9. ^Harmoush, Ed."ARP Probe and ARP Announcement".Practical Networking. PracticalNetworking .net. Retrieved3 August 2022.
  10. ^abC. Perkins, ed. (November 2010).IP Mobility Support for IPv4, Revised.Internet Engineering Task Force.doi:10.17487/RFC5944.ISSN 2070-1721.RFC5944.Proposed Standard. ObsoletesRFC 3344.
  11. ^S. Cheshire (July 2008).IPv4 Address Conflict Detection. Network Working Group.doi:10.17487/RFC5227.RFC5227.Proposed Standard. UpdatesRFC 826.Why Are ARP Announcements Performed Using ARP Request Packets and Not ARP Reply Packets?
  12. ^"FAQ: The Firewall Does not Update the Address Resolution Protocol Table".Citrix. 2015-01-16.[...] garpReply enabled [...] generates ARP packets that [...] are of OPCODE type REPLY, rather than REQUEST.
  13. ^"Gratuitous ARP in DHCP vs. IPv4 ACD Draft". Archived fromthe original on October 12, 2007.
  14. ^R. Droms (March 1997).Dynamic Host Configuration Protocol.IETF Network Working Group.doi:10.17487/RFC2131.RFC2131.Draft Standard. ObsoletesRFC 1541. Updated byRFC 3396,4361,5494 and6842.
  15. ^S. Cheshire; B. Aboba; E. Guttman (May 2005).Dynamic Configuration of IPv4 Link-Local Addresses. Network Working Group.doi:10.17487/RFC3927.RFC3927.Proposed Standard.
  16. ^Shah, H.; et al. (June 2012).Address Resolution Protocol (ARP) Mediation for IP Interworking of Layer 2 VPNs. Internet Engineering Task Force.doi:10.17487/RFC6575.RFC6575.
  17. ^T. Bradley; C. Brown; A. Malis (September 1998).Inverse Address Resolution Protocol. Network Working Group.doi:10.17487/RFC2390.RFC2390.Draft Standard. ObsoletesRFC 1293.
  18. ^R. Finlayson; T. Mann; J. Mogul; M. Theimer (June 1984).A Reverse Address Resolution Protocol. Network Working Group.doi:10.17487/RFC0903. STD 38. RFC903.Internet Standard 38.
  19. ^Steve Gibson (2005-12-11)."ARP Cache Poisoning".GRC.
  20. ^University of California, Berkeley."BSD manual page for arp(8C) command". Retrieved2011-09-28.
  21. ^Canonical."Ubuntu manual page for arp(8) command". Archived fromthe original on 2012-03-16. Retrieved2011-09-28.
  22. ^Apple Computer."Mac OS X manual page for arp(8) command". Retrieved2011-09-28.
  23. ^Microsoft."Windows help for arp command". Retrieved2011-09-28.
  24. ^Sun Microsystems."SunOS manual page for ethers(5) file". Retrieved2011-09-28.
  25. ^Axis Communication."Axis P13 Network Camera Series Installation Guide"(PDF). Retrieved2011-09-28.
  26. ^American Power Corporation."Switched Rack Power Distribution Unit Installation and Quick Start Manual"(PDF). Archived fromthe original(PDF) on 2011-11-25. Retrieved2011-09-28.

External links

[edit]
Wikiversity has learning resources about Address Resolution Protocol
Networking protocols
Data formats
April Fools' Day RFC
Retrieved from "https://en.wikipedia.org/w/index.php?title=Address_Resolution_Protocol&oldid=1334472397"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp