Back to course

The Role of ARP (Address Resolution Protocol)

Networking Fundamentals: The 0 to Hero Guide

Lesson 27: The Role of ARP (Address Resolution Protocol)

We know that Layer 3 (IP) uses IP addresses to route packets and Layer 2 (Data Link) uses MAC addresses to deliver frames locally. But how does a device know the MAC address associated with a specific IP address on its own network?

ARP: Mapping Logic to Physical

Address Resolution Protocol (ARP) is the mechanism used to map a known Layer 3 IP address to its corresponding Layer 2 MAC address.

How ARP Works (The Broadcast and Reply)

Suppose Host A (IP 192.168.1.10) wants to send a packet to Host B (IP 192.168.1.20) on the same LAN:

  1. ARP Request (Broadcast): Host A first checks its internal ARP cache (a temporary table of mappings). If the MAC address for 192.168.1.20 is not found, Host A sends an ARP Request broadcast to every device on the LAN: "Who has IP 192.168.1.20? Tell 192.168.1.10."
  2. ARP Reply (Unicast): Only Host B recognizes its own IP address. Host B replies directly (unicast) to Host A with its MAC address.
  3. Cache Update: Host A receives the reply, updates its ARP cache, and can now successfully encapsulate the IP packet into an Ethernet frame destined for Host B's MAC address.

Key Concept: ARP requests are broadcasts (sent to everyone), but ARP replies are unicasts (sent directly back to the requester).