What it is
ARP (Address Resolution Protocol) is used on IPv4 Ethernet networks to find the link layer address for an IP address on the same local network. IP routing decides the next hop IP. ARP finds the MAC address for that next hop so the frame can be delivered on the wire.
Key points
- Uses broadcast requests and unicast replies on a LAN.
- Hosts cache mappings for a while to avoid repeating lookups.
- ARP is a common source of spoofing and man in the middle attacks on flat networks.
Concrete example
Your laptop wants to reach a server on the Internet. It does not ARP for the server's IP. It ARPs for the default gateway's IP, learns the gateway's MAC, and then sends the packet to the gateway for routing.