The Address Resolution Protocol (ARP) serves as the critical bridge between the logical, network-layer addressing scheme and the physical, data-link-layer addressing scheme. Without a mechanism to map dynamic logical IP addresses to fixed physical media access control (MAC) addresses, local hardware interfaces could not encapsulate and deliver network-layer packets.
In any computer network utilizing the TCP/IP protocol suite, the delivery of packets to a host or a router relies on two distinct levels of addressing: logical addressing (IP addresses) and physical addressing (MAC addresses).
To send an IP datagram, a host or a router must encapsulate it into a physical frame. Consequently, the sending device must map the destination's logical address into its corresponding physical address.
+-------------------+ +-------------------+
| Logical Address | ======= ARP ======> | Physical Address |
| (e.g., IPv4 IP) | | (e.g., MAC) |
+-------------------+ +-------------------+This translation can be implemented in two ways:
ARP operates on the boundary between the network layer (Layer 3) and the data link layer (Layer 2). While it is technically classified as a network-layer helper protocol, it works directly with the data link layer to prepare packets for physical transmission.
TCP/IP Protocol Suite Layering:
+-----------------------------------------+
| Network Layer (IP) |
+--------------------+--------------------+
|
+------+------+
| ARP |
+------+------+
|
+--------------------+--------------------+
| Data Link Layer |
+-----------------------------------------+When an IP datagram is ready to be sent:
The standard ARP packet format is highly structured and designed to accommodate various network-layer and link-layer protocols. The typical packet size is bytes when resolving an IPv4 address to a standard Ethernet MAC address.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Hardware Type | Protocol Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HW Addr Len | Proto Addr | Operation |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sender MAC |
| +-------------------------------+
| | Sender IP |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Target MAC |
| +-------------------------------+
| | Target IP |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+To transmit an ARP packet over the physical medium, it must be encapsulated directly within a link-layer frame (such as an Ethernet II frame).
+------------------+------------------+---------------+-------------+-----+
| Destination MAC | Source MAC | EtherType | ARP Payload | CRC |
| (6 bytes) | (6 bytes) | (2 bytes) | (28 bytes) | (4) |
+------------------+------------------+---------------+-------------+-----+
|
Value: 0x0806When a host needs to resolve a MAC address, it executes a precise, step-by-step query-response cycle.
Host A (192.168.1.10) Host B (192.168.1.20)
| |
|--- Broadcast ARP Request -------------------------->|
| "Who has 192.168.1.20? Tell 192.168.1.10" |
| (Dest MAC: FF:FF:FF:FF:FF:FF) |
| |
|<-- Unicast ARP Reply -------------------------------|
| "I have 192.168.1.20, my MAC is B" |
| (Dest MAC: Host A's MAC) |
| |The source host searches its internal lookup cache to see if it already has a valid mapping for the target IP. If a match is found, the MAC address is used immediately to frame the packet.
If a cache miss occurs, the source constructs an ARP Request packet:
Every host on the local segment receives the frame, strips the Ethernet header, and inspects the ARP payload.
The target host sets the Operation field of the reply packet to , populates its own physical address in the Sender Hardware Address (SHA) field, and places the original requester's physical address in the Target Hardware Address (THA) field.
The frame is encapsulated with the original requester's MAC address as the Destination MAC and sent as a targeted unicast frame.
ARP is utilized in four distinct network scenarios, determined by whether the sender and receiver are hosts or routers, and whether they reside on the same network segment.
+--------------+
| Internet/ |
| WAN Router |
+-------+------+
|
===================+=================== Local Gateway (Router R1)
|
+------------+------------+
| |
+---+----+ +---+----+
| Host A | | Host B |
+--------+ +--------+Several operational mechanisms are required to ensure ARP scales efficiently and reliably across larger networks.
To minimize broadcast traffic, every network device maintains an ARP Cache.
Proxy ARP is a technique where a router responds to an ARP request on behalf of a target host that is not on the same physical network segment.
Local Broadcast Domain Remote Subnet
+---------------------------+ +------------------+
| Host A === ARP Request ==> | Host B |
| (For Host B) | | (192.168.2.50) |
| | | |
| [Router R1] | | |
| (Proxy Reply) <==============================|
+---------------------------+ +------------------+The process of translating a logical network layer address (IPv4) into a physical data link layer address (MAC address) to facilitate frame delivery over a physical medium.
A broadcast message sent by a host to query the physical address of a target device with a known logical IP address.
A unicast message sent by the target host containing its physical MAC address, directed back to the original requestor.
A dynamic local table maintained by hosts and routers to temporarily store IP-to-MAC address mappings, reducing network broadcast overhead.
An operational variation where a router responds to an ARP request on behalf of another host located on a different network segment.
Test your understanding with 5 questions
Why does an ARP request use a broadcast physical destination address, while an ARP reply uses a unicast physical destination address?
In the standard 28-byte ARP packet for IPv4 over Ethernet, what value is stored in the Protocol Type field?
A host with IP address 192.168.1.10 needs to send an IP datagram to a remote destination at 8.8.8.8. The local gateway router has the IP address 192.168.1.1. Which target IP address will the host place in its ARP request?
What is the primary vulnerability of ARP that allows attacks such as 'ARP Spoofing' or 'ARP Poisoning'?
If an Ethernet frame carries an ARP packet, what value is written into the Type/Length field of the Ethernet Frame header?
6 Modules
6 Modules