Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 2 · The Link · from IP address to hardware address

ARP

Address Resolution Protocol

ARP is the last translation before the wire. A host knows the IP address it wants to reach on the local network, but the Ethernet card can only deliver to a MAC address. ARP asks the segment “who has this IP?” and caches the hardware address that answers.

ARP resolves a local IP address to the MAC address that owns it — one broadcast question, one cached answer.

You can run this one

Open the ARP lab →

“Who has this IP?” Broadcast the question, watch the switch flood, get one unicast answer, fill the cache.

Beginner
Operates at
Layer 2 / 3
bridges the two
Port
None
not over IP at all
Scope
Local link
one broadcast domain
IPv6 uses
NDP
neighbour discovery

How it works

Host A wants to reach 192.168.1.20 on the same LAN
Host AThe whole segment
ARP Request — broadcast to ff:ff:ff:ff:ff:ff
“Who has 192.168.1.20? Tell 192.168.1.10”
Every host on the segment receives it — only the owner answers.
ARP Reply — unicast, from Host B only
“192.168.1.20 is at 1c:6f:65:aa:bb:cc”
Host A stores the pair in its ARP cache for the next few minutes.
Ethernet frames now flow straight to that MAC

The question is a broadcast because A doesn’t yet know who to ask; the answer is a unicast straight back. For an IP off the LAN, A resolves the gateway’s MAC instead.

The main points

What ARP does, step by step

1
Check the cache

If the IP→MAC pair is already known, the host skips straight to sending — no ARP traffic at all.

2
Broadcast the question

On a miss it floods “who has this IP?” to every host on the local segment at once.

3
The owner replies

Only the host holding that IP answers, unicast, with its hardware address.

4
Cache and send

The pair is cached with a short timeout, and frames flow directly until it expires.

Relatives & variants
Gratuitous ARP — announce your own IP→MAC
Proxy ARP — a router answers on another’s behalf
NDP (IPv6) — the ICMPv6 replacement

In cybersecurity

ARP has no authentication whatsoever — a host believes any reply it hears, which makes spoofing the classic LAN attack.

ARP spoofing

An attacker sends forged replies claiming the gateway’s IP, so traffic detours through them.

Man-in-the-middle

Once in the path they can read, alter or drop traffic — only encryption above keeps it private.

Dynamic ARP Inspection

Switches validate replies against DHCP-snooping data and drop the forged ones.

Cache poisoning

Unsolicited replies quietly overwrite good entries; static entries pin critical ones in place.

Denial of service

Poisoning a gateway entry with a dead MAC simply blackholes a host off the network.

Segmentation

ARP is link-local, so smaller VLANs shrink the blast radius of any spoofing attack.

Sits beside the stack

IP (L3)ARPEthernet (L2)

ARP isn’t carried over IP — it rides directly in Ethernet frames, joining the two layers it sits between.

Works with

EthernetIPv4

See it on Linux

ip neightcpdump

Packet & cache

Key fields
Opcode1=req 2=rep
SenderIP + MAC
TargetIP + MAC
The cache
Dynamiclearned
Staticpinned
Timeoutminutes
arp -ainspect