CSMA/CA
How Wi-Fi Coordinates a Shared Channel
CSMA/CA is the heart of the IEEE 802.11 Distributed Coordination Function (DCF), the basic mechanism that arbitrates which station gets to talk on a contended channel. Because the wireless medium is broadcast and half-duplex, only one nearby transmitter can succeed at a time; two overlapping packets corrupt each other and both must be retried. Rather than detect those collisions after the fact, as wired Ethernet does, Wi-Fi works to avoid them. Every station listens first (physical carrier sense via energy detection and preamble decoding) and also tracks a Network Allocation Vector, a countdown timer set from the duration field of overheard frames (virtual carrier sense). The channel is treated as busy if either indicator says so.
When a station has a frame to send and finds the medium idle, it must remain idle for a DCF Interframe Space (DIFS, 34 microseconds for 5 GHz OFDM) and then enter a random backoff. The backoff counter is drawn uniformly from zero to the current contention window and is expressed in 9 microsecond slot times. The counter decrements only while the channel stays idle and freezes whenever another transmission begins, which gives waiting stations priority over newcomers and provides rough long-term fairness. A successful frame is answered by the receiver after a short SIFS gap (16 microseconds) with an ACK; a missing ACK is interpreted as a collision or a corrupted frame.
On a failed attempt the station doubles its contention window and tries again, a strategy called binary exponential backoff. Starting at CWmin of 15, the window grows 15, 31, 63, 127 and onward up to CWmax of 1023 before saturating. Spreading retries across a larger window reduces the chance that the same two stations collide twice in a row. The same listen-before-talk philosophy now appears in unlicensed LTE and 5G-NR-U to coexist politely with Wi-Fi in the same bands.
DIFS, SIFS, and the Backoff Equation
E[backoff] = CW / 2 slots, where each slot = 9 μs (OFDM)
Binary exponential contention window:
CWi = min( 2i × (CWmin + 1) − 1, CWmax )
with CWmin = 15, CWmax = 1023, i = retry number
Total access time before a frame:
Taccess = DIFS + (backoff × SlotTime)
DIFS = SIFS + 2 × SlotTime ≈ 16 μs + 18 μs = 34 μs
Where CW = contention window in slots, SIFS = 16 μs and SlotTime = 9 μs for 802.11a/g/n/ac. Example: at the third retry CW = 127, so the mean backoff ≈ 63.5 slots ≈ 572 μs before transmission.
Access Method Comparison
| Parameter | CSMA/CA (Wi-Fi) | CSMA/CD (Ethernet) | TDMA (cellular) | Pure ALOHA |
|---|---|---|---|---|
| Collision handling | Avoid (backoff + ACK) | Detect + abort | Scheduled slots | Retransmit on loss |
| Duplex / medium | Half-duplex radio | Wired bus / switch | Time-divided RF | Shared RF |
| Coordination | Distributed (DCF) | Distributed | Central scheduler | None |
| Max efficiency | ~50 to 70% | ~60 to 90% | > 90% | ~18% |
| Latency at low load | Low (microseconds) | Very low | Slot-bounded | Low |
| Typical use | 802.11 a/b/g/n/ac/ax | 10/100/1000BASE-T | GSM, LTE uplink | Early packet radio |
Frequently Asked Questions
How does CSMA/CA differ from CSMA/CD used in Ethernet?
CSMA/CD relies on a transmitter listening while sending to detect a collision on the wire and abort. A radio cannot do this: its own transmit signal is roughly 60 to 100 dB stronger than a distant station at the receiver, so the receiver is desensitized and cannot hear a colliding packet. Wi-Fi instead avoids collisions, sensing the channel idle for a DIFS and then counting down a random backoff, and confirms success with an explicit ACK. CSMA/CA spends overhead preventing collisions, while CSMA/CD spends it recovering from them.
What is the contention window and how does binary exponential backoff work?
After the medium is idle for a DIFS, a station picks a random backoff uniformly from [0, CW] in 9 microsecond slots, decrements it each idle slot, freezes it when the medium is busy, and transmits at zero. CW starts at CWmin (15 for the default OFDM access category) and doubles on each retransmission (15, 31, 63, 127 up to CWmax of 1023). Doubling after a failed attempt spreads out retries so colliding stations are unlikely to pick the same slot again.
When should RTS/CTS be enabled and what is the hidden-node problem?
The hidden-node problem occurs when two stations can both reach the access point but cannot sense each other, so carrier sensing fails and their packets collide at the AP. RTS/CTS solves it: the sender transmits a short Request to Send, the AP replies with a Clear to Send heard by all nearby stations, and that CTS reserves the channel via the Network Allocation Vector. Because the handshake adds latency, RTS/CTS is usually enabled only above an RTS threshold (often 256 to 2347 bytes) so the overhead protects larger payloads.