Loading learning content...
In wired Ethernet networks, stations detect collisions by monitoring the voltage levels on the shared copper medium while transmitting. When two stations transmit simultaneously, the resulting signal amplitude exceeds normal levels, and the collision is detected almost instantaneously. The stations then back off and retransmit later.
But wireless networks operate in a fundamentally different physical reality. The electromagnetic spectrum is a shared, invisible, and inherently unreliable medium. Signals attenuate dramatically with distance. Obstacles cause multipath fading. Two stations that can both reach an access point may be completely unaware of each other's existence.
This reality demanded an entirely new approach to medium access control—one that avoids collisions before they occur rather than detecting them after the fact. That protocol is CSMA/CA: Carrier Sense Multiple Access with Collision Avoidance, and it forms the backbone of every IEEE 802.11 wireless LAN in existence today.
By the end of this page, you will understand the fundamental principles of collision avoidance, why it's necessary in wireless environments, and how the basic CSMA/CA mechanism operates. You'll appreciate the engineering constraints that shaped this protocol and recognize its critical role in modern wireless communication.
To understand collision avoidance, we must first appreciate the physical characteristics that make wireless communication fundamentally different from wired transmission. These aren't minor differences—they're paradigm-shifting constraints that invalidate the assumptions underlying wired protocols.
In wired networks, if Station A can hear Station B, then B can also hear A (symmetric medium). In wireless, the medium is fundamentally asymmetric—transmission range, reception range, and interference range are all different, and they change dynamically with environmental conditions.
The Antenna Power Dilemma:
Consider a typical Wi-Fi radio transmitting at 100 milliwatts (20 dBm). The signal power received by a station 10 meters away might be 1 microwatt (-30 dBm). At 50 meters, it might drop to 10 nanowatts (-50 dBm). Meanwhile, the transmitting station's own signal at the antenna is 100 million times stronger than any signal it's trying to receive.
This 140+ dB difference makes it physically impossible to detect incoming signals while transmitting. There simply isn't enough dynamic range in practical receivers to isolate a weak incoming signal from the transmitter's overwhelming output. Even with sophisticated filtering, the transmitted signal would saturate the receiver, blinding it completely.
Collision avoidance represents a fundamental philosophical shift in medium access strategy. Instead of optimistically transmitting and reacting to collisions (the CSMA/CD approach), CSMA/CA takes a pessimistic stance: assume that collisions are likely and take proactive steps to minimize their occurrence.
This shift has profound implications for protocol design:
The Cost of Collisions:
In CSMA/CD, when a collision is detected (typically within the first 64 bytes), the transmitting station sends a brief jam signal and aborts. The collision wastes only a fraction of the frame transmission time.
In wireless networks, without collision detection, the entire frame is transmitted before the sender realizes a collision occurred (via missing acknowledgment). For large frames, this can waste enormous channel time:
Every collision wastes the complete transmission time for all colliding stations, plus the time waiting for missing acknowledgments, plus retransmission time. This makes collision prevention far more valuable in wireless than in wired networks.
The engineering wisdom embedded in CSMA/CA: when you cannot detect a problem as it occurs, invest heavily in preventing it. The random backoff before transmission, interframe spacings, and acknowledgment mechanisms all serve this preventive philosophy.
The fundamental CSMA/CA algorithm combines carrier sensing with mandatory waiting periods and explicit acknowledgments. Let's trace through the complete process step by step:
The random backoff is essential for collision avoidance. If multiple stations are waiting for a busy medium to become idle, they would all begin transmitting simultaneously the moment it does—causing certain collision. The random backoff spreads their transmission attempts across time, dramatically reducing collision probability.
Physical Carrier Sensing:
Physical carrier sensing operates at the RF level. The wireless interface continuously monitors the received signal strength and compares it against a threshold called the Clear Channel Assessment (CCA) threshold, typically around -82 dBm for 20 MHz channels.
Virtual Carrier Sensing:
Virtual carrier sensing uses the Network Allocation Vector (NAV), a timer that indicates how long the medium will be busy based on duration information embedded in frame headers. When a station hears any frame (even if not addressed to it), it extracts the Duration field and sets its NAV accordingly.
CSMA/CA employs three coordinated mechanisms to minimize collision probability. Each addresses a different aspect of the collision problem, and together they form a robust collision avoidance system:
| Mechanism | Purpose | Implementation | What It Prevents |
|---|---|---|---|
| Interframe Spacing (IFS) | Prioritization and settling time | Mandatory wait after channel idle before contention | Immediate contention after busy period; priority inversion |
| Random Backoff | Contention resolution | Random slot countdown from contention window | Synchronized simultaneous transmission from waiting stations |
| Positive ACK | Collision detection substitute | Recipient sends ACK after successful reception | Undetected frame loss; silent transmission failures |
How These Mechanisms Work Together:
Imagine three stations (A, B, C) all have data to send while station D is transmitting:
During D's transmission: A, B, and C all sense the medium busy and freeze their backoff timers (or haven't started them yet if they just received frames to send)
D finishes transmission: The medium becomes idle. All stations detect this.
IFS wait period: All three stations must wait for DIFS (DCF Interframe Space) before they can contend. During this time, the medium is protected for any SIFS-priority traffic (like the ACK for D's frame).
Random backoff begins: After DIFS, each station selects a random backoff from its contention window:
Backoff countdown: Slots count down while medium stays idle. C reaches zero first.
C transmits: A and B both detect C's transmission, freeze their timers (A at 2, B at 5).
After C's frame and ACK: Medium idle again. A and B wait for DIFS, then resume countdown.
A transmits: A reaches zero before B (only 2 slots vs 5 remaining slots).
This elegant choreography ensures that even when multiple stations are waiting, they transmit one at a time with high probability.
With a minimum contention window of 32 slots, two stations randomly selecting backoff values have only a 1/32 ≈ 3.1% chance of selecting the same slot. With three stations, the probability that at least two select the same slot is still only about 9.2%. The random backoff mechanism is remarkably effective.
IEEE 802.11 employs two complementary carrier sensing mechanisms that work in parallel. Understanding both is crucial for grasping how CSMA/CA truly operates in practice.
The Network Allocation Vector (NAV) in Detail:
Every IEEE 802.11 frame contains a Duration/ID field that specifies how long the medium will be occupied. When a station receives (or overhears) a frame, it performs the following:
if (received_frame.Duration > NAV):
NAV = received_frame.Duration
else:
# NAV unchanged - existing reservation is longer
The station considers the medium busy whenever:
NAV Duration Calculation:
For a simple data frame exchange, the transmitter sets Duration to cover:
For RTS/CTS exchanges, the Duration covers:
This allows stations that may not hear the data frame (hidden terminals) to respect the reservation by hearing the CTS or ACK.
Physical sensing is fast and catches all transmissions in range. Virtual sensing provides reservation information that propagates beyond physical range through frame headers. Together, they create a robust channel access control system that works even when stations cannot directly hear each other.
CSMA/CA depends on precise timing at the microsecond level. Every station must agree on when a transmission ends, when the medium becomes idle, and when contention can begin. This synchronization happens without explicit coordination—stations independently measure time and reach the same conclusions.
Slot Time Fundamentals:
The slot time is the fundamental unit of time in 802.11 contention. It represents:
| Standard | Frequency | Slot Time |
|---|---|---|
| 802.11b | 2.4 GHz | 20 μs |
| 802.11a | 5 GHz | 9 μs |
| 802.11g | 2.4 GHz | 9 μs (short), 20 μs (long) |
| 802.11n | 2.4/5 GHz | 9 or 20 μs |
| 802.11ac | 5 GHz | 9 μs |
| 802.11ax | 2.4/5/6 GHz | 9 μs |
Why Slot Time Matters:
The slot time defines the granularity of collision avoidance. If two stations have backoff values differing by at least one slot, they will not collide—the first station's transmission will be detected before the second station's backoff expires.
Smaller slot times (like 9 μs in 802.11a) allow faster contention resolution and higher efficiency, but require faster hardware. The 20 μs slot time in 802.11b reflected the capabilities of early 2.4 GHz hardware.
When 802.11g networks operate with legacy 802.11b devices present, the access point may fall back to the longer 20 μs slot time for compatibility. This protection mechanism reduces overall network efficiency but ensures all devices can fairly contend for the medium.
CSMA/CA imposes overhead that reduces the effective throughput compared to the raw physical layer rate. Understanding these overheads is essential for network capacity planning and performance optimization.
Efficiency Calculation Example (802.11a, 54 Mbps):
Transmitting a 1500-byte payload:
| Component | Duration |
|---|---|
| DIFS | 34 μs |
| Average Backoff (15.5 slots) | 140 μs |
| Preamble + PLCP Header | 20 μs |
| MAC Header (24 bytes) | 3.6 μs |
| Data (1500 bytes) at 54 Mbps | 222 μs |
| SIFS | 16 μs |
| ACK Preamble + ACK | 24 μs |
| Total | 459.6 μs |
Effective Throughput:
This demonstrates why wireless networks never achieve their advertised speeds—the protocol overhead is substantial, and it's an unavoidable cost of the collision avoidance mechanism.
For small frames (like VoIP packets or TCP ACKs), the fixed overhead dominates. A 100-byte VoIP packet at 54 Mbps achieves only about 6 Mbps effective throughput because DIFS, backoff, and ACK overhead remain constant regardless of frame size. Frame aggregation in 802.11n and later addresses this inefficiency.
We've established the foundation of collision avoidance in wireless networks. Let's consolidate the key concepts:
What's Next:
Now that we understand the fundamental philosophy and basic mechanics of collision avoidance, the next page explores why CSMA/CD cannot work in wireless environments. We'll examine the specific technical reasons that made collision detection impractical, solidifying your understanding of why 802.11 took a fundamentally different approach.
You now understand the fundamental principles of collision avoidance in wireless networks. You've learned why the wireless medium demands a different approach from wired Ethernet, how CSMA/CA combines carrier sensing with random backoff and acknowledgments, and the efficiency implications of this design. Next, we'll dive deeper into why CSMA/CD fails in wireless.