ARP and next-hop resolution
Why a host needs two addresses
An IPv4 packet carries the final IP destination. On an Ethernet link, its frame also needs a destination MAC address for the next receiver. Address Resolution Protocol (ARP) obtains that local mapping. Routing chooses the next-hop IP first; ARP does not choose routes. The fictional addresses below are for paper exercises only.
A: 192.0.2.10/24B: 192.0.2.20/24R: 192.0.2.1/24 (default gateway)Remote: 198.51.100.8Follow a request and reply
Assume A has an empty neighbor cache and wants to send to B. The connected route makes B the next hop. A sends a normal ARP request in an Ethernet broadcast frame. B normally responds directly to A with its mapping. A can cache B’s IP and MAC and send the pending packet in a unicast frame. The request names the target IPv4 address; it does not ask a DNS server. ARP is carried directly over Ethernet (EtherType 0x0806), not inside an IP packet.
A MAC = 02:00:00:00:00:0aB MAC = 02:00:00:00:00:0b1 A -> ff:ff:ff:ff:ff:ff : ARP target 192.0.2.202 B -> A : 192.0.2.20 = 02:00:00:00:00:0b3 A -> B : IPv4 destination 192.0.2.20Send to a remote network
Assume A has only its connected /24 and a default route through R. For 198.51.100.8 the route points to R, so A resolves 192.0.2.1 instead of the remote server. After resolution the Ethernet destination is R’s MAC while the IP destination remains 198.51.100.8. A router replaces the link-layer framing as it forwards to another Ethernet link. This example assumes ordinary forwarding without address translation. A missing route is not fixed by ARP.
ARP target: 192.0.2.1R MAC: 02:00:00:00:00:01Frame destination: 02:00:00:00:00:01IP destination: 198.51.100.8Read a cache without over-interpreting it
A neighbor cache maps local next-hop IP addresses to link-layer addresses. A switch MAC table instead maps MAC addresses to ports. Cached entries may expire, become stale or need refreshing; timers and display states depend on the OS. An unanswered request suggests a local resolution problem but does not prove that the target is powered off. Wrong VLANs, link faults and duplicate addresses are possible causes. ARP does not authenticate ownership; defenders can use validated bindings and appropriate switch controls. For practice, predict the next hop for 192.0.2.99 and 203.0.113.7 using the earlier route table. Continue to IPv6 Neighbor Discovery.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
ARP and next-hop resolution — knowledge check
Interpret fictional offline neighbor and ICMP observations.
A host at 192.0.2.10/24 has a default gateway 192.0.2.1 and no other routes. Which address does it resolve to send to 198.51.100.8?
What destination MAC normally carries the initial Ethernet ARP request?
What does an ARP cache associate?
After resolving the default gateway, what IPv4 destination is in an ordinary packet to 198.51.100.8?
No reply arrives to a local ARP request. What is justified?