Skip to content

Your Home Network (Wi-Fi, DHCP & NAT) ​

Season 2 · Note 3

In Plain English (30-Second Refresher) ​

TL;DR

Your laptop, phone, TV and console form a small LAN (local area network) around one Wi-Fi router.

  1. Getting an address: when a device joins, DHCP (Dynamic Host Configuration Protocol) lends it a private IP (Internet Protocol) address like 192.168.1.23.
  2. Two addresses: the IP address (for the whole trip) and the MAC (Media Access Control) address, a hardware address used only for the next hop. ARP (Address Resolution Protocol) finds one from the other.
  3. One public address: the router's NAT (Network Address Translation) swaps every device's private address for the home's single public one, and keeps a table so replies find the right device. Strangers with no matching row are dropped.

The Mission We Follow ​

You switch your laptop on. Before Coin Dash can send your score (52), the laptop must move in: get an address, find the router, and go out under your home's shared public address.

Real-World Analogy: Moving Into a Big Apartment Building 📮 ​

In the buildingIn your home networkWhat it does
🏢 The buildingLANAll devices behind one router
🙋 Asking the mailroom for a flat numberDHCPLends you a private address
🔢 Your flat numberPrivate IP address (192.168.1.23)Only meaningful inside the building
🔖 Your name on the doorMAC address (a4:83:e7:2b:9c:10)Hardware ID for the next hop
📣 "Which door is the mailroom?"ARPTurns an IP address into a MAC address
📬 The mailroom stamping the building's address on outgoing mailNATOne public address for everyone
📒 The mailroom's logbookNAT tableSends each reply to the right flat
🚪 Doorman who only lets in repliesFirewallBlocks uninvited packets

Visual Mental Model ​

A home network: laptop, phone, TV and console with private addresses behind one Wi-Fi router, which swaps them for one public address using its swap table

How It Works (Interactive Animated Flow) ​

Moving In and Going Out
Join the Wi-Fi, get an address, share one public address
🎯 Mission Your laptop joins the home Wi-Fi and sends “score = 52” to the leaderboard.
NEW💻Your laptopno address yet192.168.1.1📶Wi-Fi routerhands out addressesNAT📒Swap tableinside ⇄ outside203.0.113.7🌍The internetsees one addressBLOCKED🕵️A strangerknocks uninvitedAny router here?Be .23write a rowpublic addressreply → :40001no row → drop

DHCP in four messages ("DORA") ​

#MessagePlain English
1Discover (laptop → everyone)"Is there a router here? I need an address."
2Offer (router → laptop)"You can be 192.168.1.23."
3Request (laptop → router)"Yes please, I'll take .23."
4Acknowledge (router → laptop)"It's yours for 24 hours. I'm your gateway; here's the address book (DNS, Domain Name System) to use."

The NAT swap table ​

DeviceInside (private : port)Outside (public : port)
💻 laptop192.168.1.23 : 51000203.0.113.7 : 40001
📱 phone192.168.1.24 : 51000203.0.113.7 : 40002
📺 TV192.168.1.25 : 52344203.0.113.7 : 40003

A port is a number (0–65,535) that identifies one conversation. Replies come back to the outside port, and the table maps them to the right device.

The 4 Core Principles ​

  1. Addresses are borrowed, not owned. DHCP leases them for hours; reconnect later and you may get a different one.
  2. IP = the whole trip, MAC = the next hop. The MAC address never leaves your home network.
  3. Private ranges are reused everywhere. 192.168.x.x, 10.x.x.x and 172.16–31.x.x exist in millions of homes at once; only public addresses are unique.
  4. Outgoing is easy, incoming is blocked. NAT lets replies in and drops everything else by default.

Trade-offs ​

ChoiceUpsideDownside
DHCP (automatic)Zero setup on any networkAddresses can change; servers at home need a fixed "reservation"
NAT (one shared public address)Saves scarce public addresses; free basic firewallHard to host games/servers at home without port forwarding
Wi-Fi vs a cableFreedom to moveShared radio, interference, walls; a cable is steadier

Common Gotchas ​

Watch Out For

  • "What's my IP?" has two answers: the private one your laptop shows (192.168.1.23) and the public one websites see (203.0.113.7).
  • Full Wi-Fi bars ≠ fast internet. Bars describe only laptop → router.
  • Two routers in a row (double NAT) confuse online games and video calls. Put one in "bridge" mode.
  • An address starting 169.254. means DHCP failed: the device gave itself a placeholder. Reconnect or restart the router.
  • IPv6, the newer, longer address format, gives every device its own public address, so NAT matters less there; the firewall still blocks uninvited traffic.

Quick Self-Check (Restore Your Memory) ​

1. You join a café's Wi-Fi. What gives your laptop its address?

The café router, using DHCP: discover → offer → request → acknowledge. It also tells your laptop the gateway (router) and DNS server to use.

2. Your phone and laptop both talk to Coin Dash through one public address. How do replies reach the right device?

The router's NAT table gives each conversation its own outside port. The reply's port is looked up and swapped back to the right private address.

3. What's the difference between a MAC address and an IP address?

The MAC address is built into the network chip and used only for the next hop on the local network (layer 2). The IP address is handed out by the network and used end to end (layer 3).

🎬 Now Watch It Happen ​

2-minute episode

Ride along as the packet while your laptop moves in, borrows an address, and goes out under one shared public address. S2 · E3 — Moving In →

Built for clear thinking and fast 2-minute refreshers.