GET /wifi.html  →  200 OK

Wi-Fi & 802.11

Wi-Fi is a shared radio channel doing an impression of an Ethernet cable. This page is about how it keeps the act up: the standards, the join, bands and channels, and what your signal meter really knows.

Layers on this page

This page covers OSI layer 2, data link, and layer 1, physical.

0x01The big idea

Ethernet frames, carried over air.

Your socket sees Ethernet. Frames, MAC addresses, IP packets riding inside. Down at the medium nothing matches that picture. A radio goes deaf the instant it transmits, every station fights for the same channel, and your signal sags when somebody walks between you and the AP.

So 802.11 dodges collisions instead of catching them (CSMA/CA). Wait for the channel to go quiet, roll a random backoff, send, then listen for an acknowledgement on each unicast frame. Missing ACKs get retried at layer 2, aggregated, retried again, all of it finished before TCP smells anything wrong.

Bad Wi-Fi almost never reaches your app as packet loss. It arrives as jitter. Pull the retry rate out of a capture and you'll see exactly where your milliseconds went.

wired vs wireless
0x02Generations

From 11 Mbit/s to Wi-Fi 7.

Every generation added a trick: more bandwidth, more antennas or smarter sharing of the channel. Rates are theoretical maximums across all spatial streams. Real TCP throughput is usually less than half.

NameStandardYearBandsMax widthMax PHY rateHeadline feature
—802.11b19992.4 GHz22 MHz11 Mbit/sDSSS / CCK, the first mass-market Wi-Fi
—802.11a19995 GHz20 MHz54 Mbit/sOFDM arrives
—802.11g20032.4 GHz20 MHz54 Mbit/sOFDM at 2.4 GHz
Wi-Fi 4802.11n20092.4 / 5 GHz40 MHz600 Mbit/sMIMO, up to 4 spatial streams
Wi-Fi 5802.11ac20135 GHz160 MHz6.9 Gbit/s256-QAM, downlink MU-MIMO
Wi-Fi 6802.11ax20192.4 / 5 GHz160 MHz9.6 Gbit/sOFDMA, 1024-QAM, target wake time
Wi-Fi 6E802.11ax20212.4 / 5 / 6 GHz160 MHz9.6 Gbit/sAccess to the 6 GHz band
Wi-Fi 7802.11be20242.4 / 5 / 6 GHz320 MHz~46 Gbit/sMulti-link operation, 4096-QAM
0x03Joining a network

Everything that happens before your first SYN.

Open the lid, call connect(), and dozens of frames have already flown. Open Wireshark in monitor mode and you'll see each of these steps.

  1. Discover

    The client sits and collects beacons, which an AP fires about ten times a second (100 TU, so every 102.4 ms), or it gets impatient and shouts with probe requests.

    Beacon · Probe Req/Resp
  2. Authenticate

    Under WPA2-Personal this step is pure ceremony, politely called "open system." WPA3-Personal does real work here with its SAE password exchange.

    Authentication
  3. Associate

    The client asks in. Both sides settle on rates, channel width and spatial streams, and the AP hands back an association ID.

    Association Req/Resp
  4. 4-way handshake

    Four EAPOL frames prove each end knows the key, then derive fresh session keys. Data waits until that's done.

    EAPOL 1/4 → 4/4
  5. Get an address

    DHCP Discover, Offer, Request, Ack. Then ARP goes hunting for the gateway's MAC.

    DHCP DORA · ARP
  6. Your SYN

    Now connect() can finally send its SYN. On a crowded network, steps 1 to 5 burn more time than the TCP handshake they're holding up.

    TCP SYN →
0x04Bands & channels

Three bands, three personalities.

Lower frequencies go further and get through walls more easily. Higher frequencies have more room for wide, clean channels. Picking a band is a trade-off between range and capacity.

2.4GHz

Range, crowds

The best range and wall penetration, but also the most crowded band.

  • Channels  1–11 (US), 1–13 elsewhere
  • Non-overlapping  1, 6, 11
  • Width  stick to 20 MHz
  • Neighbours  Bluetooth, microwave ovens
5GHz

The workhorse

Many more channels and far less interference. Most enterprise Wi-Fi uses this band.

  • Channels  36–165, varies by country
  • Widths  20 / 40 / 80 / 160 MHz
  • DFS  radar can force a channel change
  • Range  shorter through walls
6GHz

Clean and wide

No legacy devices are allowed here, only Wi-Fi 6E and Wi-Fi 7.

  • Spectrum  up to 1,200 MHz (US)
  • Channels  59 × 20 MHz or 7 × 160 MHz
  • Security  WPA3 required
  • Range  shortest; best within a room
2.4 GHz channel plan Eleven overlapping channel humps from 2401 to 2473 MHz. Only channels 1, 6 and 11, highlighted, do not overlap one another. 1 2 3 4 5 6 7 8 9 10 11 2400 MHz 2420 2440 2460 channel →
Fig. 1: The 2.4 GHz channel plan. Channel centres are only 5 MHz apart, but each transmission is about 20–22 MHz wide. Only 1, 6 and 11 stay clear of each other.
0x05Try it

What does your signal number mean?

Hold Option and click the Wi-Fi icon on a Mac, or run iw dev wlan0 link on Linux, and you'll see a value in dBm. Drag the slider to find out what yours means in practice.

RSSI decoder

// rule-of-thumb thresholds
−95 dBm · noise floor−30 dBm · next to the AP
Reading−67 dBm
Actual power≈ 200 pW

Good

The classic design target for voice and video. Below this, calls start to stutter when you move.

// RSSI is only half the story. You also want at least 25 dB of SNR above the noise floor.

0x06Security

Four generations of locks.

1997 Broken

WEP

RC4 with stunted initialization vectors. Crackable inside a coffee break using free tools. Never.

2003 Deprecated

WPA · TKIP

A patch that kept WEP-era chipsets breathing. Today's gear punishes TKIP by dragging the whole link down to legacy rates.

2004 Baseline

WPA2 · AES

Strong crypto, sloppy habits. Capture one handshake and a lazy passphrase falls over on a GPU, offline, with nobody watching.

2018 Use this

WPA3 · SAE

SAE strangles offline dictionary attacks and brings forward secrecy along with it. Mandatory on 6 GHz, which is the nicest thing about 6 GHz.

Roaming is the client's call

No AP hands you off. Your laptop decides when to let go, and plenty of clients cling to a dying signal out of stubbornness: the hysteresis baked into their drivers keeps them latched to the old AP until the link is nearly unusable. 802.11k feeds them neighbour reports, 802.11v nudges them, 802.11r makes the jump cheap. If your SSH session freezes halfway down a hallway, start here.