Abstract


Why do we need Address Resolution Protocol?

We need MAC Address in order to route the data from one machine to another on Local Area Network (LAN).

Only IPs in your local subnet get resolved to MACs. Everything else routes via the gateway MAC.

When accessing external IPs (like 8.8.8.8):

  1. Machine checks the subnet → sees 8.8.8.8 is not local
  2. Uses ARP only to get the MAC of the gateway
  3. Routes the packet to the default gateway

ARP Cache


  • ARP Cache is a mapping of IP Address and MAC Address stored in the computer to reduce the frequency of querying the MAC address of other machines

Commands to view ARP cache

You can view this copy using arp -a or Linux specific command ip neighbor show.

A sample cache entry look like ? (172.31.20.1) at 0:0:5e:0:1:d6 on en0.