DCF / EDCA CHANNEL ACCESS - the CSMA/CA algorithm step by step - IEEE 802.11-2020 §10.3, §10.237 rows#
| Step | Mechanism | Deep Notes |
|---|---|---|
| 1. Carrier sense (CCA) | Physical CS: energy detect (≥ -62 dBm any signal @20 MHz) OR preamble detect (≥ -82 dBm decodable 802.11). Virtual CS: NAV timer > 0 counts as busy. | Both must show idle. ED threshold is 20 dB laxer than PD - non-Wi-Fi interference must be strong to block, Wi-Fi only needs -82. |
| 2. Wait IFS | Medium idle for DIFS (legacy) or AIFS[AC] (EDCA) after last busy. DIFS = SIFS + 2×slot = 34 µs @5 GHz. | Higher-priority AC = shorter AIFS = statistically wins (see EDCA table on Tool Engine sheet). |
| 3. Random backoff | Draw uniform integer [0, CW]; CW starts at CWmin. Decrement counter every idle slot (9 µs); FREEZE while busy; resume after idle IFS again. | Freezing (not redrawing) gives long-waiting frames statistical priority - fairness mechanism. |
| 4. Transmit at 0 | When counter hits 0 → transmit immediately. | Two STAs reaching 0 in same slot = collision - nothing in DCF detects it in the air; discovered by missing ACK. |
| 5. ACK / BA wait | Unicast: receiver replies ACK after SIFS (16 µs). No ACK within ACKtimeout ≈ SIFS+slot+preamble → assume loss. | SIFS < slot ensures ACK always wins the medium over new contenders. |
| 6. Retry & CW doubling | On failure: retry counter++, CW = (CW+1)×2-1 up to CWmax (1023). Success or drop: CW resets to CWmin. | Retry bit set on retransmits. Exceed dot11ShortRetryLimit (7) / LongRetryLimit (4) → frame dropped, MAC reports failure up. |
| 7. Post-TX | After success, if more queued: new backoff even if medium idle (post-backoff) - prevents channel capture. | - |
PROTECTION & NAV MECHANISMS6 rows#
| Step | Mechanism | Deep Notes |
|---|---|---|
| Mechanism | Operation | When / Why |
| RTS / CTS | TX sends RTS; RX answers CTS after SIFS; both carry Duration covering whole exchange → all hearers set NAV. | Solves hidden node (nodes hear CTS even if not RTS). Cost ~100+ µs overhead - enable when RTSFailure/hidden-node symptoms appear. Threshold default 2347 B = effectively off. |
| CTS-to-Self | TX sends CTS addressed to itself with protective Duration. | Cheaper than RTS/CTS but NO hidden-node protection (only nodes that hear the sender). Used for 802.11g ERP protection. |
| NAV (virtual carrier sense) | Duration field of every frame arms a countdown timer in all third-party receivers; medium treated busy until 0. | TXOP holder sets NAV once for a whole burst. NAV inspection in captures explains "idle air, no TX" cases. |
| MU-RTS / CTS (11ax) | AP sends MU-RTS Trigger to multiple STAs; they respond simultaneous CTS. | Protects OFDMA/MU-MIMO TXOPs across the whole BSS + OBSS. |
| L-SIG TXOP protection | Legacy L-SIG Length spoofed so legacy STAs compute busy time = full HT/HE exchange. | Preamble-level protection with zero extra frames. |
WORKED AIRTIME EXAMPLE + ANALYTICAL MODELS7 rows#
| Step | Mechanism | Deep Notes |
|---|---|---|
| Item | Calculation | Insight |
| Scenario | 1500-byte frame, 802.11ax, 80 MHz, MCS 9 (256-QAM 5/6), 2 SS, 0.8 µs GI → PHY 960.7 Mbps. 5 GHz timing. | |
| Preamble | HE SU: L-STF 8 + L-LTF 8 + L-SIG 4 + RL-SIG 4 + HE-SIG-A 8 + HE-STF 4 + HE-LTF (2 streams, 2×LTF: 2×7.2 = 14.4) ≈ 50 µs. | Per-field durations: see PPDU Frame Formats sheet. |
| Data time | Bits per symbol = 980 tones × 8 bits × 5/6 coding × 2 SS = 13,066. Payload 1500 B ≈ 12,000 bits (+SERVICE/tail) → N_sym = 1 → data = 13.6 µs. | Per-symbol bits = N_data_tones × bits/symbol × coding × NSS. |
| Full exchange | AIFS[BE](43) + avg backoff(7.5 slots = 67.5) + preamble(50) + data(13.6) + SIFS(16) + BlockAck(~31 at 24 Mbps legacy) ≈ 221 µs → 12,000 bits ÷ 221 µs ≈ 54 Mbps effective for a single frame on a 960 Mbps PHY! | THE aggregation argument: per-frame overhead dwarfs data time at high MCS. A-MPDU of 64 frames amortizes contention+preamble once → efficiency jumps to 80-90%. See Aggregation & Block Ack sheet. |
| Bianchi saturation model | Bianchi (2000): per-STA TX probability τ = 2(1-2p)/((1-2p)(W+1)+pW(1-(2p)^m)); collision prob p = 1-(1-τ)^(n-1). Solve simultaneously → saturation throughput. | PhD-level reference model for DCF capacity vs number of STAs. Predicts throughput collapse as n grows with small CW. |
| Airtime fairness | Per-STA airtime quantum scheduling (e.g. ath10k ATF, vendor implementations) prevents one slow legacy client consuming the cell. | A 1 Mbps client sending 1500 B uses ~12 ms - 500× a modern client. Airtime, not throughput, is the shared resource. |