Skip to content

Data Link

Summary

  • The MAC (Media Access Control) sublayer is where 802.11 decides who gets to talk on a shared, contention-based radio medium, and how — it sits directly above the PHY and hands finished frames up to the LLC sublayer shared with Ethernet.
  • Unlike wired Ethernet, Wi-Fi devices can't reliably detect a collision while transmitting, so the MAC is built around collision avoidance rather than collision detection.
  • Most of the "why is my Wi-Fi slow with lots of devices connected" experience comes from the MAC layer, not the radio — contention, retries, and per-client airtime all live here.

Medium Access: CSMA/CA

Wi-Fi uses CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) instead of Ethernet's collision-detection approach, since a radio can't listen and transmit at full power at the same time:1

Concept What It Does
Carrier Sense A station listens before transmitting; if the medium is busy, it waits
Random Backoff After the medium clears, each station waits a random amount of time before transmitting, reducing the odds two stations transmit at once
NAV (Network Allocation Vector) A timer set from other stations' frame headers, used to predict how long the medium will stay busy without needing to keep listening
DCF (Distributed Coordination Function) The original, best-effort access method — every station has equal priority
EDCA (Enhanced Distributed Channel Access) QoS-aware access method (see below) that gives some traffic shorter backoff windows than others

Table 1. Core Medium Access Concepts

Collision avoidance, not collision detection

Ethernet's CSMA/CD detects a collision as it happens and stops early. Wi-Fi's CSMA/CA instead tries to prevent collisions before they occur, since a transmitting radio typically can't hear over its own transmission — this is also why lost frames are inferred from a missing ACK rather than a detected collision.

RTS/CTS

RTS/CTS (Request to Send / Clear to Send) is an optional handshake that reserves the medium before a data frame is sent, mainly to solve the "hidden node" problem — two stations that can each hear the AP but not each other:2

Step Frame Purpose
1 RTS Sender asks to reserve the medium for a given duration
2 CTS AP confirms, and this duration is heard by all stations in range of the AP (even ones that couldn't hear the RTS)
3 Data + ACK Sender transmits, receiver acknowledges

Table 2. RTS/CTS Handshake

Frame Types

802.11 defines three broad frame categories, each with several subtypes:3

Category Examples Purpose
Management Beacon, Probe Request/Response, Association Request/Response, Authentication, Deauthentication Discover, join, leave, and maintain the network
Control RTS, CTS, ACK, Block ACK Support reliable, coordinated delivery of data frames
Data Data, QoS Data, Null (no data) Carry the actual upper-layer payload

Table 3. 802.11 Frame Categories

Addressing

Every 802.11 frame can carry up to four MAC addresses, more than a typical Ethernet frame's two — the extra fields exist because a frame may cross from wireless client to AP to wired network in a single hop:3

Field Typical Use (client → AP → network)
Address 1 Receiver (immediate next hop, e.g. the AP)
Address 2 Transmitter (immediate sender, e.g. the client)
Address 3 Original destination or source beyond the immediate hop
Address 4 Only used in wireless distribution system (WDS) links, e.g. AP-to-AP bridging

Table 4. 802.11 Four-Address Scheme

Association Process

Before a station can send data through an AP, it goes through a short sequence of management frames:3

Step Frame Exchange Result
1. Scanning Probe Request / Probe Response (or passive listening for Beacons) Station discovers nearby BSSs and their capabilities
2. Authentication Authentication Request / Response Legacy identity check (mostly a formality with modern security — the real security handshake happens after association)
3. Association Association Request / Response Station formally joins the BSS and is assigned an Association ID (AID)
4. Security Handshake 4-Way Handshake (WPA2) or SAE (WPA3) Encryption keys are derived before any data can flow

Table 5. Joining a BSS

Frame Aggregation

Sending one frame at a time wastes airtime on overhead (headers, inter-frame spacing, backoff). Aggregation bundles multiple frames into fewer transmissions:4

Technique Introduced What It Bundles
A-MSDU (Aggregate MAC Service Data Unit) 802.11n Multiple upper-layer payloads into one MAC frame
A-MPDU (Aggregate MAC Protocol Data Unit) 802.11n Multiple MAC frames into one PHY transmission, each still individually acknowledged via Block ACK

Table 6. Frame Aggregation Techniques

QoS: WMM & Access Categories

WMM (Wi-Fi Multimedia), based on 802.11e, maps traffic into four access categories so latency-sensitive traffic gets better odds of winning the medium:5

Access Category Priority Typical Traffic
AC_VO (Voice) Highest VoIP calls
AC_VI (Video) High Video streaming/calls
AC_BE (Best Effort) Normal Regular web/app traffic
AC_BK (Background) Lowest Downloads, backups

Table 7. WMM Access Categories

How priority is actually enforced

Each access category gets its own contention window and inter-frame spacing under EDCA — higher-priority categories use shorter, tighter windows so they statistically win access to the medium more often, not a hard guarantee every single time.

Power Save Modes

Since Wi-Fi radios draw significant power while listening, the MAC defines ways for a station to sleep without missing traffic:3

Mode Mechanism
Legacy Power Save Station sleeps, wakes periodically for beacons carrying a TIM (Traffic Indication Map) that flags buffered traffic
U-APSD (Unscheduled Automatic Power Save Delivery) Station requests buffered frames on its own schedule, used heavily by VoIP/video devices
TWT (Target Wake Time) Introduced in 802.11ax (Wi-Fi 6); AP and station negotiate specific wake times, letting battery/IoT devices sleep far longer between check-ins

Table 8. Power Save Mechanisms

Useful Resources


  1. IEEE. (n.d.). IEEE 802.11-2020 — Part 11: Wireless LAN MAC and PHY Specifications. https://standards.ieee.org/ieee/802.11/7028/ ↩

  2. IEEE. (n.d.). IEEE 802.11 Standard. https://standards.ieee.org/ieee/802.11/7028/ ↩

  3. IEEE. (n.d.). IEEE 802.11-2020 — Part 11: Wireless LAN MAC and PHY Specifications. https://standards.ieee.org/ieee/802.11/7028/ ↩↩↩↩

  4. Wi-Fi Alliance. (n.d.). Discover Wi-Fi — Generations. https://www.wi-fi.org/discover-wi-fi ↩

  5. IEEE. (n.d.). IEEE 802.11 Standard. https://standards.ieee.org/ieee/802.11/7028/ ↩