5  MAC Protocols: Sharing the Channel

networking-core
fund
mac

5.1 Start With Who Gets to Talk

A shared channel is like a narrow doorway: if every device talks whenever it wants, useful messages collide or waste battery waiting. MAC protocols are the rules that decide who may transmit, who must listen, and how the network recovers when two devices choose the same moment.

For IoT design, the question is practical before it is theoretical. Decide whether the workload is periodic, alarm-driven, mobile, sleepy, or dense, then choose the channel-sharing rule that can survive that behavior.

5.2 MAC Rules Decide Who Transmits

Medium Access Control, or MAC, is the data-link responsibility that controls access to a shared medium. In an IoT network the medium might be a Wi-Fi channel, an IEEE 802.15.4 channel, a sub-GHz LPWAN channel, or a wired bus. The MAC decision is local and immediate: listen, wait, transmit, acknowledge, retry, or sleep.

A good MAC choice is not simply a protocol name. It is a fit between traffic timing, node density, radio reachability, power budget, and failure behavior. CSMA/CA shares a channel by listening and backing off. TDMA shares a channel by assigning time. ALOHA-style access transmits with minimal coordination and accepts collisions when traffic is sparse enough.

The review question is therefore operational: what does the device do when another device wants the medium at the same time? A door sensor sending a rare alarm can tolerate a different access rule from a motor controller that must report in a bounded time window. A battery node that wakes for a few milliseconds cannot afford long idle listening, while a powered gateway can coordinate schedules, acknowledgements, and retries.

MAC evidence is local but it shapes the whole system. Lost frames become transport retries, stale dashboard values, missed alarms, and unnecessary battery drain. A defensible design names the local contention rule, the expected traffic shape, the devices that cannot hear one another, and the field metric that tells operators when the assumption has changed.

That metric might be retry rate, missed slot count, tail latency, receive-window miss rate, or battery current during contention.

CSMA/CA channel access sequence with carrier sensing, random backoff, transmission, acknowledgement, and retry behavior.
CSMA/CA is useful when devices can sense enough of the channel and traffic is not too dense.

Contention

Devices compete for the same medium. Carrier sensing, random backoff, acknowledgements, and retries keep moderate traffic fair without a central schedule.

Scheduling

A coordinator or network service assigns time, frequency, or link opportunities. This can bound latency and energy use when synchronization is worth the cost.

Random Access

Devices transmit with little coordination. This is attractive for sparse long-range telemetry, but capacity falls quickly as offered load rises.

MAC Family
Best Fit
Failure Mode
IoT Examples
CSMA/CA
Bursty traffic with moderate contention and devices that can sense much of the local channel.
Hidden terminals, retry storms, and battery drain when many nodes compete.
Wi-Fi and IEEE 802.15.4 style networks.
TDMA or scheduled access
Predictable reporting, bounded latency, or duty-cycled devices that can follow a schedule.
Wasted slots, synchronization overhead, and coordinator dependency.
Cellular scheduling and industrial time-slotted networks.
ALOHA-style access
Very sparse, low-duty-cycle telemetry where coordination would cost more than occasional retransmission.
Collisions rise rapidly if many devices transmit at the same time.
LoRaWAN-style uplink behavior and simple event reporting.

5.3 Choose MAC Rules from Evidence

Start with the workload instead of the protocol. Record whether messages are periodic, event-driven, alarm-first, bulk, or interactive. Then test whether devices can hear one another, whether a gateway can coordinate them, how long a battery device may listen, and what happens when a frame is missed.

That record should be tied to a physical layout, because shelves, machinery, walls, and antenna height can change who hears whom even when every node reports the same configured channel.

Hidden terminal collision where two sensors cannot hear each other but both can reach the same gateway, causing overlapping transmissions at the receiver.
Hidden terminals make carrier sensing look successful at the sender while the receiver sees a collision.
Evidence
What to Measure
Design Implication
Common Mistake
Traffic pattern
Inter-arrival time, burst size, alarm priority, retry tolerance, and reporting windows.
Periodic traffic can use schedules; irregular traffic may need contention or event slots.
Choosing TDMA for unpredictable events and wasting most slots.
Reachability
Which nodes hear each other, which only hear the gateway, and where obstacles create radio shadows.
Hidden terminals may need RTS/CTS, placement changes, more gateways, or scheduled access.
Assuming low average utilization means collisions will be rare.
Latency
Worst-case wait, backoff distribution, retransmission time, and queueing under bursts.
Safety or control messages need bounded access, priority, or a separate path.
Reporting average latency while hiding peak delay during contention.
Energy
Listen time, retry count, wake windows, synchronization cost, and acknowledgement behavior.
Sleeping outside a scheduled slot can save power, but missed synchronization can be costly.
Counting transmit energy while ignoring idle listening and retries.

Warehouse Sensor Example

A warehouse has periodic inventory sensors behind metal shelving. The average channel load is low, but sensors on opposite aisles cannot hear each other and both can reach the gateway. Pure CSMA/CA may still lose frames because each hidden sensor believes the channel is idle. There are three defensible responses.

Improve Visibility

Move gateways, add gateways, or adjust antennas so more nodes can hear each other and the coordinator has cleaner reception.

Add Handshakes

Use RTS/CTS when control-frame overhead costs less than hidden-terminal retransmissions.

Schedule Traffic

Use slots when reports are predictable and deterministic delivery matters more than immediate unscheduled access.

RTS/CTS handshake where a gateway grants a transmission and a hidden node defers using the duration information.
RTS/CTS helps when a receiver can warn nodes that the sender cannot hear directly.

In 802.11, the RTS/CTS reservation is the practical version of the MACA for Wireless (MACA(W)) idea: a sender asks to transmit, the receiver grants the medium, and nearby stations that hear either control frame defer for the advertised duration. That duration feeds virtual carrier sensing, often called the Network Allocation Vector (NAV), so hidden stations can stay quiet even when they did not hear the original data sender.

Decision record: include the traffic class, contender count, hidden-terminal evidence, latency target, energy budget, chosen MAC behavior, fallback behavior, and the field metric that will trigger retesting.

5.4 MAC Collision and Timing Bounds

Under the hood, a MAC protocol is a set of timing and state rules. A contender may sense the channel, choose a random backoff, reserve the medium with control frames, send a data frame, wait for an acknowledgement, expand a retry window, or sleep until a scheduled slot. Each rule affects latency, energy, and how failures appear in logs.

Do not treat theoretical utilization as production proof. Pure ALOHA has an ideal maximum near 18% channel throughput and slotted ALOHA near 37% under simplified assumptions. CSMA/CA can perform much better at moderate load, but hidden terminals, exposed terminals, capture effects, noisy receivers, and acknowledgement loss change the field result.

Exposed terminal scenario where a node defers because it hears a nearby transmission even though its intended receiver would not be interfered with.
Exposed terminals waste spatial reuse; hidden terminals lose frames. The mitigation priorities are different.
MAC Mechanism
What It Protects
What It Costs
Proof to Keep
Carrier sense
Avoids transmitting over a detectable local sender.
Idle listening and false confidence when senders are hidden.
Clear-channel assessment thresholds and receiver-side collision logs.
Random backoff
Reduces repeated collisions after a busy channel or failed ACK.
Variable latency and extra awake time under contention.
Retry counts, backoff windows, and tail-latency measurements.
RTS/CTS or reservation
Lets a receiver warn nearby nodes before a data frame.
Control-frame overhead, especially for tiny payloads.
Hidden-terminal map, data-frame size threshold, and before/after retry rates.
Scheduled slots
Bounds collision risk and lets devices sleep predictably.
Synchronization, coordinator dependency, and unused capacity.
Clock drift, missed slots, guard time, and slot utilization records.

Failure mode: reporting only channel utilization. A network can show low utilization and still drop critical frames if the radio geometry creates hidden terminals or if sleeping nodes miss their receive window.

Review Checklist

Collision Boundary

Name which collisions the design prevents, which it merely retries, and which it cannot observe directly.

Timing Boundary

Record worst-case access delay, retry delay, sleep window, and any synchronization dependency.

Energy Boundary

Separate transmit time, receive listening, overhearing, control frames, retry behavior, and resynchronization cost.

Retest Trigger

Retest after gateway moves, density changes, firmware alters backoff, or field logs show rising retries.

5.5 Hidden and Exposed Terminals

5.6 Summary

  • MAC protocols decide when a local device may use a shared medium.
  • CSMA/CA fits moderate contention when carrier sensing sees enough of the local channel.
  • TDMA or scheduled access fits predictable traffic, bounded timing, and duty-cycled devices that can follow a schedule.
  • ALOHA-style access can be acceptable for sparse telemetry but degrades quickly as offered load increases.
  • Hidden terminals cause receiver-side collisions; exposed terminals waste spatial reuse.
  • Production MAC decisions need evidence about traffic, reachability, timing, energy, retries, and retest triggers.

5.7 Key Takeaway

Choose a MAC protocol from measured channel behavior, not from a protocol label. The defensible design states what the channel-access rule prevents, what it retries, what it cannot see, and when operators must retest the assumption.

5.8 See Also