Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Address Resolution Protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Packet structure== The Address Resolution Protocol uses a simple message format containing one address resolution request or response. The packets are carried at the [[data link layer]] of the underlying network as raw payload. In the case of Ethernet, a {{mono|0x0806}} [[EtherType]] value is used to identify ARP frames. The size of the ARP message depends on the link layer and network layer address sizes. The message [[Header (computing)|header]] 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. {{APHD|start|title=Internet Protocol (IPv4) over Ethernet ARP packet}} {{APHD|0|bits1=16|field1=Hardware Type|value1={{Mono|1}}|hint1=A value of 1 indicates Ethernet.|bits2=16|field2=Protocol Type|hint2=0x800 indicates IPv4|value2={{Mono|0x0800}}}} {{APHD|4|bits1=8|field1=Hardware Length|value1={{Mono|6}}|bits2=8|field2=Protocol Length|value2={{Mono|4}}|bits3=16|field3=Operation}} {{APHD|8|bits1=32|border1=bottom|field1=Sender Hardware Address}} {{APHD|12|bits1=16|border1=top|field1={{Nbsp}}|bits2=16|border2=right|field2=Sender Protocol Address}} {{APHD|16|bits1=16|border1=left|field1=Sender Protocol Address (cont.)|bits2=16|border2=bottom|field2=Target Hardware Address}} {{APHD|20|bits1=32|border1=top|field1={{Nbsp}}}} {{APHD|24|bits1=32|field1=Target Protocol Address}} {{APHD|end}} ;{{APHD|def|name=Hardware Type|short=HTYPE|length=16 bits|text=This field specifies the network link protocol type.<ref name="IANA">{{Cite web|url=https://www.iana.org/assignments/arp-parameters/arp-parameters.xhtml|title=Address Resolution Protocol (ARP) Parameters|website=www.iana.org|access-date=2018-10-16}}</ref> In this example, a value of {{Mono|1}} indicates [[Ethernet]].}} ;{{APHD|def|name=Protocol Type|short=PTYPE|length=16 bits|text=This field specifies the internetwork protocol for which the ARP request is intended. For IPv4, this has the value {{mono|0x0800}}. The permitted PTYPE values share a numbering space with those for [[EtherType]].<ref name="IANA" />{{Ref RFC|9542}}}} ;{{APHD|def|name=Hardware Length|short=HLEN|length=8 bits|text=Length (in [[octet (computing)|octet]]s) of a hardware address. For Ethernet, the address length is {{Mono|6}}.}} ;{{APHD|def|name=Protocol Length|short=PLEN|length=8 bits|text=Length (in octets) of internetwork addresses. The internetwork protocol is specified in PTYPE. In this example: IPv4 address length is {{Mono|4}}.}} ;{{APHD|def|name=Operation|short=OPER|length=16 bits|text=Specifies the operation that the sender is performing: 1 for request, 2 for reply.}} ;{{APHD|def|name=Sender Hardware Address|short=SHA|length=48 bits|text=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.}} ;{{APHD|def|name=Sender protocol address|short=SPA|length=32 bits|text=Internetwork address of the sender.}} ;{{APHD|def|name=Target hardware address|short=THA|length=48 bits|text=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.}} ;{{APHD|def|name=Target protocol address|short=TPA|length=32 bits|text=Internetwork address of the intended receiver.}} ARP parameter values have been standardized and are maintained by the [[Internet Assigned Numbers Authority]] (IANA).<ref name="IANA" /> The [[EtherType]] for ARP is {{mono|0x0806}}. 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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)