Chapter 8 — Wi-Fi: same idea, different physics
In one sentence
Wi-Fi does the same job as Ethernet — deliver frames between devices on a local network — but over a shared, noisy, half-duplex radio channel, which changes its behaviour in ways you will feel.
The problem
On a cable, you have a dedicated wire and can send and receive simultaneously. On radio, everyone shares the same air, you can't listen while you're transmitting, and the signal degrades with distance and interference.
The key differences (and why you care)
| Wired Ethernet | Wi-Fi | |
|---|---|---|
| Medium | Your own dedicated cable | Shared air, half-duplex |
| Taking turns | Not needed | CSMA/CA: listen, wait a random time, then transmit |
| Acknowledgements | None at this layer | Every frame is ACKed and retried at the link layer |
| Speed | Fixed once negotiated | Changes constantly with signal quality |
| Loss | Nearly zero on a good cable | Bursty; interference, distance, walls, microwaves |
| Latency | Microseconds, very stable | 1–50 ms, highly variable |
Three consequences you will actually experience:
1. Wi-Fi hides loss from TCP — mostly. Because the link layer retries failed frames itself, TCP often doesn't see a loss. Good (TCP doesn't panic), but those retries add latency and jitter, which is why Wi-Fi feels less "crisp" for video calls even at high speeds.
2. Airtime is the real currency, not bandwidth. One distant device transmitting slowly hogs the air, slowing everyone. This is called the "performance anomaly", and it's why one person in the far bedroom can make the whole house's Wi-Fi feel bad.
3. Advertised speeds are fantasy. "Wi-Fi 6, 1200 Mbps" is a theoretical combined figure. Because the channel is shared and half-duplex, real TCP throughput is typically 40–60% of the negotiated rate, less with multiple devices.
The other links you'll meet
| Link type | Notes |
|---|---|
| Fibre / cable to the home | High speed; cable is shared upstream in the neighbourhood |
| Mobile (4G/5G) | 20–80 ms latency that spikes when the radio wakes from idle; deep buffers; your IP changes as you move |
| VPN tunnels | Your data wrapped inside another packet — which steals bytes from the MTU (Chapter 15). A very common cause of weird bugs. |
Loopback (lo) |
A fake interface inside your own machine, address 127.0.0.1. Traffic never touches a wire. |
Practice (20 min)
A. Look at your actual Wi-Fi quality:
# Linux
iw dev wlan0 link # signal strength and current bitrate
iw dev wlan0 station dump | grep -E 'signal|bitrate|retries|failed'
# macOS
system_profiler SPAirPortDataType | grep -A10 "Current Network"
# or: wdutil info (may need sudo)
Two numbers matter most:
- Signal: better than −60 dBm is good; worse than −75 dBm is trouble. (It's negative — closer to zero is stronger.)
- Tx bitrate: if it's far below your Wi-Fi standard's maximum, you're far from the access point or there's interference.
B. Watch it degrade. Run this while walking away from your router:
# Linux
watch -n1 'iw dev wlan0 link | grep -E "signal|bitrate"'
Watch the bitrate drop in steps as you move. That's the radio adapting, and it explains why your video call gets worse in the far room.
C. Compare latency stability. Ping your router over Wi-Fi and (if you can) over a cable:
ping -c 50 192.168.1.1
Look at the summary line: min/avg/max/mdev. mdev is the jitter. On a cable
it'll be a fraction of a millisecond. On Wi-Fi it may be several milliseconds and
occasionally much worse. That variability is why Wi-Fi feels different even when
"fast".
Common confusions
- "More bars = faster?" Bars show signal, not speed. A strong signal with heavy interference or 30 other devices can still be slow.
- "5 GHz is always better than 2.4 GHz?" 5 GHz is faster and less congested but has shorter range and is blocked more by walls. 2.4 GHz reaches further but is crowded (and shared with microwaves, Bluetooth, baby monitors).
- "Wi-Fi is a network." Wi-Fi is a link layer — a way to carry frames. IP, TCP, and everything above are identical over Wi-Fi and Ethernet.
Check yourself
- Why does Wi-Fi acknowledge every frame when Ethernet doesn't?
- Why can one slow device degrade everyone's Wi-Fi?
- What does
mdevin ping output tell you, and why is it bigger on Wi-Fi?
Further reading
- Video: "How Wi-Fi Works" — Practical Networking, or Branch Education's visually spectacular version.
- Article: "802.11 Wireless Fundamentals" — search Cisco or Cloudflare's explainer.
- Book: 802.11 Wireless Networks: The Definitive Guide — Matthew Gast. The reference, if you go deep on wireless.
- Tool: WiFi Explorer (macOS) or WiFiAnalyzer (Android) — see all nearby networks and channel congestion. Genuinely eye-opening in an apartment block.
End of Part 2 — Milestone check
- I can explain what a MAC address is and what its first 3 bytes mean
- I have watched an ARP request and reply in tcpdump
- I can explain how a switch learns, and what it does with an unknown MAC
- I know the difference between a collision domain and a broadcast domain
- I know why a Layer 2 loop is dangerous
- I have checked my own Wi-Fi signal and bitrate