Address Resolution Protocol - Packet Structure

Packet Structure

The Address Resolution Protocol uses a simple message format that contains one address resolution request or response. The size of the ARP message depends on the upper layer and lower layer address sizes, which are given by the type of networking protocol (usually IPv4) in use and the type of hardware or virtual link layer that the upper layer protocol is running on. The message header specifies these types, 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). Thus, the ARP packet size in this case is 28 bytes. The EtherType for ARP is 0x0806.

Internet Protocol (IPv4) over Ethernet ARP packet
bit offset 0 – 7 8 – 15
0 Hardware type (HTYPE)
16 Protocol type (PTYPE)
32 Hardware address length (HLEN) Protocol address length (PLEN)
48 Operation (OPER)
64 Sender hardware address (SHA) (first 16 bits)
80 (next 16 bits)
96 (last 16 bits)
112 Sender protocol address (SPA) (first 16 bits)
128 (last 16 bits)
144 Target hardware address (THA) (first 16 bits)
160 (next 16 bits)
176 (last 16 bits)
192 Target protocol address (TPA) (first 16 bits)
208 (last 16 bits)
Hardware type (HTYPE)
This field specifies the network protocol type. Example: Ethernet is 1.
Protocol type (PTYPE)
This field specifies the internetwork protocol for which the ARP request is intended. For IPv4, this has the value 0x0800. The permitted PTYPE values share a numbering space with those for EtherType.
Hardware length (HLEN)
Length (in octets) of a hardware address. Ethernet addresses size is 6.
Protocol length (PLEN)
Length (in octets) of addresses used in the upper layer protocol. (The upper layer protocol specified in PTYPE.) IPv4 address size is 4.
Operation
Specifies the operation that the sender is performing: 1 for request, 2 for reply.
Sender hardware address (SHA)
media address of the sender.
Sender protocol address (SPA)
internetwork address of the sender.
Target hardware address (THA)
media address of the intended receiver. This field is ignored in requests.
Target protocol address (TPA)
internetwork address of the intended receiver.

ARP protocol parameter values have been standardized and are maintained by the Internet Assigned Numbers Authority (IANA).

Read more about this topic:  Address Resolution Protocol

Famous quotes containing the words packet and/or structure:

    There are some circles in America where it seems to be more socially acceptable to carry a hand-gun than a packet of cigarettes.
    Katharine Whitehorn (b. 1926)

    What is the structure of government that will best guard against the precipitate counsels and factious combinations for unjust purposes, without a sacrifice of the fundamental principle of republicanism?
    James Madison (1751–1836)