Contention Window
How the Backoff Window Governs Shared-Channel Access
When an 802.11 station has a frame to send, it first senses the channel. If the medium has been idle for an AIFS or DIFS interval, the station does not transmit immediately; instead it selects a random integer from the interval [0, CW], where CW is the current contention window size, and loads that value into a backoff counter. The counter decrements by one for every idle slot time observed. If another station begins transmitting, the counter freezes and resumes only after the medium is again idle for the required sensing interval. The station transmits when its counter reaches zero. This randomization is the core collision-avoidance trick: two stations contending at the same moment are unlikely to choose the same backoff value, so one wins the slot and the other defers.
The window is dynamic. It starts at CWmin (15 slots for best-effort OFDM traffic). When a transmission is not acknowledged, the station assumes a collision and grows the window through binary exponential backoff, roughly doubling it on each retry up to CWmax = 1023 slots. Because the backoff counter is uniform over a larger range, the probability that two backlogged stations collide again drops with each doubling. A successful frame exchange resets the window to CWmin, so a lightly loaded network keeps access latency low, while a congested one automatically spreads stations out over a wider time span. The cost of that stability is throughput: at CW = 1023 the average backoff approaches 4.6 ms, far larger than the airtime of a single frame at high data rates, so the listen-before-talk overhead, not the payload, dominates.
Slot time ties the abstract window to real microseconds. A modern OFDM PHY (802.11a/g/n/ac/ax) uses a 9 μs slot; legacy 802.11b DSSS used 20 μs. Average backoff is simply the mean slot count times the slot time, so the same window value translates to longer deferral on older PHYs. This is why mixed-mode networks that must remain backward compatible with 802.11b suffer disproportionately under contention.
Binary Exponential Backoff and Slot Timing
backoff = Uniform{0, 1, …, CW}, mean ≈ CW / 2
Window growth after a failed retry r:
CWr = min( 2r × (CWmin + 1) − 1, CWmax )
Average backoff time:
Tbo ≈ (CW / 2) × Tslot (Tslot = 9 μs for OFDM)
Where CWmin and CWmax are the window bounds in slots and r is the retry index (r = 0 at first attempt). Example: AC_BE with CWmin = 15 gives Tbo ≈ 7.5 × 9 μs = 67.5 μs on the first try; at CW = 1023, Tbo ≈ 511.5 × 9 μs ≈ 4.6 ms.
Contention Window Values by Access Category
| Access Category | Traffic Type | CWmin (slots) | CWmax (slots) | AIFSN | Mean First Backoff |
|---|---|---|---|---|---|
| AC_VO | Voice | 3 | 7 | 2 | ~13.5 μs |
| AC_VI | Video | 7 | 15 | 2 | ~31.5 μs |
| AC_BE | Best effort | 15 | 1023 | 3 | ~67.5 μs |
| AC_BK | Background | 15 | 1023 | 7 | ~67.5 μs |
| Legacy DCF | All (no QoS) | 15 or 31 | 1023 | DIFS | ~67.5 to 139.5 μs |
Frequently Asked Questions
What are the default CWmin and CWmax values in 802.11?
Legacy DCF on OFDM PHYs (802.11a/g/n/ac/ax) uses CWmin = 15 and CWmax = 1023 slots (aCWmin = 15); the older DSSS/ERP PHYs use CWmin = 31 with a 20 μs slot. Under EDCA each access category differs: voice uses CWmin = 3, CWmax = 7; video uses 7 and 15; best-effort and background use 15 or 31 up to 1023. Smaller windows give voice and video statistically shorter backoffs and higher access priority. The counter is drawn uniformly from [0, CW], with each slot equal to 9 μs on OFDM.
How does binary exponential backoff change the window after a collision?
Each unacknowledged transmission roughly doubles the window: CWnew = 2 × (CWold + 1) − 1, capped at CWmax. From CWmin = 15 the sequence is 15, 31, 63, 127, 255, 511, 1023, then it holds. Doubling roughly halves the chance that two backlogged stations pick the same slot. A successful frame resets CW to CWmin; reaching the retry limit (often 7) discards the frame and also resets the window.
How do you convert a contention window into an average backoff time?
The counter is uniform over [0, CW], so its mean is CW / 2 slots. Multiply by the slot time: on 802.11ax (9 μs slots), CWmin = 15 gives 7.5 × 9 = 67.5 μs, while CW = 1023 gives 511.5 × 9 ≈ 4.6 ms, which is why congestion sharply lowers throughput. Total deferral also adds the AIFS or DIFS sensing interval and any backoff frozen while the medium was busy.