The Life of a Packet
Every click sends a tiny messenger on an incredible journey. Follow a single packet as it hops through routers, crosses networks, and finds its way to a server on the other side of the world.
Every click sends a tiny messenger on an incredible journey. Follow a single packet as it hops through routers, crosses networks, and finds its way to a server on the other side of the world.
The moment you click, your computer creates a tiny digital messenger called a packet. It contains your request wrapped in layers of addressing information - like a letter with multiple envelopes.
Your packet's first hop is just a few meters - from your computer to your home router. But first, it needs to find the router using something called ARP (Address Resolution Protocol).
Your computer knows the router's IP address, but to actually send data over the wire, it needs the router's MAC address (hardware address). ARP broadcasts "Who has 192.168.1.1?" and the router responds with its MAC.
arp -a in terminal!
Your router passes the packet to your Internet Service Provider (ISP). This is where your home network meets the wider internet. The ISP assigns your public IP and routes your traffic.
Your home network uses "private" IP addresses (like 192.168.x.x). Your router translates these to your single public IP address using NAT. It's like having one mailbox for an entire apartment building!
At each router, your packet faces a decision: which way to go? Routers use routing tables - like road signs that say "To reach X, go through Y."
| Network | Mask | Next Hop | Interface |
|---|---|---|---|
| 93.184.216.0 | /24 | 10.0.0.5 | eth2 |
| 93.184.0.0 | /16 | 10.0.0.3 | eth1 |
| 10.0.0.0 | /8 | Direct | eth0 |
| 0.0.0.0 | /0 | 10.0.0.1 | eth0 |
Routers choose the most specific route (longest matching prefix). 93.184.216.0/24 is more specific than 93.184.0.0/16, so it wins. The /0 route is the "default gateway" - the catch-all for unknown destinations.
Every packet has a Time-To-Live (TTL) counter. Each router decrements it by 1. If TTL hits zero, the packet is discarded. This prevents packets from looping forever!
Windows: 128
Linux/Android: 64
macOS/iOS: 64
Cisco routers: 255
You can often guess someone's OS by the TTL in their packets!
Your packet has arrived! The destination server unpacks your request, processes it, and creates a response packet to send back. The roles are now reversed.
The response packet swaps source and destination! Your IP becomes the destination, the server's IP becomes the source. The payload now contains the webpage data (HTML, CSS, images, etc.).
Here's the surprising part: the response often takes a completely different path back to you! Internet routing is dynamic - each router makes its own decision based on current conditions.
Different paths happen because each router independently decides the best route. ISPs also have peering agreements that may favor certain directions. This is called asymmetric routing and it's completely normal!
You've followed a packet through its entire journey across the internet.
Every packet has a header (address info, TTL, protocols) and payload (your actual data).
Time-To-Live prevents packets from looping forever by counting down at each hop.
Packets find their own path - the return journey often takes a different route!
Each router only knows the next step, not the full path. It's like asking directions one block at a time.
Put your new knowledge into practice!