Wireless Standards · Topic 4 of 5

Wireless Medium Access and QoS

Learn how Wi-Fi shares the air with CSMA/CA, backoff, acknowledgements and RTS/CTS, and how WMM access categories give priority to voice and video.

  • 6 min
  • Includes a diagram
In a nutshell
  • Wi-Fi is half duplex, so it uses collision avoidance, not collision detection.
  • CSMA/CA listens, waits for a random backoff, sends, and then waits for an acknowledgement.
  • A missing acknowledgement means a retry with a longer backoff.

What it is

Wireless medium access is the set of rules that decides which device may send on a shared channel at any moment.

All the devices on a channel share the same air. If two send at once, their signals collide and both are lost.

Quality of service (QoS) adds a way to give urgent traffic, such as voice, a better chance to send first.

Devicehas datalistens firstChannelfree or busywaits random timeTransmitsend framewaits forACKconfirmed or retry

How it works

Wi-Fi uses listen before talk with random delays, and it adds priority classes for QoS.

Half duplex

A Wi-Fi channel is half duplex. A device cannot send and listen at the same time on that channel, so it cannot detect a collision while it sends.

For this reason Wi-Fi uses collision avoidance, not collision detection as old shared Ethernet did.

CSMA/CA

CSMA/CA stands for carrier sense multiple access with collision avoidance. The steps are:

  1. The device listens to see whether the channel is free.
  2. If it is busy, the device waits until it is free.
  3. The device then waits for a random backoff time. This lowers the chance that two devices start together.
  4. The device sends the frame.
  5. The receiver sends an acknowledgement. If the sender does not get one, it assumes a collision, and it tries again with a longer backoff.

The basic method is called the distributed coordination function (DCF). Every device follows the same rules, and there is no central controller.

Airtime, not equal speed

Devices take turns in time. A slow client takes more time to send the same amount of data, so it uses more airtime. A few slow clients can reduce the speed for everyone on the channel.

This is why removing low data rates and keeping the clients close to the access point helps.

The hidden node problem

Two clients both hear the access point but not each other, so both send at the same time and their frames collide at the access point.

With RTS/CTS, one client sends a request to send, the access point answers with a clear to send that all clients hear, and the other client stays quiet for the reserved time. Two clients may both hear the access point but not hear each other. Each one thinks the channel is free and both transmit, and the frames collide at the access point.

RTS/CTS reduces this. A client sends a short request to send, and the access point answers with a clear to send that all clients hear. The other clients then stay quiet for the time that is reserved.

/interface wireless set wlan1 hw-protection-mode=rts-cts hw-protection-threshold=500
  • hw-protection-mode selects the protection method on the legacy wireless package, such as rts-cts.
  • hw-protection-threshold is the frame size above which the protection is used.

RTS/CTS adds overhead for every protected frame. Use it only where hidden nodes cause trouble, such as a long outdoor link with many clients.

Exam tip

Frequent retries with a good signal are a typical sign of a hidden node problem.

Timing on long links

The sender waits a limited time for the acknowledgement. On a long link the signal takes longer to travel, so the wait must be longer.

On the legacy wireless package the distance and the acknowledgement timeout settings handle this. A value that is too low breaks the link, and a value that is too high lowers throughput.

QoS and WMM

Without QoS, all frames have the same chance to send. WMM (Wi-Fi Multimedia) defines four access categories with different priority.

Access categoryTypical trafficPriority
VoicePhone callsHighest
VideoStreaming videoHigh
Best effortNormal dataNormal
BackgroundBackups and bulk transfersLowest

A higher category waits less before it sends. It gets a shorter random wait, so it wins the channel more often. This method comes from the 802.11e amendment and is called EDCA.

WMM only gives a better chance. It does not reserve bandwidth.

Marking the traffic

WMM needs to know the category of each frame. The category comes from the priority that is marked on the traffic, such as the DSCP value in the IP header or the priority in a VLAN tag.

On the legacy wireless package, the wmm-support setting can be disabled, enabled or required. In RouterOS you can set the packet priority with a firewall mangle rule using the set-priority action, and then WMM maps it to a category.

/interface wireless set wlan1 wmm-support=enabled
/ip firewall mangle add chain=forward protocol=udp dst-port=5060 action=set-priority new-priority=6

Why QoS is not a fix for a poor link

QoS helps only when the channel is busy. If the signal is weak or the noise is high, no priority setting can make up for it.

Watch out

Do not mark everything as voice. If all traffic has the highest priority, then none of it has priority.

What to remember for the exam

Seven facts cover this topic.

  • Wi-Fi is half duplex, so it uses collision avoidance, not collision detection.
  • CSMA/CA listens, waits for a random backoff, sends, and then waits for an acknowledgement.
  • A missing acknowledgement means a retry with a longer backoff.
  • Slow clients use more airtime and reduce the speed of every client.
  • The hidden node problem is reduced with RTS/CTS.
  • WMM has four access categories: voice, video, best effort and background.
  • WMM gives priority but does not reserve bandwidth.

Common mistakes

These four errors are common.

Thinking Wi-Fi detects collisions. It avoids them and relies on acknowledgements.

Using RTS/CTS everywhere. It adds overhead and helps only where hidden nodes exist.

Marking all traffic as high priority. The priorities then cancel out.

Expecting QoS to fix a bad link. It helps only when the channel is busy.

Check yourself

Work through these three questions.

  • Why does Wi-Fi use collision avoidance and not collision detection?

    A Wi-Fi device cannot send and listen at the same time on the channel. It therefore avoids collisions and uses acknowledgements to find lost frames.

  • What problem does RTS/CTS solve?

    The hidden node problem, where two clients cannot hear each other and collide at the access point. The clear to send tells all clients to wait.

  • What are the four WMM access categories?

    Voice, video, best effort and background. Voice has the highest priority and background the lowest.

Topic 4 of 5 in Wireless Standards

Test yourself on Wireless Standards

The full MikroTik MTCEWE question bank has 476 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by MikroTik. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.