Systems and protocols · Intermediate

ARP: resolving the next hop on a local link

Separate routing from local address resolution and follow why an off-link packet uses the router’s Ethernet address.

Ask Logeia about this articleTry the three questionsReview your answers

Updated

On this page
  1. Two destinations at different layers
  2. Work an off-link example
  3. Requests, replies and cached state
  4. Limits of the evidence
  5. Ask Logeia about this articleCheck your understanding

Two destinations at different layers

An IPv4 packet sent over Ethernet needs a link-layer destination for the next receiver on that link. ARP resolves an IPv4 protocol address to a hardware address. Routing first determines the outgoing interface and next hop; address resolution then supplies the destination needed to construct the frame. The final IP destination can be far away while the Ethernet destination is a nearby router. This distinction explains why changing routers can change the destination MAC without changing the application’s remote IP address. ARP is not a hostname lookup service.

Work an off-link example

Suppose 192.0.2.10/24 sends to 198.51.100.20 and the default gateway is 192.0.2.1. The host resolves 192.0.2.1 on its local Ethernet link. It does not broadcast a search for the remote machine across the Internet. The resulting frame targets the router’s MAC, while the enclosed IPv4 packet still targets 198.51.100.20. If the route instead says that 192.0.2.30 is directly connected, the host resolves that address. The route decision is therefore essential context when interpreting an ARP request in a capture.

Requests, replies and cached state

If the mapping is unknown, a broadcast request asks which station holds the target protocol address. The holder can reply with its hardware address, allowing later frames to use that mapping. Operating systems retain neighbor state so that every packet does not require a new broadcast. A cached entry is not eternal proof of reachability: aging, interface changes and equipment replacement can make it stale. Inspect the interface and neighbor state alongside the address pair. Clearing all neighbor entries can disturb unrelated traffic and does not repair an incorrect route or subnet configuration.

Limits of the evidence

Ordinary ARP does not cryptographically authenticate the claimed address mapping. An incorrect or malicious reply can therefore misdirect local traffic. A successful resolution also says nothing by itself about a listening TCP service or successful onward routing. Check the local mapping, then the IP path, then the application response instead of treating one observation as proof of all three layers. IPv6 uses Neighbor Discovery rather than this IPv4 ARP exchange. The local broadcast scope and trust assumptions matter as much as the format of the request and reply.

Reading and practice are recorded separately in this browser, for each language.

Learn this in order

Understand the systems behind the web · STEP 9

Choose a learning path