How Wireless Closes the Loop: CSMA/CA and Its Limits

CS176C — Advanced Topics in Internet Computing

Arpit Gupta

2026-04-16

Part 1: How Wireless Closes the Loop

CSMA/CA, the Distributed Coordination Function (DCF), and the Failure Modes of Local Sensing

Where We Left Off

Last lecture: the assumption cascade hit a physics wall.

  • ALOHA → Slotted ALOHA → CSMA → CSMA/CD: each generation added shared state, shrank the vulnerable window
  • Wireless can’t do CSMA/CD — own signal at the antenna is 50 dB stronger than any incoming signal → receiver is deaf while transmitting
  • Generative exercise: when \(\tau \gg T\), sensing is useless → satellite reaches for TDMA (centralized), underwater is stuck near ALOHA (no controller)

Today’s question: WiFi sits between those extremes. \(\tau \ll T\) on a LAN, so sensing works. But CD doesn’t. How does wireless close the feedback loop without it?

Then: how that loop scales under density — and what finally broke it.

CSMA/CA: The Principle

L5 left you here: you can listen before transmitting, but you cannot listen during. So you never directly observe a collision.

30 seconds with your neighbor: what’s the simplest protocol that still closes the loop?

Three steps, nothing more:

  1. Sense before transmitting — if busy, wait; if idle, go.
  2. Transmit the whole frame (you can’t detect mid-frame anyway — so send it all).
  3. Wait for an acknowledgment (ACK) from the receiver. No ACK → assume collision → wait a random time, retry.

That’s it. This is CSMA/CA — Carrier Sense Multiple Access with Collision Avoidance.

The loop closes at the receiver, not the transmitter. The ACK is the only signal available.

How Long Do We Wait for the ACK?

You transmit a frame. You listen for an ACK. How long do you wait before giving up?

The wait must cover:

  • Frame TX time: \(T_{\text{frame}} = \frac{\text{frame size}}{\text{bit rate}}\)
  • ACK TX time: \(T_{\text{ACK}} = \frac{\text{ACK size}}{\text{bit rate}}\)
  • Radio turnaround + margin: tens of µs

. . .

At 802.11b’s 1 Mbps basic rate, 1500-byte frame:

\[T_{\text{frame}} = \frac{1500 \times 8 \text{ bits}}{10^6 \text{ bits/s}} = 12 \text{ ms}\]

\[T_{\text{ACK}} = \frac{14 \times 8 \text{ bits}}{10^6 \text{ bits/s}} \approx 0.1 \text{ ms}\]

Per-attempt loop: ≈ 12 ms — dominated by frame TX.

Compare to CSMA/CD on Ethernet:

  • Loop closes in 51 µs (propagation round-trip on max segment)
  • Ethernet is propagation-bounded
  • CSMA/CA is frame-time-bounded

. . .

Ratio: 12 ms / 51 µs ≈ ~250× slower per attempt.

. . .

Why the gap? Not propagation delay (WiFi prop. delay is microseconds at 100 m range). The sender must finish the whole frame before the receiver can even start an ACK — L5’s physics made that unavoidable.

This is the core fragility of CSMA/CA. Ethernet’s tight loop tolerates ~95% load. WiFi’s loose loop can’t — we’ll see the ceiling later in the lecture.

What Goes Wrong? CSMA/CA’s Four Challenges

You have CSMA/CA working. Now stress-test it. Turn to your neighbor — 2 minutes: what failure modes can you find?

Listed in the order history recognized them:

1. Hidden terminal (recognized 1975). L5’s environment-vs-measurement gap: station A senses “idle” at A’s antenna, but C (hidden from A) is transmitting to B. Collision at B’s receiver.

2. Backoff collisions repeat (addressed 1994, MACAW — “MACA for Wireless”). Two stations collide. Both retry. If they pick the same random wait, they collide again. How do you prevent cascading retries?

3. ACK is vulnerable to new attempts (addressed 1997, 802.11 DCF — Distributed Coordination Function). After a frame, the receiver sends ACK. But other stations were waiting too — they may try to transmit the moment the medium clears. ACK collides with a new-attempt frame.

4. Density collapse (quantified 2000, Bianchi). As \(n\) stations grow, the probability of two picking the same wait approaches 1. Even perfect random avoidance breaks down at scale.

Next: we’ll take each in turn, starting with the oldest — hidden terminals, 1975.

Tobagi & Kleinrock (1975): Discovering the Limits of CSMA

→ Addressing Challenge 1 (hidden terminal). Chronologically the oldest of the four — recognized in 1975, 15+ years before CSMA/CA as a principle.

The setting: UCLA’s Packet Radio Network (PRNET) experiments — applying Kleinrock’s CSMA to terrestrial radio. Throughput was much worse than the LAN model predicted.

Their diagnosis (“Packet Switching in Radio Channels, Part II”):

Hidden terminal — sensing too optimistic:

   A ←──range──► B ←──range──► C
   A and C cannot hear each other
   Both transmit to B → collide at B

A and C each sense “idle.” Both transmit. Frame destroyed at B. Neither learns why — only an ACK timeout.

Exposed terminal — sensing too conservative:

  A ←──range──► B    C ←──range──► D
                  ↑    ↑
                  └────┘   C hears B

C defers to B’s transmission to A. But C → D wouldn’t have hit B → A. Airtime lost.

Tobagi & Kleinrock’s framing: carrier sense at the transmitter is the wrong measurement. The collision is determined at the receiver. Until measurement reaches the receiver, no amount of backoff cleverness will close the gap.

Their Original Fix: Busy Tone (1975)

Tobagi & Kleinrock’s proposed solution: Move the measurement to the receiver — literally.

The Busy-Tone Multiple Access (BTMA) idea:

  • Allocate a second narrow channel (the “busy tone”)
  • Whenever a receiver is receiving a frame, it transmits a continuous tone on that channel
  • Every potential transmitter senses both the data channel and the busy-tone channel
  • If either is busy → defer

Walk through it: A wants to transmit to B. A senses the data channel (clean — can’t hear C) and the busy-tone channel. B is currently receiving from C → B is emitting the tone. A hears the tone → defers. Hidden terminal solved.

This is an elegant solution. Does it have any problems? — 30 seconds.

What it requires:

  • A second radio per station (cost, power, board area)
  • Dedicated spectrum for the tone channel
  • Receivers transmitting continuously during reception (power drain)
  • Half-duplex commodity radios couldn’t do “transmit tone while receiving data”

Excellent in theory; impractical for 1980s consumer hardware. The idea sat dormant for 15 years — until someone asked: can we get the same effect without the second radio?

Karn (1990): The Busy Tone, In-Band

→ Still addressing Challenge 1. Same problem Tobagi-Kleinrock identified 15 years earlier — a new implementation strategy.

The setting: Phil Karn, amateur packet radio (KA9Q). Hidden terminals were destroying his throughput. He had read Tobagi & Kleinrock — but commodity transceivers couldn’t do busy tone.

Karn’s question: Can we get the busy-tone effect without a second radio?

The reformulation: MACA — Multiple Access with Collision Avoidance (Karn, 1990). Replace the continuous tone with a brief control-frame exchange on the data channel itself.

  1. Transmitter sends short Request-to-Send (RTS) to receiver: “I want to send for \(D\) µs.”
  2. Receiver replies with Clear-to-Send (CTS), broadcast in all directions: “Go ahead — and everyone else, hold off for \(D\) µs.”
  3. The CTS plays the role of the busy tone — but only at the start of each frame, not continuously.

The conceptual mapping:

BTMA (1975) MACA (1990)
Continuous tone Brief CTS frame
Separate channel Same channel, in-band
Receiver always emits during RX Receiver emits at start of RX
Two radios needed Single radio, control frames

Same idea, in-band — at the cost of handshake overhead.

Karn’s name was deliberate: the “CA” in MACA originally meant the handshake itself — avoiding collisions by delegating measurement to the receiver, not the random-backoff “avoidance” that 802.11 later folded in.

MACA solves Challenge 1 (hidden terminal) — but what about the others? Turn to your neighbor — 30 seconds:

  • Challenge 2 revisited (backoff collisions repeat): two stations just collided in their handshakes. What stops them from colliding again on the retry?
  • Completing the CSMA/CA principle: MACA has no step-3 ACK after DATA. If DATA is lost to noise/fading, who notices?

MACAW (Bharghavan et al., 1994) — “MACA for Wireless”: fixes both.

  • MILD backoff (Multiplicative Increase, Linear Decrease) → Challenge 2 fix — adaptive window prevents cascading collisions and shares airtime fairly
  • Link-layer ACK after DATA → completes CSMA/CA’s step 3; µs-scale loss detection vs. TCP timeouts (seconds)
  • DS (Data Sending) frame → tells exposed terminals how long to defer

802.11 DCF (1997) inherits this structure, re-introduces physical carrier sensing by default, and swaps MILD for the simpler Binary Exponential Backoff (BEB) — still a Challenge 2 fix.

A Gap in the Handshake: What Stations Remember

→ Completing the Challenge 1 fix. RTS/CTS solves hidden terminal only if overhearing stations know when to defer.

The scenario from slide 10: A and B exchange RTS/CTS. Station C overhears the CTS.

Turn to your neighbor — 30 seconds. C can hear B but is hidden from A (that’s why RTS/CTS was needed). The CTS is ~100 µs, then the medium goes quiet from C’s perspective — A’s DATA frame is inaudible to C.

What stops C from transmitting during A’s DATA?

The answer must be memory, not sensing. C’s carrier sense will report idle right after CTS ends — but the channel is actually busy at B’s receiver for the full data duration.

The fix (built into the CTS):

  • CTS carries a Duration field: “I will be receiving for \(D\) µs.”
  • C stores \(D\) in a countdown timer — the Network Allocation Vector (NAV).
  • C defers until NAV expires, regardless of what its antenna hears.
A: [RTS|D=500µs]──────[DATA]────────
B:           [CTS|D=480µs]──────[ACK]
C: ─── hears CTS ──[NAV=480µs: defer]─
D: ─── hears RTS ──[NAV=500µs: defer]─

Two kinds of “channel busy” now coexist:

Kind Source Updated
Physical CS Antenna energy Continuously
Virtual CS (NAV) Overheard Duration field At handshake

A station defers if either says busy.

. . .

The conceptual shift: medium-occupancy state is no longer purely measured from physics. It is partly announced via the protocol and remembered locally as a timer.

A new kind of state — forward-looking, trust-based, and local to each station.

RTS/CTS: Tradeoffs and Why It’s Optional

Why RTS/CTS is expensive: it’s sent at the PHY’s basic rate (so every legacy client can decode it), not at the high data rate.

For 802.11g: basic rate = 6 Mbps, peak data rate = 54 Mbps. Control frames run 9× slower than the data frame they protect.

Handshake cost added per frame (RTS + SIFS + CTS + SIFS, at 802.11g):

  • RTS (20 B @ 6 Mbps + PHY header) ≈ 52 µs
  • CTS (14 B @ 6 Mbps + PHY header) ≈ 44 µs
  • 2 × SIFS = 32 µs
  • Total: ~130 µs added overhead before DATA can start

Compare to data airtime at 54 Mbps:

Frame size Data airtime Handshake / data ratio
50 B (TCP ACK) ~27 µs ~5× data
500 B ~94 µs ~1.4×
1500 B ~242 µs ~0.5×

For small frames, the handshake costs several times the payload. For large frames it’s a tax, not a killer.

Benefit: RTS/CTS shifts collisions to short control frames. A 20-byte RTS collision wastes ~52 µs; a 1500-byte data collision wastes ~242 µs + ACK timeout. Probability stays similar; cost-per-collision drops ~5×.

Limit: stations hidden from both TX and RX never hear the handshake. RTS/CTS extends the measurement radius from “what A hears” to “what A or B hears” — still not global.

Why 802.11 makes it optional: the cost-benefit flips with deployment density and frame size. Dense + large frames → enable. Sparse + small frames → disable. The protocol provides the mechanism; the deployer chooses the policy.

DCF (1997): Protocol-Level Enhancements

→ Addressing Challenges 2 and 3. 802.11 DCF layers three additions on top of CSMA/CA.

The receiver wants to ACK. A new-attempt station also wants to transmit. Both are watching the medium. How do you guarantee the ACK always wins?

Shorter wait = higher priority. Introduce two inter-frame spaces:

  • Short Interframe Space (SIFS) — 16 µs: ACK’s wait
  • DCF Interframe Space (DIFS) — 34 µs: new-attempt wait (DIFS = SIFS + 2·slot)

Challenge 3 fix. The ACK’s shorter wait guarantees it preempts any new attempt.

Two stations collide. Both retry at random. What prevents them from colliding again?

Grow the random range on every collision: Binary Exponential Backoff (BEB).

  • After collision: \(CW \leftarrow \min(2 \cdot CW, CW_{\max})\)
  • After success: \(CW \leftarrow CW_{\min}\)
  • \(CW_{\min} = 31\), \(CW_{\max} = 1023\)

Challenge 2 fix. Same mechanism as Ethernet’s 1976 BEB.

What sets the slot duration that the random backoff decrements in?

Propagation delay + radio turnaround + CCA detect — enough for any station to sense another’s transmission by the next slot boundary.

  • 802.11a/g: slot = 20 µs; 802.11b: 50 µs (slower PHY)
  • PHY-dependent; not a design parameter.

These are enhancements, not definitions. CSMA/CA worked before them; DCF packaged them together for efficiency.

DCF: CSMA/CA + Enhancements, Integrated

802.11 DCF: Distributed Coordination Function — state machine (top) and timeline (bottom). Source: CS176C textbook, Figure V01.

What the figure shows:

  • State machine (top): IDLE → SENSE → DIFS_WAIT → BACKOFF → TRANSMIT → ACK_WAIT → SUCCESS or COLLISION → back to BACKOFF with doubled \(CW\)
  • Timeline (bottom): Station A transmits a frame (DIFS + backoff + TX + SIFS + ACK); Station B is backlogged too, but its backoff counter freezes during A’s transmission and resumes after A completes

Mental Model: The Cocktail Party

You’ve just seen the whole protocol. Here’s the intuition to carry with you — DCF in six rules, one sentence each.

30 people in a room, one bartender (the AP), no moderator.

  1. Listen. If anyone is talking, stay quiet. (carrier sense) . . .
  2. When silence falls, don’t rush. Count to a polite pause (DIFS, ~34 µs). . . .
  3. Roll a random die (0 to \(CW\)) and count that many short beats. If someone else starts talking mid-count, freeze — resume later. (random backoff + freeze) . . .
  4. Talk when you hit zero — say your whole sentence. (transmit) . . .
  5. Wait for the bartender’s “got it.” The bartender replies after a shorter pause (SIFS, ~16 µs). That shorter pause is the only reason their reply wins over anyone else trying to start a new sentence. . . .
  6. If no “got it” comes back, assume you collided. Roll a bigger die next time — doubling on each failure. (BEB)

Every piece of this lecture — SIFS, DIFS, BEB, NAV, RTS/CTS, the 12 ms feedback loop, the four challenges — is a zoom-in on one of these six rules.

Bianchi (2000): The Throughput Ceiling Is Real

→ Quantifying Challenge 4 (density collapse). Even with all the DCF enhancements, a fundamental ceiling remains.

Setup: \(n\) stations, all backlogged, all using DCF. Each station transmits in any given slot with probability \(\tau\) (function of \(CW\)).

Collision probability per attempt: \(p = 1 - (1-\tau)^{n-1}\)

Saturated throughput (Bianchi’s analytical model):

\[S = \frac{\text{successful payload time}}{\text{idle slots} + \text{successful TX} + \text{collision TX}}\]

For 802.11b (\(CW_{\min}=31\), slot=20 µs, frame=1500B):

  • \(n = 5\): \(S \approx 0.78\) (near PHY rate)
  • \(n = 15\): \(S \approx 0.65\)
  • \(n = 30\): \(S \approx 0.50\)
  • \(n = 50\): \(S \approx 0.35\)
  • \(n = 100\): \(S \approx 0.15\)
Throughput
  ▲
  │ ● (n=5)
  │   ● (n=10)
  │     ● (n=15)
  │       ● (n=20)
  │         ● (n=30)
  │            ● (n=50)
  │                ● (n=100)
  │                     ● (n=200)
  └───────────────────────► n
          ~30 stations:
          inflection point

Two regimes:

  • Low \(n\): PHY rate dominates, MAC is fine
  • High \(n\): collisions grow faster than BEB can compensate

The ~30% ceiling is not a bug — it is the equilibrium of a slow control loop trying to manage many independent contenders with stale feedback.

Framework Checkpoint: The Cascade Continues

L5 ended at CSMA/CD. Wireless couldn’t do CD, so the cascade bent:

Generation Shared State Throughput Loop closes in Key Failure
Pure ALOHA Nothing 18.4% Vulnerable window = \(2T\)
Slotted ALOHA Slot timing 36.8% Bistable instability
CSMA Busy/idle (local) 80–90% \(\tau\) (~5 µs) Hidden terminal
CSMA/CD (wired) Collision signal ~95% 51.2 µs (Wired only)
CSMA/CA (principle) ACK from receiver N/A ~12 ms @ 1 Mbps Backoff, ACK vuln., hidden, density
+ DCF (1997) + SIFS/DIFS + BEB + NAV ~30% at \(n{=}50\) ~12 ms / attempt Density (irreducible)

The trade: wireless got a working protocol, but its feedback loop is frame-time-bounded (~250× slower than Ethernet’s propagation-bounded loop). DCF’s enhancements address 3 of 4 challenges — density is structural.

The question for next lecture: WiFi shipped DCF in 1997 and survived 20 years on it. Why? And what changed?

Invariant Evolution: Which Questions Kept Re-Answering?

Which invariant’s answer kept changing across the cascade? Which stayed fixed?

Protocol State Time Coordination Interface
Pure ALOHA None Continuous TX Distributed Broadcast
Slotted ALOHA + Slot boundary Slotted Distributed + Slot timing
CSMA + Busy/idle (local) Slotted Distributed + Listen-before-talk
CSMA/CD (wired) + Collision signal µs detection Distributed + Abort + jam
CSMA/CA (principle) + ACK presence Frame-TX bounded Distributed + Link-layer ACK
+ DCF (1997) + CW history + NAV Prescribed µs slots Distributed + SIFS/DIFS/RTS/CTS

The pattern:

  • State kept growing at every step. Each generation added one more piece of shared or inferred knowledge.
  • Time got more structured (continuous → slotted → microsecond-prescribed) but stayed locally governed.
  • Coordination stayed fully distributed through the entire evolution. No one ever got a central authority.
  • Interface grew richer as more control frames appeared (ACK, RTS, CTS, Duration fields).

The ceiling is a coordination limit, not a state limit. Adding more state has diminishing returns — the next step requires changing who decides.

Generative Exercise: The Coffee Shop at Peak Load

Scenario: One AP. 40 devices sharing it.

  • 20 laptops streaming video (continuous large frames)
  • 15 phones browsing (small bursts, lots of ACKs)
  • 5 IoT sensors posting telemetry (tiny, infrequent)

Throughput feels bad to everyone. Why?

Turn to groups of 3 — 5 minutes:

1. Rank the four challenges

Of (a) backoff collisions, (b) ACK vulnerability, (c) hidden terminals, (d) density collapse — which dominate in this setting?

Defend each ranking.

2. Pick one. Design a fix.

What new mechanism would fix your top-ranked challenge? What new state does the mechanism need, and who has that state?

3. Can it be distributed?

Can your fix live within the existing DCF framework (fully distributed)? Or does it require a central authority?

What gives?

The insight most groups will reach: any fix that scales to this density needs someone who sees the aggregate. The only entity with that view is the AP. The protocol evolves toward centralization — which is next lecture’s story.

Beyond CSMA/CA: Why WiFi Had to Change