The Failure of Wired MAC Protocols in Wireless Environments
The Medium Access Control (MAC) layer is fundamentally responsible for dictating exactly which node is permitted to transmit on a shared communication medium at any given millisecond. In traditional wired Ethernet networks, this is managed with relative simplicity using CSMA/CD (Carrier Sense Multiple Access with Collision Detection).
In CSMA/CD, a node physically listens to the copper wire. If the wire is silent (Carrier Sense), the node transmits. While transmitting, the node continues to monitor the voltage on the wire. If the voltage spikes abnormally, it indicates that another node transmitted simultaneously, causing a collision (Collision Detection). Both nodes instantly abort transmission, wait a random backoff time, and retry.
This protocol is highly efficient over copper. However, attempting to deploy CSMA/CD over a wireless radio link results in catastrophic failure due to the fundamental physics of electromagnetism:
- Half-Duplex Reality: Wireless radios are predominantly half-duplex. A radio antenna cannot transmit a massive blast of RF energy and simultaneously attempt to listen for a faint, distant signal on the exact same frequency. The transmitter’s massive power completely deafens its own receiver circuitry. Therefore, a wireless node cannot perform Collision Detection while it is actively transmitting. It only realizes a collision occurred after the transmission finishes, when the expected ACK packet fails to arrive.
- Extreme Signal Attenuation: RF signal power decays exponentially over distance (Free Space Path Loss). In a wired network, a collision causes a uniform voltage spike across the entire wire. In a wireless network, a collision might only occur at the exact physical location of the receiver. The transmitting nodes might be too far apart to physically hear each other, making carrier sensing useless.
These physical realities give rise to two catastrophic topological anomalies specific to wireless networks: the Hidden Terminal problem and the Exposed Terminal problem.
The Hidden Terminal Problem
The Hidden Terminal problem is the primary cause of massive, undetectable collisions in ad-hoc wireless networks.
The Scenario
Imagine three nodes deployed in a straight line: A, B, and C. Node B is located perfectly in the middle. Node A can hear Node B. Node C can hear Node B. However, because of distance or physical obstacles (like a wall), Node A and Node C cannot physically hear each other’s radio transmissions. They are “hidden” from one another.
Node A begins transmitting a large, 10-megabyte file to Node B. Halfway through the transfer, Node C decides it also wants to transmit data to Node B. Node C executes the carrier sense protocol; it listens to the channel. Because Node C is physically too far away to hear Node A’s ongoing transmission, Node C erroneously concludes that the channel is completely idle.
Node C begins blasting its data toward Node B. At the exact physical location of Node B’s antenna, the high-power signals from Node A and Node C arrive simultaneously and overlap. They destructively interfere, completely destroying the payload data from both nodes. This collision occurred despite both nodes following the CSMA rules perfectly.
The Exposed Terminal Problem
While the Hidden Terminal problem causes destructive collisions, the Exposed Terminal problem causes the exact opposite: catastrophic inefficiency and wasted bandwidth.
The Scenario
Imagine four nodes deployed in a straight line: A, B, C, and D. Node B wishes to transmit data to Node A. Simultaneously, Node C wishes to transmit data to Node D.
Node B begins its transmission to Node A. Node C, located nearby, executes its carrier sense protocol. Node C’s radio receiver physically hears the high-power transmission originating from Node B. Obeying the CSMA rules, Node C immediately defers its own transmission, assuming the channel is busy, and forces itself to remain silent.
However, this silence is entirely unnecessary. Node C’s intended receiver is Node D, which is located far away in the opposite direction. Furthermore, Node A (Node B’s receiver) is located far away from Node C. If Node C had ignored the CSMA rules and transmitted its data to Node D, the signal would have reached Node D perfectly. Furthermore, Node C’s signal would have attenuated so much over the distance to Node A that it would not have interfered with Node A’s reception. By strictly obeying carrier sense, Node C was “exposed” to a local transmission and unnecessarily starved itself of bandwidth, artificially capping the network’s throughput.
The 802.11 Solution: CSMA/CA and RTS/CTS
To mitigate these severe topological issues, the IEEE 802.11 (Wi-Fi) standard abandoned Collision Detection entirely and adopted CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance), augmented by a virtual carrier sensing mechanism called RTS/CTS.
Collision Avoidance via Random Backoff
In CSMA/CA, a node that wishes to transmit must listen to the channel. If the channel is idle for a mandatory Interframe Space (DIFS), the node does not transmit immediately (which would cause a collision if multiple nodes were waiting). Instead, it enters the Collision Avoidance phase.
The node generates a random number and initiates a Random Exponential Backoff timer. This timer counts down only while the physical channel is perfectly silent. If another node transmits, the timer freezes. When the timer finally hits zero, the node transmits its packet. Upon receiving the packet, the destination waits a very short period (SIFS) and fires back an Acknowledgment (ACK). If the ACK is not received, the sender assumes a collision occurred in the air, instantly doubles its random backoff window (exponential backoff), and tries again.
Mitigating Hidden Terminals with RTS/CTS
To solve the Hidden Terminal problem, 802.11 introduces a virtual reservation system using tiny control frames: Request-to-Send (RTS) and Clear-to-Send (CTS).
Revisiting the A-B-C scenario: Before transmitting the massive 10MB data payload, Node A sends a tiny, robust RTS frame to Node B. The RTS frame contains a duration field, specifying exactly how many microseconds the upcoming data transfer will require.
Node B receives the RTS and responds by broadcasting a CTS frame. The genius of the protocol lies here: Node C, which is hidden from Node A but close to Node B, physically hears this CTS frame.
Node C reads the duration field embedded within the CTS frame. Node C then updates its internal Network Allocation Vector (NAV). The NAV is a virtual timer. Even though Node C’s physical radio cannot hear Node A transmitting, the NAV timer mathematically forces Node C to remain completely silent for the entire duration specified in the CTS.
This virtual reservation effectively clears the airspace around the receiver (Node B), guaranteeing that Node A can transmit its massive payload without any risk of a hidden terminal collision from Node C. While RTS/CTS introduces a small amount of signaling overhead, it is absolutely essential for transmitting large packets reliably in ad-hoc networks.