ARP Protocol

ARP (Address Resolution Protocol) resolves a known IP address to its MAC address on a local network, since local delivery uses physical hardware addresses. A device broadcasts a request asking who has the IP address, only the owner replies with its MAC address, and the sender stores the mapping in its ARP cache.

3 min read

ARP (Address Resolution Protocol) solves a specific, necessary problem: IP addresses identify devices logically, but delivering data on a local network actually happens using MAC addresses, the physical hardware identifiers burned into network interfaces. ARP is how a device figures out which MAC address corresponds to a known IP address.

How it works, step by step

  1. A device needs to send data to another device on the same local network, and it knows the destination's IP address, but not yet its MAC address.
  2. It broadcasts an ARP request to every device on the local network: "who has this IP address? Tell me your MAC address."
  3. Every device on the local network receives the broadcast, but only the device that actually owns that IP address responds.
  4. That device sends an ARP reply directly back to the requester, containing its MAC address.
  5. The requesting device stores this IP-to-MAC mapping in its ARP cache (a local table) for a period of time, so it doesn't need to repeat this process for every single packet sent to the same destination.

A worked example

Device A (192.168.1.10) wants to send data to Device B (192.168.1.20) on the same local network, but doesn't have B's MAC address cached. A broadcasts: "Who has 192.168.1.20?" Every device on the local network receives this broadcast, but only B, recognizing its own IP address in the request, replies directly to A: "192.168.1.20 is at MAC address 00:1A:2B:3C:4D:5E." A stores this mapping in its ARP cache and can now address data frames directly to B's MAC address, without needing to broadcast again for subsequent packets, until the cache entry eventually expires.

ARP spoofing, a real security concern

Because ARP has no built-in authentication, a malicious device can send fake ARP replies claiming to own an IP address it doesn't actually control (ARP spoofing, sometimes called ARP poisoning), tricking other devices into sending their traffic to the attacker's MAC address instead of the legitimate destination. This is a real, practical attack technique used to intercept local network traffic, and it's a large part of why some networks deploy dedicated ARP inspection or monitoring tools specifically to detect it.

Where this matters in real systems

Every device on every local network relies on ARP constantly and mostly invisibly, it's one of the most fundamental protocols in local networking, even though most users never interact with it directly. ARP caches can be inspected directly (the arp -a command shows a device's current cached IP-to-MAC mappings on most operating systems), which is a genuinely useful, simple diagnostic step when troubleshooting local network connectivity issues.

What interviewers actually ask about ARP

  • "What problem does ARP solve?" It resolves a known IP address to the corresponding MAC address on a local network, since actual data delivery locally happens using MAC addresses, not IP addresses directly.
  • "Walk me through the ARP request/reply process." The requesting device broadcasts "who has this IP?" to the whole local network; only the device owning that IP responds directly with its MAC address, which the requester then caches.
  • "What is ARP spoofing, and why is it possible?" An attack where a malicious device sends fake ARP replies claiming ownership of an IP address it doesn't control; it's possible because ARP has no built-in authentication of who's allowed to respond to a given request.
  • "How would you check a device's current ARP cache?" The arp -a command on most operating systems shows the current cached IP-to-MAC address mappings.

Key takeaways

  • ARP resolves a known IP address to its corresponding MAC address on a local network.
  • The process is a broadcast request followed by a direct reply from the device that owns the requested IP address.
  • Resolved mappings are cached locally to avoid repeating the broadcast for every packet.
  • ARP has no built-in authentication, making ARP spoofing a real, practical local network security concern.
All 101 Computer Networks interview questions

Log in to save which topics you've read across every subject.

Frequently asked questions

What problem does ARP solve?

It resolves a known IP address to the corresponding MAC address on a local network, since actual data delivery locally happens using MAC addresses, not IP addresses directly.

Walk me through the ARP request/reply process.

The requesting device broadcasts "who has this IP?" to the whole local network; only the device owning that IP responds directly with its MAC address, which the requester then caches.

What is ARP spoofing, and why is it possible?

An attack where a malicious device sends fake ARP replies claiming ownership of an IP address it doesn't control; it's possible because ARP has no built-in authentication of who's allowed to respond to a given request.

How would you check a device's current ARP cache?

The `arp -a` command on most operating systems shows the current cached IP-to-MAC address mappings.