Wireless QoS, channel access

The previous instalment of our wireless QoS series served as a brief introduction into the various wireless standards, in this post we go a little deeper into the transmission mechanisms required to implement wireless QoS features.

Before jumping into the 802.11e QoS enhancements we first need to understand some wireless transmission basics. Without this foundation, it is not possible to adequately describe the improved channel access mechanisms in the current wireless standards. There are many concepts and acronyms to cover here but this post will try to strike a balance between technical depth and general readability.

Short disclaimer: Wireless media access is a complex topic and many components have been excluded here for brevity. The purpose is to highlight the mechanisms at play during QoS enabled wireless transmission, focusing specifically on those enhancements which made QoS and the differentiation of traffic possible.

Wireless channel access describes what each wireless station (STA) needs to do before a transmission can occur. In the case of traditional (wired) Ethernet networks the process is called CSMA/CD and is well understood, CSMA/CD stands for Carrier-Sense Multiple Access with Collision Detection. That last part of the acronym (i.e. detection) is the differentiating factor between wired and wireless networks. This is because wired networks are a closed system were all the communication happens electrically inside the cable, allowing a transmitting station to back-off when it detects an electrical signal on the wire. Of course, modern Ethernet networks are switched in nature meaning there is a dedicated link between each station and collisions are not much of a concern anyway. Wireless networks on the other hand transmit data over the air (a common shared medium) using electromagnetic waves, and there are numerous factors that can (and do) affect the wave propagation before it reaches the receiving STA (this is a topic for another blog post). More importantly, because the STAs are not physically connected, and may not even know of the existence of other STAs, there is no way to detect whether a collision has taken place. To alleviate this, 802.11 networks use Carrier-Sense Multiple Access with Collision Avoidance (CSMA/CA) – with the aim being to avoid collisions in the first place. To this end, each STA needs to follow a set of rules before any transmission can occur, i.e. before the STA has access to the wireless channel.

It is important to note that CSMA/CA can not eliminate wireless collisions entirely, the goal rather is to reduce the probability of collisions as much as possible.

In the example above we have two STAs that cannot ‘hear’ each other, they both transmit at the same time, and the result is corrupted data received by the AP.

Now onto the good stuff.

The original 802.11 standard defied two methods used to control access to the wireless medium; Distributed Co-ordination Function (DCF) & Point Co-ordination Function (PCF). Later the 802.11e amendment added Hybrid Co-ordination Function (HCF), HCF consisted of two modes of operation; HCF Controlled Channel Access (HCCA) and Enhanced Distributed Channel Access (EDCA). PCF and its replacement HCCA defined the AP as a central point of control of the wireless medium, the approach had scaling implications and was not widely accepted nor deployed by wireless vendors, we will not be discussing PCF or HCCA further. Of interest to this post are the widely used DCF and (QoS enhanced) EDCA mechanisms, we will explore these.

DCF is the original control mechanism defined by the 802.11 standard and defines a set of back-off methods before any wireless transmission. The principle of listen before you speak nicely explains the idea behind DCF, and the 802.11 protocol in general. STAs need to first listen to ensure that no transmission is currently taking place, then apply back-off timer, then listen again, then only transmit. The DCF process consists of several components including carrier sensing before transmission (testing to see if there is any energy in the air that can be decoded, signifying that the medium is in use), as well as applying the various back-off timers before transmission. Of importance to our QoS discussion is the use of Inter-Frame Spacing, IFS is defined as a duration of time between each frame transmission. Each IFS type has a different duration (measured in microseconds) and is used with specific frame types.

Some notable IFS types (in order of duration):

Short Interframe Space (SIFS) – Used for critical frames such as ACK or CTS. SIFS is used when sending priority control frames, hence this timer is shorter to ensure these frames get transmitted first.

DCF Interframe Space (DIFS) – DIFS is the standard IFS used for general transmission.

Extended Interframe Space (EIFS) – Used during network collisions. EIFS has the longest duration and is used after a failed transmission to allow additional time for any acknowledgments (ACKs) to be received.

The diagram below illustrates the concept of IFS.

Now we can introduce the Arbitrated Interframe Space (AIFS) which came about with 802.11e. AIFS is used by QoS enabled STAs (as opposed to DIFS for non-QoS stations) and is derived using the formula AIFS = AIFSN x SlotTime + SIFS.

Let’s look at each of these components.

SlotTime is a fixed time interval used for back-off calculations. Slot times are defined in the 802.11 standard for each PHY type, typically either 9µs or 20µs in modern networks.

SIFS is the Short Interframe Space time as described above, SIFS values are also defined in the 802.11 standard for each PHY type.

AIFSN (AIFS Number) is the variable component that allows for timers based on the Access Category (AC). Four ACs are defined allowing for differentiation of four levels of priority, these could be loosely compared to egress queues from the wired world. We will delve into the mapping of application types to ACs in a separate blog post. For now, we can summarise the ACs as follows:

AC NameDescriptionDefault AIFSN
AC_BKBackground7
AC_BEBest Effort3
AC_VIVideo2
AC_VOVoice2

Each of the ACs has a configurable AIFSN which allows for control over the relative timers associated with each category. It is this variable and configurable timer that is the crucial difference between the older DCF function and the QoS enabled EDCA function. By controlling the duration of time an STA must wait before transmitting using a specific AC, we increase the probability of higher priority traffic being transmitted first.

The figure above illustrates the increased wait time required before transmission for each AC. It also introduces the concept of Contention Window (CWmin / CWmax), which is the component responsible for managing contention to the wireless medium. Recall that wireless is a shared medium and collisions cannot be detected, only avoided, and the CW mechanism is responsible for that collision avoidance. Contention windows are a concept introduced in the first iteration of the 802.11 standard, the difference here is that now the contention widows are also differentiated per AC.

Once a transmitting STA has waited the prerequisite IFS time, it must defer the transmission by another interval known as the contention window. Contention windows use a sliding scale with a range of possible values. Each station picks a random number within its contention window scale and starts counting down from that value, this random selection has the effect of limiting collisions as each STA is likely to start with a different value. Once the counter reaches zero the STA may transmit unless another STA has begun its transmission in the meantime, if the channel is still busy the STA increases the CW exponentially and starts counting down again every time the medium is free. Configuring different CWmin and CWmax values per AC further increases the probability that traffic in higher priority ACs will be transmitted first. The figure below shows the exponential growth in wait time when a STA defers transmission.

We can see that the addition of AIFS along with differentiated CWmin and CWmax (per AC) offer the functionality required to prioritise delay sensitive traffic such as voice and video which was lacking in the original 802.11 DCF implementation.

In the next edition of out wireless QoS discussion we will look at how traffic is classified into the ACs and some nuances of mapping between various QoS standards.