The Address Resolution Protocol (ARP) is a fundamental networking mechanism that translates an IP address into a physical MAC address, allowing devices on the same local network segment to communicate. By bridging the gap between the logical network layer (Layer 3) and the data‑link layer (Layer 2), ARP ensures that packets are correctly addressed for delivery over Ethernet, Wi‑Fi, or any other link‑layer technology.
Why ARP Is Needed
Every network interface on a local area network (LAN) has a unique hardware address, commonly called a MAC address. Even so, when a host wants to send a packet to another host using its IP address, the underlying hardware must know the corresponding MAC address. Without a method to discover this mapping, the sender would be unable to construct a proper Ethernet frame, and the packet would never reach its destination. ARP provides this discovery service dynamically, eliminating the need for manual configuration of MAC‑to‑IP bindings on every device And that's really what it comes down to..
How ARP Works
ARP operates through a simple request‑reply exchange. The process can be broken down into the following steps:
- ARP Request – When a host needs the MAC address associated with a target IP, it broadcasts an ARP request packet to all devices on the same subnet. The request contains the sender’s IP and MAC address, the target IP, and a flag indicating that it is a query.
- ARP Reply – The device that owns the requested IP address recognizes its own IP in the packet and responds with a unicast ARP reply. This reply includes the target’s MAC address.
- Caching – Upon receiving the reply, the requesting host stores the IP‑to‑MAC mapping in its ARP cache. Subsequent packets to the same IP can use this cached entry, avoiding repeated broadcasts.
ARP Request Details
- Sender Protocol Address – IP address of the requesting host.
- Sender Hardware Address – MAC address of the requesting host.
- Target Protocol Address – IP address being queried.
- Target Hardware Address – Left blank in the request; filled in the reply.
ARP Reply Details
- The reply mirrors the request but sets the Target Hardware Address to the actual MAC address of the responding device.
- The reply is sent directly to the requester (unicast), not broadcast.
ARP Cache Management
- Dynamic Entries – Learned from ARP replies; they expire after a configurable timeout (often 10–15 minutes) to adapt to changes in network topology.
- Static Entries – Manually configured; they persist indefinitely and are useful for critical devices such as routers or servers.
ARP Packet Format
An ARP packet is encapsulated within an Ethernet frame and follows a fixed structure:
| Field | Size (bytes) | Description |
|---|---|---|
| Hardware Type | 2 | e.g., 1 for Ethernet |
| Protocol Type | 2 | e.g. |
Types of ARP
- Dynamic ARP – Automatically learns mappings via request/reply exchanges. Most common in typical networks.
- Static ARP – Manually entered entries; used when predictable mappings are required or when security concerns demand fixed bindings.
- Reverse ARP (RARP) – Obsolete; allows a diskless workstation to request its own IP address from a server. Replaced by DHCP.
- Proxy ARP – A router answers ARP requests on behalf of hosts in a different subnet, enabling transparent routing across a single broadcast domain.
ARP and IPv6
IPv6 does not use ARP. In real terms, instead, it employs the Neighbor Discovery Protocol (NDP), which incorporates functions analogous to ARP but also includes address auto‑configuration, router discovery, and duplicate address detection. NDP messages (Neighbor Solicitation, Neighbor Advertisement) replace ARP request/reply in IPv6 networks Easy to understand, harder to ignore..
Security Considerations
ARP is inherently trust‑based, making it vulnerable to several attacks:
- ARP Spoofing – An attacker sends falsified ARP replies