Messages travel in small packets
How does a message get from your laptop to a server in another country?
Nothing you send travels in one piece. It is cut into small packets. A packet is like a parcel with a label. The label says where it came from and where it is going.
No single machine knows the whole way. Each router passes the packet one step on, like a sorting office passing parcels on. Each step is called a hop.
Before your message is sent, your laptop and the server agree to talk. That opening exchange is a handshake, and it is part of TCP. TCP makes sure every packet arrives, like recorded delivery: every piece is signed for.
Press play to follow one web page's packets to a server in Frankfurt, and back.
On the way out, the home router changes where the label says the packet came from. The laptop's IP address only works inside its home. So the router swaps in the one address the whole home shares. It remembers the swap, so the reply can find its way back to the laptop.
That swap is called NAT. It works like one street address for a whole building, with a front desk that remembers who ordered what.
Key takeaways
- Everything you send is cut into packets, and each packet carries a label saying where it is going.
- Routers pass packets on one hop at a time. None of them knows the whole route.
- TCP opens with a handshake and makes sure every packet arrives, like recorded delivery.