Contention Algorithms

The client STA must locate an AP to which it desires to connect which it does either actively or passively.

The 802.11 MAC layer provides the following functions.

  • Scanning – Process used to discover BSS or to discover access points within a known BSS. It can either be done passively (Beacon frames) or actively (Probe Request/Response frames).
  • Synchronisation – Some 802.11 features require all stations to have the same time.
  • Frame Transmission – Client STA must abide by the rules for the BSS to which they are associated or want to get associated. These rules are the DCF and EDCF.
  • Authentication – Open System Authentication is performed before a station can be associated with a BSS.
  • Association – After successful authentication, the station can be associated with the BSS. This includes discovery of capabilities information in the both the direction.
  • Reassociation – When user/client device roams, they will reassociate with another AP in the same ESS.
  • Data Protection – Data encryption might be in place to prevent it from getting hacked.
  • Power Management – These features are provided to better manage the battery power and extending it, this can include the transceiver to sleep for discreet specified intervals.
  • Fragmentation – In certain scenarios, it is beneficial to fragment frames before transmission on wireless medium.
  • RTS/CTS – One of the features which will help in preventing hidden node problems allow more centralized control of access to the medium.

DCF (Distributed Coordinated Function)

  • All 802.11 devices support DCF. It is the CSMA/CA method implemented in the 802.11 standard.

Ethernet IEEE 802.3 use CSMA/CD for collision management. Since the nature of wireless networks they cannot detect collision but can only avoid it which is CSMA/CA (collision avoidance). Collisions are one of the possible ways to explain for failure of frame transmissions.

  • In a phone call when both the parties try to speak at the same time, the effectiveness of communication is drastically reduced. Usually both will stop for random amount of time and one of them will resume the conversation. This analogy best describes collision detection as opposed to collision avoidance.
  • The “carrier sense” in CSMA means that the devices attempt to sense whether the physical medium is available before commencing the transmission. The “multiple access” indicate multiple devices accessing the physical medium. On ethernet networks collisions are not as much of a concern because devices have dedicated physical connections (wires).
  • In CSMA/CA – collision avoidance is achieved by signalling to other devices that a particular device is about to communicate. It may not be perfect due to hidden node issues but it does improve efficiency of communication in 802.11.

Carrier Sense & Energy Detect

CS – Process to check if medium is busy/available for communication. There are 2 types of carrier sense mechanisms:

  • Physical Carrier Sense > Uses CCA (Clear Channel Assessment) to determine medium availability. This is provided by PHY and not MAC, though it reports to the MAC. CCA is accomplished by monitoring the medium to determine if the amount of RF energy exceeds certain threshold (energy detect) or if a Wi-Fi signal is being transmitted (carrier sense).
  • Virtual Carrier Sense > Uses NAV (network Allocation Vector) is provided by the MAC and not PHY. The NAV timer in each client STA is used to determine if the medium can be used or not. If the NAV has the value of 0, the station may be able to use the medium.  The STA must wait for the NAV timer counts down to 0. STA configure their NAV timers based on the duration field.

Interframe Spacing

IFS is the time interval in which frames cannot be transmitted by client STA within a BSS. This ensures frames not overlapping. Time intervals differ from each frame type. IFS is an IEEE 802.11 feature and not be linked or confused with IEEE 802.11e or QoS solution. Below are the IFS types discussed


SIFS – Shortest IFS – as the name goes is the shortest of all the available IFS parameters in 802.11 devices preceding 802.11n. The new RIFS (Reduced IFS) is even shorter still introduced in 802.11n but deprecated in 802.11ac.

  • Frames that are specified to use SIFS interval will take priority over frames that are specified to use other IFS.
  • ACK frames immediately following the receipt of the data frame.
  • CTS frames sent as a response to RTS frames
  • With the exception of first exchange
    • All frame exchange made in PCF (Point Coordinated Function) mode.
    • All frame fragments that are part of a fragment burst.
  • The slot time intervals for various PHYs are:
    • DSSS, HR/DSSS, ERP – 10 µs
    • FHSS – 28 µs
    • OFDM (HT/VHT) – 16 µs

RIFS is only 2 µs in length and can be used in 802.11n device in place of SIFS which do not allow legacy devices (Greenfield Mode).

PIFS (Point Coordination Function IFS) is neither the shortest or longest interval, resulting in priority greater than DIFS, but less than SIFS. When an AP needs to switch the network from DCF to PCF mode it will use PIFS frames. PCF is an optional part in IEEE 802.11 and has not been implemented in any market devices. Below are the slot times.

  • DSSS, HR/DSSS, ERP –  20 µs
  • OFDM -9 µs
  • HT – 20 µs (long in 2.4GHz); 9 µs (short in 2.4GHz and always used in 5GHz)
  • VHT – 9 µs

DIFS is the longest of all the IFS type. It is used by the standard data frames. The greater delay interval ensures that frames specified for SIFS and PIFS intervals can transmit before DIFS data frames.

  • DSSS – 50 µs
  • OFDM – 34µ

AIFS (Arbitrary IFS) is used in QoS stations those implementing EDCA. AIFS is used for all data, management and some control frame types by a QoS station. The control frames which using AIFS include – PS-POLL, RTS, CTS(when not responding to RTS), BlockAckReq, BlockAck

EIFS (Extended IFS) used when frame reception begins, but received frame is incomplete or corrupted based on the FCS. When the last frame the station received was corrupted, it uses EIFS for the next frame to transmit. EIFS interval is the longest of the IFS intervals and is calculated based on below complex algorithm.

  • EIFS = SIFS + (8 * ACKsize) + Preamble Length + PLCP Header + DIFS)

Contention Window (CW)

The IFS delay interval is not the end of the wait for devices seeking wireless contention. After the IFS delay interval has passed, the device must the initiate backoff algorithm and then contend for the medium. This random backoff algorithm is processed and applied using CW. The “Window” is a range of integers from which one is chosen at random. We can think it to be like contention range instead of window for helping us remember this concept better.

All stations having a frame to transmit choose a random integer within the range specified as the contention window. Next the predefined algorithm multiples the random-chosen number by the slot time.

CW Explained

Imagine Client STA “A” wants to transmit one data frame in the medium.

  1. Data frame will be required to use “DIFS” since its standard data frame.
  2. A finds that the frame being transmitted had a duration value of 20 µs.
  3. A sets a NAV timer of 20 µs and waits for it to go to zero (0).
  4. A uses carrier sense and detects that medium is silent.
  5. A must wait for the DIFS interval to expire, since the station is using OFDM it waits for 34 µs.
  6. A waits for the random backoff timer to expire, and when it does the station uses carrier sense again to detect if medium is silent.
  7. A begins transmitting the data frame.

All this assumes the network is using DCF, otherwise if AIFS would be used before a QoS Data Frame is transmitted.

Even with all above efforts collisions can occur. To deal with these ACK frames are used.

EDCA (Enhanced Distributed Channel Access)

QoS was introduced by 802.11e standard which implements Layer 2 solution for the wireless link. The AP/WLAN controllers have the ability to convert the 802.11 QoS markings to 802.1p and/or DSCP markings for communications on the wired side.

The basic enhancement provided by 802.11 Frames are assigned an access category in one of the 4 AC (access category) values:

  • AC_BK – Background (lowest) – aCWmin/max 15/1023
  • AC_BE – Best Effort – (lowest)  aCWmin/max 15/1023
  • AC_VI – Video – (medium)  aCWmin/max 7/15
  • AC_VO – Voice (highest)  aCWmin/max 3/7

Higher priority categories use smaller contention windows. The variation in random backoff times is a key differentiation between DCA and EDCA. Additionally if AIFS is used which has variable duration depending on the AIFS number AIFSN associated with the AC. Higher priority AC will have lower AIFSN.


The Wi-Fi Alliance created WMM (Wireless Multimedia) certification to validate that devices implement EDCA as defined in 802.11e. In addition to WMM parameters for the access categories and AIFSN, they have also introduced

  • WMM Power Save
  • WMM Admission Control

aCWmin is a variable defined in each PHY 802.11 standard. The variable are defined as:

  • DSSS, HR/DSS – 31
  • ERP – 31/15 depending on the need for backward compatibility
  • ODFM, HT, VHT – 15

With the values provided, we can determine the Cwmin for AC_VO would be 7 for ERP with backward compatibility ERP(31+1)/4 -1 = 7. Below table can be referenced.

Machine generated alternative text:
(aCWmin + 1) / 2 — 1 aCWmin 
(aCWmin+ 1) / 4-1 
(aCWmin + 1) | 2 
Table 6.1: WMM Default Settings 

QoS Configurations and Operations.

WMM Parameters are included in the Beacon frame. A WMM-Compliant STA is expected to update its WMM parameters to match. This behavior results in shared parameters throughout the BSS.

The TxOP (Transmit Opportunity) defines the maximum amount of time in QoS STA that wins the TxOP may use the medium in bursts. The parameter can be defined for each access category (AC) queue. A TxOP of 0 means STA can send only 1 frame and must enter into contention procedures again. BK & BE use TxOP of 0.

Machine generated alternative text:
TABLE 7.2 
Access category 
gest effort 
Default Txop limits 
Dsss (b,g.n) 
OFDM Txop 

Verifying QoS Parameters

  • Look at AP/WLAN configuration
  • Capture frames (Beacon, Probe Response & Association Response) to view the WMM parameters (may only tell what AP expects the client to use for their WMM, best to check WLAN configuration).

The phrase end to end QoS indicates that all devices in the communication chain (Clients > AP > WLAN > Switches > Routers > Gateway, etc.) must comply and implement QoS required within their internal frame and packet processing algorithms. If one switch is not adhering to the QoS tags, it will not be implemented.

Additionally you can read more about this in my other blog post.

Leave a Reply

Your email address will not be published. Required fields are marked *