Computer Networks · Module 4 — Physical & Data Link Layer
ARP: turning an IP address into a MAC address
This is the gap between the two layers you have just learned.
Sign in to track your score
Aisha's laptop knows it must send the packet to the router at 192.168.1.1. But a frame needs a MAC address, and she does not have one for it.
Why & what
Why ARP exists. This is the gap between the two layers you have just learned.
- The network layer works in IP addresses. It has decided: send this to 192.168.1.1.
- The data link layer only understands MAC addresses. It cannot address a frame to an IP.
Something has to translate one into the other, right at the moment of sending. That something is ARP.
What ARP is. ARP (Address Resolution Protocol) finds the MAC address that belongs to a known IP address on the local network.
It works by asking everyone. There is no directory and no server — just a shout and a reply.
The ARP cache. Asking every time would be wasteful, so each device keeps an ARP cache: a small table of recently learned IP-to-MAC pairs. Entries expire after a few minutes.
You can see yours by running arp -a.
How it works
- Aisha's laptop checks its ARP cache for 192.168.1.1. Not there.
- It sends an ARP request as a broadcast, to FF:FF:FF:FF:FF:FF. Every device on HostelNet-3F receives it. The message is: who has 1S2.1c8.1.1? Tell 1S2.1c8.1.42.
- Every device reads it. Rahul's laptop sees the IP is not its own and ignores it.
- The router recognises its own IP and sends an ARP reply — as a normal unicast, straight back to Aisha only: 1S2.1c8.1.1 is at DD:EE:FF:00:11:22.
- Aisha's laptop stores that in its ARP cache and finally builds the frame it wanted to send.

Common confusion
Students think ARP is used to find any device on the internet. Actually, ARP only ever works inside your own local network.
Aisha never ARPs for 203.0.113.10. She cannot — a broadcast does not cross a router, so the shout would never reach college.edu. What she ARPs for is her default gateway, 192.168.1.1. That is the pattern for every packet leaving a network: the destination IP is far away, but the destination MAC is always the next hop, right here on this link.
Destination IP = the final target. Destination MAC = the next device. Those two are almost never the same machine.
Interview angle
Asked as: "What is ARP and how does it work?" Very common, and the follow-up is usually "does ARP cross routers?" — where most candidates fall over.
Model answer:
ARP maps a known IP address to the MAC address of a device on the same local network. When a host needs to send a frame, it checks its ARP cache. If the entry is missing, it broadcasts an ARP request to FF:FF:FF:FF:FF:FF asking who owns that IP. Only the device with that IP replies, as a unicast, with its MAC address. The sender caches the result for a few minutes. ARP is local only. Broadcasts do not cross routers, so for a remote destination the host ARPs for its default gateway instead. The destination IP stays the final target, while the destination MAC is only ever the next hop.
- 1.
An ARP request is sent as a
- 2.
Aisha wants to reach 203.0.113.10. She sends an ARP request for
- 3.
Who replies to an ARP request?
- 4.
Why does a device keep an ARP cache?