On your laptop
Your laptop (192.0.2.10) wants to reach a server at 203.0.113.10. It writes both IP addresses on a packet and sets TTL, a hop counter, to 64.
The subnet mask 255.255.255.0 keeps only the network part of an address. Mine gives 192.0.2.0; the server's gives 203.0.113.0. They differ, so the server is not on this LAN.
Finding the gateway
Off-LAN packets go to the default gateway: the router at 192.0.2.1. To reach it the laptop needs its MAC address, so it broadcasts an ARP request to ff:ff:ff:ff:ff:ff: who has 192.0.2.1?
Router 1 replies to the laptop alone: 192.0.2.1 is at 00:00:5e:00:53:01. The laptop keeps this in its ARP cache, a short list of known neighbours, so it need not ask again soon.
Hop by hop
The laptop wraps the packet in an Ethernet frame addressed to the router's MAC, 00:00:5e:00:53:01. Inside, the packet still says 203.0.113.10. MAC means the next stop; IP means the final stop.
Router 1 removes the frame and reads the destination IP. Its routing table says 203.0.113.0/24 goes via 198.51.100.2. It lowers TTL from 64 to 63.
Router 1 builds a new frame for the next link: from its own MAC 00:00:5e:00:53:02 to router 2's 00:00:5e:00:53:03. Both MAC addresses changed. The IP addresses did not.
Router 2 removes that frame too. 203.0.113.0/24 is directly connected to its other side, so the next stop is the server itself. TTL drops to 62.
A third frame carries the packet from 00:00:5e:00:53:04 to the server's 00:00:5e:00:53:0b. The packet inside still goes from 192.0.2.10 to 203.0.113.10.
The server sees its own MAC and its own IP, so it keeps the packet. Three links, three different frames, one unchanged pair of IP addresses. Only TTL went down: 64 to 62.
The headers, field by field
;; step 1/10 · build-packet · local ;; at your laptop IPv4 packet (RFC 791) source 192.0.2.10 destination 203.0.113.10 TTL 64 (a common default) payload a TCP segment no Ethernet frame yet: the laptop must first decide where to send it
The routers already know their neighbours’ MAC addresses from earlier ARP exchanges, so the figure shows ARP only once. Here every LAN uses public addresses, so nothing rewrites the IPs. A home LAN with 192.168.x.x addresses also needs NAT at its router, which swaps the source address; that is a later lesson.