Wireless QoS - Part 1


Part 1 - Background Information - The Non QOS way...


802.11 had 2 ways of getting the medium for transmission:
1. Point Co-ordinate Function : To my knowledge it was not widely implemented. In this the AP would control the usage of medium, in other words, AP was the Point of control of who gets the Access to the medium.
2. Distributed Co-ordinate Function : In this, the access to medium is decided by CSMA/CA. Let us learn more about this:

The basic principles of CSMA/CA:

In CSMA/CA, when a wireless node has a packet to send, it first listens to the channel for any active transmissions.

If there are no active transmission going on, then it sends the Packet.
If there are any active transmission going on then, then the node backs off for a random interval of time and then again checks if the medium is clear. This random timer is called as Backoff timer. If it is clear, then the node sends the packet. If it finds the medium to be busy again, it increases the Backoff timer and repeats the same process.

Medium Access is based on below:


  1. Inter-frame Spacing (IFS)
  2. Random Backoff Contention Window
  3. RTS - CTS - This will be discussed as a separate Topic here: Hidden Node Problem

First, inter-frame spacing establishes baseline intervals that certain types of frames are required to wait prior to being able to transmit. These Interframe spacing is dependent on the Type of Frame being transmitted. For Ex: If a Data packet has been sent then IFS is less as an ACK is expected, but after an ACK, any client can send a Data packet thus this IFS is more. However, this prioritization is not based on the application priority but rather on frame priority for basic functionality within the 802.11 protocol. Three IFS values are defined in a non-QoS legacy 802.11 basic service set:

Short Inter-frame Space (SIFS) is used for frames that need to immediately follow the preceding frame, generally for control purposes. Examples include control frames that are required to positively acknowledge receipt of an immediately pre-ceding frame (ACK), to reserve the medium when an explicit request to send (RTS) has been sent by a station and are responded to with a clear-to-send frame (CTS) frame, data frames immediately following a CTS, and the second or greater fragment of a fragmented frame.


Point-Coordinated Inter-frame Space (PIFS) is used when the BSS is placed into a contention-free period by the access point. This mode of operation uses the AP as a point coordinator to poll capable stations for data frames, rather than let stations contend for access in a distributed fashion. This IFS is dependent on the Point-Coordinated Function (PCF) of the standard being implemented by both the AP and stations. To date, no product implements PCF, so this IFS remains un-used in the marketplace.


Distributed-Coordinated Inter-Frame Space (DIFS) is used when the BSS is operating in DCF mode, where stations contend with one another for access to the medium using the CSMA/CA protocol. DIFS is used for all frames for which SIFS is not applicable, typically data and management frames.

All IFS values are dependent on the physical layer (PHY) implementation. DIFS values are defined with the formula: 1 x SIFS + (2 x Slot Time). The SIFS and DIFS values are as follows:

Note – 802.11g and 802.11n values are specified for both legacy interoperability with 802.11b (long) and greenfield operation (short) in the 2.4 GHz frequency band.



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


Second, the random backoff contention window further specifies how long a station must continue to wait if attempting to transmit a frame after detecting a busy medium. If the medium was busy when the station deferred access and queued a frame for transmission, there is a high likelihood that other stations also deferred access and have frames to transmit as well. Without a random backoff timer, multiple stations would then attempt to transmit frames at the exact same time, leading to a very high probability of collisions and degradation in network performance. The deferral of access due a busy medium serves to align the transmission of subsequent frames and increases the probability of collisions on the network.

By implementing a random backoff contention window on a per-station basis, frame transmissions are no longer aligned in most instances and allow for proper access by only one station to reserve the medium and transmit a frame; all other stations will recognize the beginning of a new transmission and pause their backoff timers and defer access to the new transmission. Additionally, should a collision still occur if two stations pick the same random backoff timer and no positive acknowledgment of the transmitted frame is received, the stations will increase the contention window range allowing for more possible random values to be selected and decrease the likelihood of subsequent collisions.

The contention window ranges from zero up to CWmin initially, with the potential to grow and range from zero to CWmax. Each subsequent collision (detected through a lack of acknowledgment in return) results in the station doubling the contention window size, up to the maximum value. Contention window values are decremented by one for every slot time that passes without detecting another station transmitting.

The DCF (non-QoS) contention window values are:
  • 802.11b – aCWmin 31, aCWmax 1023
  • 802.11g – aCWmin 31, aCWmax 1023 (when 802.11b stations are present)
  • 802.11g – aCWmin 15, aCWmax 1023
  • 802.11a – aCWmin 15, aCWmax 1023
  • 802.11n – aCWmin 15, aCWmax 1023

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

Summary:
  • DCF defines a distributed coordination function whereby all stations contend for access to the medium.
  • DCF is governed by the underlying CSMA/CA protocol which requires positive acknowledgment of frames and pro-active collision avoidance.
  • Each station defers access to the medium if busy.
  • Once the medium is determined to be idle through both CCA and NAV:
    • The station waits the appropriate inter-frame space (IFS) value based on the type of frame being sent.
    • If the medium was idle prior to the frame being queued, the random backoff timer is skipped.
    • If the medium was busy prior to the frame being queued, a random backoff value is selected in the range of 0 to CWmin (for the first transmission attempt), possibly up to 0 to CWmax (after multiple collisions).
      • The random backoff value is decremented by one for every slot time that passes without detecting another station transmitting.
      • Each slot time that passes, the stations checks CCA and NAV to determine if the medium is still idle, or if it is now busy with a transmission from another station.
      • If another station does begin transmitting, the backoff timer is paused until the end of transmission, the appropriate IFS value is waited, then the backoff timer resumes countdown from where it left off.
      • The random backoff timer expires (countdown to zero).
    • The station transmits the queued frame.
In subsequent posts, I will detail what changes are made as part of the 802.11e amendment to implement Quality of Service (QoS) over wireless networks.

Next in the Series:

Comments

Popular posts from this blog

Wifi Roaming Techniques : Pre-Authentication, PMK Caching, OKC, Fast Transition - 11r

802.11w Protected Management Frames (PMF)

Power Saving Techniques