How Wi-Fi works
One radio channel, shared by everything in the room. Only one device can talk at a time, and nobody is in charge of whose turn it is. This page runs the real rules slowed down a thousand times or more: devices listen, wait a random moment, talk, and wait for a receipt. Drag the router and the devices around the room.
The room
The channel, slowed down
Frame log
Controls
Selected device
Who gets what
| Device | State | Signal | Link rate | Delivered | Resent |
|---|
What is going on
1. A signal that fades
The router and every device are small radio transmitters of about a tenth of a watt. The signal weakens with distance and loses more passing through each wall. What matters is how far the signal stands above the background noise, the signal-to-noise ratio. A strong signal can carry many bits per symbol (the dense grids of dots in the constellation picture); a weak one must fall back to a few robust bits. That is why the link rate drops when you drag a device behind a concrete wall, and why 5 GHz is faster nearby but fades sooner.
2. Listen before you talk
There is no conductor. A device with something to send first listens. If the channel is quiet for a short fixed time (DIFS, 28 to 34 millionths of a second), it may go. If it hears anyone else, it holds.
3. Wait a random moment
If everyone who was waiting started the instant the channel fell silent, they would all crash into each other. So each one picks a random number of 9-microsecond slots and counts them down, pausing whenever the channel is busy. The lowest number goes first. The small numbers next to the devices are these countdowns.
4. Every frame needs a receipt
A radio cannot hear while it is transmitting, so the sender cannot tell whether its frame arrived. The receiver answers with a tiny ACK 10 to 16 microseconds later. No ACK means the frame is presumed lost: the sender doubles its range of random waits and tries again, up to seven times.
5. Collisions and hidden devices
Two devices sometimes draw the same number and talk at once. Worse, two devices can each be in range of the router but out of range of each other, so listening first does not help. Open the “Hidden devices” room to see it, then switch on RTS / CTS: the router's short “go ahead” reaches both sides and tells the other one to stay quiet. Data frames stop being lost, but every frame now pays for two extra short messages, so with frames as short as these the total delivered goes down. Real devices use it only for long transmissions.
6. Joining
The router announces the network with a beacon about ten times a second. A new device asks who is there (probe), proves it may join (authentication), registers (association), and then both sides derive fresh encryption keys in four messages without ever sending the password itself. Press Restart to watch each device go through it.
7. Slow devices cost everyone
Turns are handed out per frame, not per second. A device at the edge of range needs ten times longer to send the same frame, and everyone else waits while it does. Try “One far device” with traffic flat out and look at the airtime bar.
What is simplified
- Signal strength uses a distance law (30 dB per tenfold distance) plus a fixed loss per wall. There are no reflections, no fading and no furniture, so real rooms are patchier.
- Radio waves cross this room in under 0.1 microseconds, far too fast to see even here. The rings around a transmitter only mark who is talking.
- One antenna and one packet of 1500 bytes per turn. Real Wi-Fi 6 uses several antennas, bundles dozens of packets into one turn and can serve several devices at once (OFDMA, MU-MIMO), so real throughput is several times higher than shown.
- The link rate is picked directly from the signal-to-noise ratio using typical thresholds. Real devices find it by trial and error.
- A frame is lost if the interference during it ever pushes the signal below what its modulation needs. All devices use the same priority class, there are no neighbouring networks, and every device stays awake.
- The joining sequence shows the frames and their order, but not the cryptography inside them.