Wirebook › Bonus lesson
How does the router know which device asked?
Your tablet, the laptop and the TV all watch videos at the same time, but your home has just one address on the internet. So when the answers come flooding back, how does the router know which screen asked for which? It works like a cloakroom: every conversation that leaves the house gets a numbered ticket.
What the router is really doing
- Inside the house, every device has its own private address, like
192.168.1.20. Lots of homes use the very same numbers, which is fine, because they never leave the house. The router hands them out (that's DHCP). - On the way out, the router swaps the sender label for the house's one public address and a ticket number (a port number). It writes the swap in its book. This trick is called NAT, network address translation.
- On the way back, it reads only the ticket, finds the row, swaps the label back and passes the answer to the right device. The letter inside is sealed with HTTPS, so the router can't read your messages or videos, and it doesn't need to.
- Each conversation gets its own ticket. Even when the tablet and the TV ask the same website from the same door number, they get different tickets, so answers never get mixed up.
- Quiet tickets get crossed out after a few minutes, so the book doesn't fill up. Apps that stay connected for ages send a tiny "still here" message now and then to keep their ticket.
Why does this matter?
It's why a whole family can share one internet connection, why every website sees your home as one visitor, and why a game you host at home needs one door opened before friends can join. Some internet providers add a second cloakroom of their own (called carrier-grade NAT), so several homes share one public address. Then opening a door on your own router isn't enough, because the provider's book has no ticket for you either.
Opening doors has a cost: a forwarding rule lets anyone knock, not just your friend. Open only the doors you need, point them at one device, keep it updated, and remove the rule when you stop playing.
Grown-up twin: Tooltern's help pages on port forwarding that does nothing (double NAT and CGNAT), public vs private IP addresses and common port numbers show the same ideas on a real router.