Wednesday, August 4, 2010

Wireless QoS Part 4 - Arbitration Interframe Spacing

Read the Entire Wi-Fi Quality of Service 5-Part Series:
  1. Part 1 - Background Information
  2. Part 2 - IEEE 802.11e Principles
  3. Part 3 - User Priorities, Access Categories and Queues
  4. Part 4 - Arbitration Interframe Spacing
  5. Part 5 - Contention Window and Final Thoughts
Part 4 - Arbitration Interframe Spacing
The second QoS design change implemented as part of the 802.11e amendment and WMM certification is replacement of the one-size-fits all Distributed Inter-Frame Spacing (DIFS) for all data and management frames, with Arbitration Inter-Frame Spacing (AIFS) which is dependent on the access category and queue of the frame waiting transmission.


Arbitration Inter-Frame Spacing (AIFS) defines different inter-frame gaps for traffic from each of the 4 priority queues. This replaces the original DCF Inter-Frame Spacing (DIFS) which defined only a single inter-frame gap value for all data frames. Using AIFS, each frame awaiting transmission must wait until the medium is declared to be available through Clear Channel Assessment (CCA) and the Network Allocation Vector (NAV), not discussed here for brevity. Once the medium is available, each logical station (one for each priority queue) must wait the defined inter-frame space time based on the queue to which the traffic is assigned.

Each of the 4 priority queues has a defined inter-frame space value corresponding to the priority assigned to the queue. For example, the Voice queue is the highest priority and as such has the lowest inter-frame space timer. The AIFS timers assigned by IEEE 802.11e are all defined as 1 Short Inter-Frame Spacing (SIFS) value plus a variable number of slots times (AIFSN) which are defined by the physical layer encoding method in-use (CCK, DSSS, OFDM).

The AIFS Number (AIFSN) values are administrator configurable, with default values defined as the following:
  • Voice Queue                 1 SIFS + 2 * slot time (AIFSN = 2)
  • Video Queue                 1 SIFS + 2 * slot time (AIFSN = 2)
  • Best Effort Queue          1 SIFS + 3 * slot time (AIFSN = 3)
  • Background Queue        1 SIFS + 7 * slot time (AIFSN = 7)
Note – Default values for non-AP QoS stations are defined in IEEE 802.11e amendment section 7.3.2.27 and the current IEEE 802.11-2007 standard section 7.3.2.29.

Therefore, the default AIFS values for each PHY are as follows:


Note – 802.11g and 802.11n when operating in the 2.4 GHz spectrum use long slot times when legacy 802.11b is present, and use the short slot times when no legacy stations are present. This is done for backwards compatibility.

Here is an illustration of AIFS in action, with [X] representing sample User Priorities for differentiated inter-frame spacing between access categories. Clearly, frames with UP = 0 (AC_BE) will wait a longer IFS than frames with UP = 6 (AC_VO), thereby prioritizing voice AC traffic.


(Figure 2-9 courtesy of “Voice over Wireless LAN 4.1 Design Guide” page 2-11, by Cisco Systems)

The AIFSN field within the EDCA Parameter Set information element is 4 bits long, with a minimum value of 2 defined in the standard and a maximum value of 15 based on the field length limitation.

In this manner, arbitration inter-frame spacing allows a statistical advantage for traffic in higher priority queues because those frames are not required to wait as long prior to decrementing their random backoff timers.

We're almost, but not quite, finished with the technical details of wireless QoS. In my final post, I'll detail enhancements to the contention window value selection, which determines the random backoff range used by stations prior to transmitting. I'll also wrap it all up together in a nice bow, and provide a few very useful external links for further reading.

-Andrew

Monday, August 2, 2010

Wireless QoS Part 3 - User Priorities, Access Categories, and Queues

Read the Entire Wi-Fi Quality of Service 5-Part Series:
  1. Part 1 - Background Information
  2. Part 2 - IEEE 802.11e Principles
  3. Part 3 - User Priorities, Access Categories and Queues
  4. Part 4 - Arbitration Interframe Spacing
  5. Part 5 - Contention Window and Final Thoughts
Part 3 - User Priorities, Access Categories and Queues
The first QoS design change implemented as part of the 802.11e amendment and WMM certification, are User Priorities, Access Categories, and Queuing Structures.


The IEEE 802.11e amendment defines 8 user priorities (UP) for class of service (CoS) definition. These user priorities were established for layer 2 data link frame prioritization in alignment with earlier CoS standards including 802.1D (based on the work within the 802.1p task group).


These 8 user priorities are grouped into 4 access categories, containing two user priorities each. User priority 0 is placed into the Best Effort AC instead of the Background AC for backwards compatibility with non-QoS stations. This was done to preserve compatibility, as the IEEE deemed QoS functionality as an optional component for certification citing the lack of need for QoS by many legacy devices and applications. The mapping between 802.1D, 802.11e UP, and Access Category is show below.




(Table 9-1 courtesy of the IEEE Std. 802.11-2007 section 9.1.3.1 on page 253)

As an example implementation, the relationship between User Priority, Access Category, and Cisco’s AVVID architecture standard (which provides different guidelines for voice and video than the IEEE standards) is detailed in the table below. Also referenced are the default markings applied by the Cisco Unified wireless network.



(Table 10-6 courtesy of “Voice over Wireless LAN 4.1 Design Guide” page 10-33, by Cisco Systems)


Queuing Structure
4 priority queues are established to prioritize data frames within each station. These 4 priority queues align with the 4 access categories mentioned previously. Each frame that a station wishes to transmit is classified and placed into one of the appropriate queues.

The inter-frame spacing and random backoff timers are calculated independently and decremented in parallel for each queue. If an internal collision occurs, whereby frames from two or more queues are ready to transmit at the same time, the higher priority queue is granted access to transmit and the other queues act as if a physical collision occurred during transmission, increment their retry counter, and increase their contention window values according to binary exponential backoff. In this manner, one physical station emulates four logical stations, one for each traffic queue. The following figure illustrates these priority queues.




(Figure 2-7 courtesy of “Voice over Wireless LAN 4.1 Design Guide” page 2-10, by Cisco Systems)


Through user priorities, access categories, and queuing structures, the 802.11e amendment and WMM certification provides differentiated classification of frames and the framework for frame prioritization. In the next two posts, I'll describe how frame prioritization occurs through Adaptive Inter-Frame Spacing and Contention Window scaling.


-Andrew

Wireless QoS Part 2 - IEEE 802.11e Principles

Read the Entire Wi-Fi Quality of Service 5-Part Series:
  1. Part 1 - Background Information
  2. Part 2 - IEEE 802.11e Principles
  3. Part 3 - User Priorities, Access Categories and Queues
  4. Part 4 - Arbitration Interframe Spacing
  5. Part 5 - Contention Window and Final Thoughts
Part 2 - IEEE 802.11e Principles
Now, let's dig into the guiding principles behind wireless QoS design and the 802.11e amendment. This is part 2 of this series on wireless QoS, building on the background information from the first post in this series, which described the original Distributed Coordination Function (DCF) 802.11 medium contention protocol.


802.11e and WMM QoS Overview

The amended IEEE 802.11 wireless protocol supports a priority scheme that can provide up to 8 priority classes for traffic. This work was done as part of the IEEE 802.11e working group and was added as an amendment to the standard. Certifications of compliance with portions of this amendment are done by the WiFi Alliance through the WiFi Multimedia (WMM) certification process.

802.11e defines 8 user priorities for Quality of Service (QoS) of wireless traffic. These 8 user priorities are grouped into 4 Access Categories (AC) defined as Voice, Video, Best Effort, and Background. Each access category contains 2 different user priorities.

The design of this priority scheme is based on three major changes to the operation of the original 802.11 Distributed Coordination Function (DCF), which is now called Enhanced Distributed Coordination Access (EDCA). The three major changes are:

  1. Establishment of 4 priority queues for traffic (Access Categories), implemented on a per-station basis

  2. Arbitrated Inter-Frame Spacing (AIFS) values for each of the 4 priority queues to replace the single Distributed Coordination Inter-Frame Spacing (DIFS) value previously used for all data and management frames

  3. Random Backoff timers defining Contention Window minimum (CWmin) and maximum (CWmax) values for each of the 4 priority queues

Further information on WMM certification can be found the Wi-Fi Alliance website. In addition, the IEEE 802.11e amendment and current 802.11-2007 standard can be found on the IEEE website.


In future posts, I'll detail each of these design changes and how they're implemented. We'll also see why wireless QoS provides a statistical advantage for higher priority traffic, but cannot go so far as to perform or guarantee strict priority queuing due to the use of a shared medium and distributed contention among multiple stations. This is a fundamental difference for those familiar with QoS on wired switches, which have the ability to implement strict priority-queues over a contention-free full-duplex link.


-Andrew