Wirebook

Wirebook › Bonus lesson

How does the router know which device asked?

Bonus lesson · about 7 minutes · hands-on · nothing you type leaves your browser

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.

The cloakroom at your front door

Press a device's button to send a request out of the house. Watch the router swap the label on the envelope and write a ticket in its book. Then press Answer comes back on a ticket to see where the answer goes. The contents stay sealed the whole time: the router only reads the labels.

(press a device's button)

What the router is really doing

AHA! Because the router only hands back answers to questions someone inside asked, a stranger on the internet can't just walk up to your TV. That's a nice side-effect of the cloakroom, though it's not a full lock: your devices still need updates.

Your turn: be the router

Five requests went out this evening. Now eight parcels arrive at the front door. For each one, find its ticket in the book and hand it to the right device, or drop it. Three tricksters are hiding in the pile, and one has a note scribbled on it. After each answer, the clue card shows the three checks a careful router makes.

(press the button)

Opening one door on purpose

You host a game on your console and a friend wants to join. Their game knocks on door 25565, but nobody at home asked, so there's no ticket. Grown-ups fix this with a port forwarding rule: a permanent ticket that always goes to one device.


  

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.

Words from this lesson

Earn a bonus badge

Get all 4 right to collect the Cloakroom tickets bonus badge. Bonus badges are extra: they don't change your stamp count or rank. Wrong answers are fine: just try again.

1. Your tablet and TV both watch videos, but your home has one public address. How does the router know which answer goes to which?

2. Can the router read what's inside an HTTPS page you're loading?

3. A parcel arrives for ticket 40977, but there's no ticket 40977 in the book. What does a home router do?

4. You host a game on your console and friends can't join. What helps?

Try another lesson

  1. 3Can a website get tired?7 min · interactive
  2. 12How does a game remember where you got to?6 min · interactive
  3. 1What happens when you open a web page?6 min · interactive