skip to content

In WMM, what are the four access categories, and how do EDCA parameters give voice frames priority over bulk traffic on the air?

level: middleimportance: must knowfreq 37%

answer

  1. four queues, one radio
  2. user priority mapped to category
  3. shorter wait, smaller window
  4. TXOP in 32-microsecond units
  5. priority by odds, not by order

basics

~20 s

WMM sorts traffic into AC_VO (voice), AC_VI (video), AC_BE (best effort) and AC_BK (background). Under EDCA each category contends with its own AIFSN, contention window and TXOP limit, so voice usually, but not always, wins the medium first.

solid answer

~50 s

WMM, the Wi-Fi Alliance's certification profile of 802.11e (802.11e-2005) prioritised access, gives every station four transmit queues: **AC_VO**, **AC_VI**, **AC_BE** and **AC_BK**. A frame's 802.1D user priority picks its queue: 6 and 7 go to AC_VO, 4 and 5 to AC_VI, 0 and 3 to AC_BE, 1 and 2 to AC_BK. Under **EDCA** each queue contends separately with its own parameters, which the AP advertises in the WMM Parameter element: an **AIFSN** (how many slots to wait after the medium goes idle), a **contention window** (the range of the random backoff), and a **TXOP limit** (how long a winner may keep sending). hostapd's defaults for clients give AC_VO AIFSN 2 with a window of 3 to 7 slots and AC_BE AIFSN 3 with 15 to 1023. Voice therefore wins most contentions, but it is a statistical edge, not a strict queue.

code

ini · 9 lines
ini
wmm_enabled=1
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47

go deeper

for a junior

Recall the four categories by name and order, voice, video, best effort and background, and that WMM is how Wi-Fi prioritises voice on the air.

for a middle

Explain the user-priority mapping, then AIFSN, the contention window and the TXOP limit, and why together they give voice a statistical rather than absolute edge.

for a senior

Diagnose voice quality with WMM in mind: untagged client traffic, heavy best-effort load still winning contentions, and AP versus client parameter sets.

for a principal

Decide whether to touch the default EDCA values or enable admission control at all, weighing client support and the risk of starving other categories.

## Why the air needs its own prioritisation On a wired link, a switch or router holds packets in queues and can send the voice queue first. On an 802.11 channel there is no central queue: every station, including the access point (AP), contends for the shared medium with **CSMA/CA**, waiting for the channel to go idle and then backing off for a random number of slots. Prioritising voice therefore has to change the *contention* itself. That is what **EDCA** (Enhanced Distributed Channel Access) does, as defined in **802.11e** (802.11e-2005) and certified by the Wi-Fi Alliance as **WMM** (Wi-Fi Multimedia). ## The four access categories | Access category | Meaning | 802.1D user priorities | |---|---|---| | **AC_VO** | Voice | 6, 7 | | **AC_VI** | Video | 4, 5 | | **AC_BE** | Best effort | 0, 3 | | **AC_BK** | Background | 1, 2 | Two details catch people out. First, user priorities 1 and 2 rank *below* 0: background sits under ordinary untagged traffic. Second, data frames with no priority information go to **AC_BE**, while management frames are sent as **AC_VO**, as hostapd's configuration notes record. ## The EDCA parameters Each category in each station runs its own contention with three parameters: - **AIFSN** (arbitration interframe space number). After the medium goes idle, a queue waits an **AIFS** of SIFS plus AIFSN slot times before counting down its backoff. A smaller AIFSN starts the countdown sooner. - **Contention window** (CWmin and CWmax). The backoff is a random number of slots up to the current window; the window starts at CWmin and grows toward CWmax after failed attempts. A small window means a short countdown. - **TXOP limit**. A queue that wins may keep transmitting for up to this long. hostapd expresses it in units of 32 microseconds; 0 means one frame exchange per win. The AP announces the client parameters in the **WMM Parameter element** of its beacons, probe responses and (re)association responses, and clients use them for frames they send to the AP. ```ini wmm_enabled=1 wmm_ac_bk_aifs=7 wmm_ac_bk_cwmin=4 wmm_ac_bk_cwmax=10 wmm_ac_be_aifs=3 wmm_ac_be_cwmin=4 wmm_ac_be_cwmax=10 wmm_ac_vi_aifs=2 wmm_ac_vi_cwmin=3 wmm_ac_vi_cwmax=4 wmm_ac_vi_txop_limit=94 wmm_ac_vo_aifs=2 wmm_ac_vo_cwmin=2 wmm_ac_vo_cwmax=3 wmm_ac_vo_txop_limit=47 ``` These are hostapd's defaults for clients. The CW values are exponents: a value n means a window of 2^n - 1 slots, so AC_VO contends with 3 to 7 slots and AC_BE with 15 to 1023. AC_VO's TXOP of 47 units is about 1.5 ms; AC_VI's 94 is about 3 ms. ## How voice wins, and why not every time 1. The medium goes idle. 2. AC_VO waits AIFSN 2; AC_BE waits AIFSN 3; AC_BK waits AIFSN 7. 3. Each then counts down a random backoff from its own window: AC_VO from at most 3 slots on a first attempt, AC_BE from at most 15. 4. Whoever reaches zero first transmits; the others freeze their countdown and resume when the medium is idle again. Voice wins most rounds because it both starts earlier and counts from a smaller number. But a best-effort station that draws a backoff of 0 can still beat a voice station that draws 3. **EDCA priority is probabilistic.** That is why heavy best-effort load can still hurt voice, and why the windows matter as much as the AIFSN. ## Tuning mistakes to avoid - **Marking everything as voice.** If bulk applications tag their traffic with priority 6, AC_VO fills with stations using tiny windows, collisions rise and real voice suffers. - **Shrinking windows to "speed up" a category.** A smaller window means more stations pick the same backoff, so collisions and retries go up, not down. - **Changing defaults without measurement.** The defaults are widely interoperable; change them only with a capture or retry statistics that show a problem the change addresses. ## What else to know - **The AP uses its own set.** hostapd keeps separate `tx_queue_*` settings for the AP's own transmissions; its documented defaults give AC_VO and AC_VI an AIFS of 1, a slight edge for the downlink. - **Admission control is optional.** Each category has an ACM flag (`wmm_ac_vo_acm`, default 0). Set to 1, clients must get admission with an ADDTS request carrying a TSPEC before using that category's parameters. - **Marking decides the queue.** A client that does not tag its voice frames sends them as best effort. Toward the wired side, the AP can translate between user priority and the IP marking; wired queuing design is a separate subject. - **Non-WMM clients** get none of this, and hostapd notes that full 802.11n (HT) functionality needs WMM enabled anyway.

  • Why can a correctly configured WMM network still give voice no priority from the handset to the AP?
    Uplink priority depends on the client. The handset's operating system or application must tag voice frames with user priority 6 or 7, often derived from the IP marking; untagged frames go to AC_BE and contend like bulk traffic. A client that does not support WMM gets no categories at all. Check the QoS Data frames' priority in a capture before tuning the AP.
  • What does setting the admission control flag on AC_VO change?
    With hostapd's wmm_ac_vo_acm=1, a client may not use AC_VO's parameters until it has asked for admission with an ADDTS request carrying a TSPEC that describes the stream, and the AP has accepted it. The AP can refuse, which protects voice capacity from overload but requires clients that implement the exchange. The default is 0, admission not required.
  • Why does hostapd keep separate EDCA values for the AP and for clients?
    The wmm_ac_* settings are advertised to clients for their uplink frames, while the tx_queue_* settings govern what the AP itself sends. hostapd's documented AP defaults give AC_VO and AC_VI an AIFS of 1 against the clients' AIFSN of 2, a slight edge for the AP, which carries every client's downlink traffic.

A room where anyone may speak once it falls silent: voice speakers wait a short pause and then count down from a small random number, bulk speakers wait longer and count down from a big one. Voice usually starts first, but a lucky bulk speaker sometimes beats it.

  • WMM gives voice strict priority, so a best-effort frame never goes first.
  • 802.1D user priority 1 is higher than 0, so it maps above best effort.
  • Voice is prioritised only when the admission control flag is set to 1.
  • The TXOP limit in hostapd is given in milliseconds.
  • The AP prioritises the client's uplink voice even if the client sends it untagged.