CSMA/CA MAC Protocol
The Fundamental Challenge of Unlicensed Spectrum
Unlike cellular systems where a central scheduler coordinates all transmissions, Wi-Fi operates in unlicensed spectrum where any device may transmit at any time. The MAC protocol must therefore resolve contention distributedly, without a coordinator, while being fair to all stations and robust to the hidden node problem. The 802.11 Distributed Coordination Function (DCF) uses Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) — a protocol whose throughput characteristics are fundamentally different from the scheduled access of cellular systems. Understanding CSMA/CA is essential for analysing Wi-Fi performance in dense deployments.
CSMA/CA Timing Diagram
Historical Note: From ALOHA to CSMA/CA
1970s--2000sThe random access lineage begins with the ALOHA protocol (Norman Abramson, University of Hawaii, 1970), which allowed terminals to transmit at will and retransmit after collisions. Carrier sensing (CSMA) was added by Leonard Kleinrock and Fouad Tobagi at UCLA in 1975, dramatically improving throughput by having stations listen before transmitting. The collision avoidance variant (CSMA/CA) was developed specifically for wireless networks because a wireless transceiver cannot detect collisions during transmission (unlike Ethernet's CSMA/CD). Giuseppe Bianchi's 2000 Markov chain analysis provided the first tractable model for 802.11 DCF throughput, enabling rigorous protocol optimisation.
Definition: Distributed Coordination Function (DCF)
Distributed Coordination Function (DCF)
The DCF is the fundamental MAC access mechanism in 802.11, based on CSMA/CA with binary exponential backoff:
Basic access:
- A station (STA) with a frame to transmit senses the channel.
- If the channel is idle for a duration DIFS (DCF Interframe Space), the STA transmits.
- If the channel is busy, the STA defers and enters backoff:
- Draw a random backoff counter where is the contention window.
- Decrement for each idle slot time () after DIFS.
- Freeze when the channel becomes busy; resume after next DIFS.
- Transmit when .
- After successful transmission, the receiver sends an ACK after SIFS.
- If no ACK is received (collision), double the contention window: , and repeat from step 3.
- After a successful transmission, reset .
Timing parameters (802.11ax, 5 GHz):
- Slot time s
- SIFS s
- DIFS s
- ,
CSMA/CA uses collision avoidance (backoff before transmission) rather than collision detection (as in Ethernet CSMA/CD). In wireless, a transmitting station cannot simultaneously listen for collisions because the transmitted signal overwhelms the receiver.
Definition: Enhanced Distributed Channel Access (EDCA)
Enhanced Distributed Channel Access (EDCA)
EDCA (introduced in 802.11e, mandatory since 802.11n) provides QoS differentiation by defining four Access Categories (ACs):
| AC | Priority | AIFSN | TXOP limit | ||
|---|---|---|---|---|---|
| AC_VO (Voice) | Highest | 2 | 4 | 8 | 2.080 ms |
| AC_VI (Video) | High | 2 | 8 | 16 | 4.096 ms |
| AC_BE (Best Effort) | Normal | 3 | 16 | 1024 | 0 |
| AC_BK (Background) | Low | 7 | 16 | 1024 | 0 |
Each AC has its own backoff entity with a different Arbitration IFS Number (AIFSN): . Higher-priority ACs use shorter AIFS and smaller contention windows, giving them statistical priority. The TXOP (Transmit Opportunity) allows a station that wins channel access to transmit multiple frames back-to-back.
Internal collisions (two ACs in the same STA reaching simultaneously) are resolved locally by granting access to the higher-priority AC and treating the lower-priority AC as if it experienced a collision.
Definition: RTS/CTS Handshake
RTS/CTS Handshake
The RTS/CTS (Request to Send / Clear to Send) mechanism mitigates the hidden node problem:
- Before transmitting data, the sender transmits a short RTS frame.
- The receiver replies with CTS after SIFS.
- All stations that hear either RTS or CTS set their Network Allocation Vector (NAV) to defer for the indicated duration.
- The sender transmits the data frame, followed by ACK.
Overhead analysis: RTS (20 bytes) + CTS (14 bytes) + 2 SIFS adds 60 s of overhead. This is worthwhile only when the data frame duration exceeds the RTS/CTS overhead, typically for frames bytes. The RTS threshold parameter controls when RTS/CTS is used.
RTS/CTS does not completely solve the hidden node problem in all geometries. If a hidden node is outside the range of both the sender and receiver, it cannot hear RTS or CTS and will not defer.
Theorem: Bianchi Saturation Throughput Model
Consider stations operating under DCF with minimum contention window and maximum backoff stage (so ). Under saturation (every station always has a frame to transmit), the normalised throughput is:
where:
- is the probability that at least one station transmits in a slot
- is the probability of successful transmission given a transmission occurs
- is the per-station transmission probability, obtained from:
- = successful transmission duration (data + SIFS + ACK + DIFS)
- = collision duration (data + ACK timeout + DIFS)
- = average payload length
- = slot time
The system is solved by fixed-point iteration.
Each station transmits with probability in any given slot. A collision occurs when two or more stations transmit simultaneously. The key insight is that from any single station's perspective, the collision probability is constant across slots (because all other stations are statistically identical in saturation). This memoryless property makes the Markov chain model tractable.
Markov chain for backoff
Model the backoff state of a single station as a 2D Markov chain where is the backoff stage and is the backoff counter at stage (with ).
Transition probabilities:
- Decrement counter: for (in idle slots).
- Collision at : for .
- Success at : .
- New counter after transition: uniform over .
Stationary distribution
Let be the stationary probability of state . From the chain structure:
The transmission probability (being in any state with ) is:
Normalisation yields the expression for in terms of and .
Fixed-point equation
The collision probability seen by a tagged station is the probability that at least one of the other stations transmits in the same slot:
Combined with the expression for , this gives a pair of equations solved by fixed-point iteration: start with , compute , update , and repeat until convergence.
Throughput derivation
Each virtual slot is one of three types:
- Idle (probability , duration )
- Success (probability , duration )
- Collision (probability , duration )
The throughput is the expected payload transmitted per unit time:
CSMA/CA Binary Exponential Backoff Procedure
CSMA/CA Timing Diagram
Visualise the CSMA/CA contention process for multiple stations. The plot shows the backoff countdown, DIFS/SIFS timing, and collision events over time. Adjust the number of stations to observe how collision probability increases. Changing the contention window demonstrates the trade-off between collision probability and idle time overhead.
Parameters
Example: Saturation Throughput for 10 Stations
Compute the saturation throughput for 10 802.11ax stations with:
- , (so )
- Payload bytes, 802.11ax MCS 7 (86 Mbps PHY rate)
- s, SIFS s, DIFS s
Frame durations
Data frame: preamble (40 s for 802.11ax) + s. ACK: preamble + 14 bytes s.
s.
s.
Solve fixed-point equations
Starting with :
Iterate: , ,
Convergence: , .
Throughput
. .
Numerator: bits. Denominator: s.
Mbps.
The MAC efficiency is %. More than half the PHY capacity is consumed by overhead and contention.
Quick Check
In the Bianchi model, what happens to the saturation throughput as the number of contending stations increases?
Throughput increases linearly because more stations contribute data
Throughput remains constant because the protocol adapts the contention window
Throughput decreases because the collision probability increases faster than the contention window grows
Throughput increases up to a point then drops to zero
As increases, the collision probability grows. While the binary exponential backoff increases after collisions, it cannot fully compensate: the throughput decreases monotonically with (for fixed ). The throughput does not drop to zero but approaches a positive limit that depends on and the slot timing parameters.
Wi-Fi MAC Overhead in Practice
The gap between PHY rate and application throughput is dominated by MAC-layer overhead:
- Contention overhead: DIFS (34 s) + average backoff (72 s at ) per frame = 106 s wasted before every transmission.
- Preamble overhead: 802.11ax preamble is 40--100 s depending on the number of spatial streams. For short data frames, the preamble can exceed the data duration.
- ACK overhead: SIFS (16 s) + ACK (44 s) per frame.
- Aggregation: A-MPDU aggregation (concatenating multiple frames into one TXOP) is essential for efficiency. Without aggregation, 802.11ax MAC efficiency is 30--40%; with A-MPDU aggregation of 64 frames, it reaches 75--85%.
- Block ACK: Replaces individual ACKs for aggregated frames, using a bitmap to indicate which sub-frames were received.
In dense deployments with many short-packet IoT devices, the per-frame overhead dominates and OFDMA (Section 25.3) provides a significant efficiency improvement.
- •
MAC efficiency without aggregation: 30-40% of PHY rate
- •
A-MPDU aggregation raises efficiency to 75-85%
- •
802.11ax preamble: 40-100 μs (comparable to short data frames)
Common Mistake: The Bianchi Model Assumes Saturation
Mistake:
Using the Bianchi saturation throughput formula to predict throughput in a lightly loaded network.
Correction:
The Bianchi model assumes every station always has a frame to transmit (saturation). In practice, most Wi-Fi networks operate well below saturation, where throughput scales linearly with load and the collision probability is much lower than predicted. For non-saturated analysis, use extensions of the Bianchi model that account for finite arrival rates (e.g., Medepalli and Tobagi, 2006).
Wi-Fi vs. Cellular: Design Philosophy Comparison
| Aspect | Wi-Fi (802.11) | Cellular (4G/5G) |
|---|---|---|
| Spectrum | Unlicensed (2.4/5/6 GHz) | Licensed (sub-6 GHz, mmWave) |
| MAC access | Contention-based (CSMA/CA) | Scheduled (centralised) |
| QoS guarantee | Best-effort (EDCA provides statistical priority) | Guaranteed (per-bearer QoS) |
| Multi-user | OFDMA (802.11ax+), MU-MIMO | OFDMA (always), MU-MIMO |
| Coverage | 20--50 m indoor | 200 m -- 30 km |
| Handover | Client-driven (slow) | Network-controlled (fast) |
| Typical latency | 5--20 ms (single link) | 1--10 ms (scheduled) |
| Deployment cost | Low (consumer APs) | High (licensed spectrum + infrastructure) |
Distributed Coordination Function (DCF)
The fundamental contention-based MAC access mechanism in IEEE 802.11, using CSMA/CA with binary exponential backoff. Stations sense the channel, defer if busy, and transmit after a random backoff period.
Related: Enhanced Distributed Channel Access (EDCA), Network Allocation Vector (NAV)
Enhanced Distributed Channel Access (EDCA)
A QoS extension to DCF that defines four access categories (voice, video, best effort, background) with different contention parameters, providing statistical priority for delay-sensitive traffic.