The idea: listen, wait, count, send, get an ACK
All Wi-Fi devices on a channel share the same air, and only one of them can talk at a time. There is no referee: every station follows the same rule, CSMA/CA (carrier sense multiple access with collision avoidance), called the DCF in the 802.11 standard. A station that has a frame listens first. When the air has been idle for DIFS, it counts down a random backoff, one step per idle 9 µs slot, and sends when the counter reaches 0. The receiver answers every frame with an ACK after a short gap called SIFS. No ACK means something went wrong.
The page has one access point (AP) and three stations. Pick who sends, whether a wall hides C from the others and whether RTS/CTS is on. The map shows frames flying; the timeline shows every slot of every node.
Slots, SIFS and DIFS
802.11 measures time in slots. The gaps between frames are fixed, and their order is the whole trick: the reply to a frame waits a shorter gap than anyone who wants to start something new.
| Name | 802.11a/g/n/ac (5 GHz OFDM) | On this page | Used for |
|---|---|---|---|
| slot | 9 µs | 1 slot | one backoff step |
| SIFS | 16 µs | 2 slots | before an ACK, a CTS, or DATA after CTS |
| DIFS = SIFS + 2 slots | 34 µs | 4 slots | before a new frame |
| CWmin / CWmax | 15 / 1023 | same | range of the random backoff |
Because SIFS < DIFS, the AP always starts its ACK before any waiting station's DIFS can end, so an exchange is never cut in half (Demo 1). The page rounds every time to whole slots and shortens the DATA frame to 12 slots so the timeline fits.
Random backoff, and why it freezes
Each station picks its backoff uniformly from 0 to CW (the contention window, 15 at first). The station with the smallest number goes first. The others hear it start and freeze their counters; after the next DIFS of idle air they continue from where they stopped instead of drawing again (Demo 2: B drew 7, counts to 4, freezes, and later only needs 4 more slots). That makes it fair: a station that already waited long is closer to 0 next time.
Collisions and the contention window
A radio cannot hear others while it transmits, so Wi-Fi cannot do what old Ethernet did (CSMA/CD: detect the collision and stop). If two stations reach 0 in the same slot, both frames are garbled at the AP, nobody gets an ACK, and each sender only learns about it from the silence. It then doubles its window and draws again (Demo 3):
| Attempt | 1 | 2 | 3 | 4 | 5 | 6 | 7+ |
|---|---|---|---|---|---|---|---|
| CW (backoff 0..CW) | 15 | 31 | 63 | 127 | 255 | 511 | 1023 |
A wider window makes a second tie less likely. After a success CW goes back to 15; after the retry limit (7 here) the frame is dropped.
The hidden node problem
Carrier sense only works if stations can hear each other. With the wall on, A and C both reach the AP but not each other. While A sends, C's radio hears silence, so C finishes its DIFS and backoff and transmits right into A's frame. The two overlap at the AP and both are lost (Demo 4). Long DATA frames make this likely: C has many slots in which to start.
RTS/CTS and the NAV
With RTS/CTS on, a station first sends a short RTS (request to send). The AP answers with a CTS (clear to send). Every frame carries a Duration field: how long the rest of the exchange will take. Everyone who decodes the CTS, including hidden C, sets its NAV (network allocation vector) to that time and treats the air as busy until it runs out, even if its radio hears nothing. This is virtual carrier sense (Demo 5, the purple bar in the timeline).
Collisions still happen, but now they hit a 3-slot RTS instead of a 12-slot DATA frame (Demo 6).
The price is two extra frames and two SIFS per exchange, so real devices use RTS/CTS only for long frames
(an RTS threshold, often off by default) or when they see many losses.
CSMA/CA vs CSMA/CD
| Wi-Fi (CSMA/CA) | Old shared Ethernet (CSMA/CD) | |
|---|---|---|
| Before sending | wait DIFS + random backoff | wait until the wire is idle |
| Collision found by | missing ACK, after the whole frame | hearing it on the wire, at once |
| After a collision | double CW, draw again | jam signal, binary exponential backoff |
| Every frame ACKed | yes (layer 2) | no |
| Today | every Wi-Fi network | gone: full-duplex switched links never collide |
See also How Ethernet Switches Forward Frames: an access point bridges these Wi-Fi frames onto a switched Ethernet, where every link is its own collision-free segment, and Hub vs Switch vs Router for CSMA/CD on a hub.
What the page leaves out
- Real frame lengths and data rates, preambles, EIFS after a garbled frame, and the exact ACK timeout.
- The rule that a frame arriving at a station whose air was already idle for DIFS may go out at once, and the post-backoff after every transmission.
- 802.11e/WMM: four access categories (voice, video, best effort, background) with their own AIFS and CW, and TXOP bursts.
- Aggregation (A-MPDU) with block ACKs, OFDMA and trigger frames in Wi-Fi 6, beacons, power save, association and security (WPA2/WPA3).
- Exposed nodes, capture effect, rate adaptation, and interference from other networks on the same channel.