Carrier sense multiple access with collision avoidance

Carrier sense multiple access with collision avoidance (CSMA/CA) is the term for the several methods used in WLANs to avoid collisions, which uses distributed control function (DCF), the mandatory access method in IEEE 802.11 communications.

By Daniel E. Capano February 18, 2015

In wireless communication, medium contention is somewhat more difficult to achieve. Wireless is an unbounded medium; that is, it is not constrained to a physical conduit such as a fiber or a copper wire. This makes detecting a collision impossible. Several wireless stations can be transmitting simultaneously and the access point (AP) will see nothing but radio frequency (RF) noise in a broad spectrum. No effective communication will occur because no single station can successfully acquire the medium and associate with, let alone find, the AP. A method was needed to allow a mobile client, or any other station, to acquire exclusive rights to the medium in order to make wireless networking possible and cost-effective. This has developed into a complicated choreography that will be discussed below.

Carrier sense multiple access with collision avoidance (CSMA/CA) is the term for several methods used in WLANs to avoid collisions. CSMA/CA is not a perfect system, but it works in most cases. The fundamental realization of CSMA/CA is distributed control function (DCF), which is the mandatory access method in IEEE 802.11 communications. DCF utilizes four key features to ensure that any station can acquire the wireless medium and effectively communicate: physical carrier sense (also called clear channel assessment, or CCA), virtual carrier sense, random back-off timers, and interframe spacing (IFS). Two other access methods, point coordination function (PCF) and hybrid coordination function (HCF), are also used.

A wireless station wishing to transmit data will first monitor the channel to see if it is idle. All mobile stations can hear the traffic of all other mobile stations. This is a crucial feature that is exploited to allow effective communication. All stations associated with a given base station subsystem (BSS) will be monitoring the medium if they’re not transmitting. If the medium is not idle, the station will not attempt to transmit; this is true for all other wireless stations on the network.

Stations detect the frames transmitted by the station that has successfully acquired the medium; within this frame is an ID/duration field containing the value representing how long the medium will be used by the station until another station can contend for the medium (ranging from 0-32,768 µs). This is called virtual carrier sense, and the value is read into all listening stations’ network allocation vector (NAV), which waits for this time period to expire before attempting transmission.

The NAV notifies all listening stations of the amount of time the medium will be busy and includes any interframe spacing and message acknowledgment. Each unicast frame must be acknowledged in order to indicate it has been received intact. The obverse is also true-a wireless station will acknowledge each frame sent by the AP. If an acknowledgment is not received, the frame is assumed to be lost and is subsequently retransmitted. It should be noted that only unicast frames require acknowledgment; multicast and broadcast frames do not require acknowledgment. If the medium is idle at the end of the time period, the station attempts to transmit. If successful in acquiring the medium, the AP will begin transmitting data.

In addition to the CCA and NAV, another protocol is used to avoid transmissions. Once the channel becomes idle as indicated by the above methods, the station will attempt to transmit immediately; unfortunately, so will every other station with the same NAV value counted down to zero. One method is IFS, which is the spacing between frames, acknowledgments, and the differential times when the medium is open for contention. Essentially, it is the time between wireless frame transmissions. The type of IFS determines what type of IEEE 802.11 traffic follows it. For instance, only acknowledgment, data, and clear to send (CTS) frames are permitted to follow a short interframe spacing (SIFS). There are several types of IFS, here listed from the shortest to the longest:

  • Reduced interframe spacing (RIFS), highest priority
  • Short interframe spacing (SIFS)
  • PCF interframe spacing (PIFS), not used
  • DCF interframe spacing (DIFS), lowest priority
  • Arbitration interframe spacing (AIS), which is used by quality of service (QoS) traffic
  • Extended interframe spacing (EIFS), which is used with retransmissions.

All IFS durations are based on the SIFS duration. Depending on the type of WLAN being used, the SIFS will be either 10µs or 16 µs. For 802.11b/g/n in the 2.4Ghz band, the duration is 10µs. For 802.11a/n in the 5 Ghz band, the duration is 16 µs. The RIFS is used only with IEEE 802.11 multiple-input and multiple-output (MIMO) and is used to precede data frames; the RIFS duration is 2 µs. DIFS is used to train stations to wait for higher priority traffic, which is preceded by a SIFS, to be transmitted. The DIFS is relatively long, being the applicable SIFS plus two 9µs "slot times." Stations that do not conform to QoS standards requiring the use of enhanced distributed channel access (EDCA) or HCF controlled channel access (HCCA) use DIFS.

The EIFS is the longest duration IFS because it is designed to allow retransmission of a corrupted or otherwise lost frames. Each unicast frame must be acknowledged or it is presumed lost. However, the EIFS allows sufficient time to determine if the frame is lost and subsequent retransmission. When the AP and associated stations detect a corrupt frame, they will wait an EIFS to allow retransmission. An EIFS equals a SIFS plus the applicable DIFS plus the time for an acknowledgment frame to be transmitted. For 802.11b/g/n in the 2.4Ghz band, an EIFS is 364µs; for 802.11a/n in the 5Ghz band, it is 160µs.

Of the two remaining IFS, PIF is not used; it is based upon the PCF, which has not been implemented. Arbitration interframe spacing (AIS) is used with QoS-capable stations to prioritize traffic.

Assuming two stations wait for the duration of a DIFS after CCA and NAV, then it is apparent that IFS alone is not sufficient to avoid collisions. To prevent both stations from transmitting at the same time, another mechanism is needed. The random back-off time is a quiet period during which a station waits to contend for and acquire the medium. The stations select a random number of slot times and then count down; this is called the contention window (CW) and is limited between an upper and lower value. As retransmissions occur, the CW is incremented to include more slot times, topping out at 1023. As a general rule of thumb, the larger the CW, the less efficient the wireless network is, which results in lower throughput. The slot time is dependent on the type of modulation used and is the time required for transmission of a single frame and acknowledgement.

The back-off timer must equal zero before any transmission can be attempted; it is the final timer used by a station before it transmits. When the timer reaches zero, the station begins assessment of, and contention for, the channel as detailed above. As each back-off occurs from subsequent collisions, the slot time increases and the back-off timer increments. Eventually, the transmission succeeds or an error is generated and sent to the transmitting station.

The PCF is an optional access method using a form of polling. Both the AP and associated stations must support PCF to operate. PCF is a method of prioritizing stations and requires an AP to allow coordination; the AP is the "point coordinator." When an AP is operating in PCF mode, it is known as the contention-free period. During this period, the AP specifically addresses PCF stations about their intention to send data. DCF can operate concurrently; when operating in DCF mode, it is known as the contention period. PCF has not been widely implemented.

The HCF is an access and coordination function defined by the IEEE 802.11e amendment. HCF, unlike DCF and PCF, allows the transmission of more than one frame. This eliminates the need to contend for the medium after each frame transmission. Multiple frames are sent in a frame burst during a transmission opportunity (TXOP). HCF and its enhanced access methods, EDCA and HCCA, will be discussed in the next segment dealing with wireless quality of service.

A special case of medium arbitration results from conditions unique to wireless networks such as "near-far" or "hidden node." In these cases, a station is too far or hidden from the rest of the network, preventing other stations from hearing its transmissions. The AP is able to communicate with the station, but owing to lower power output of mobile devices or obstructions, for instance, the mobile station is isolated from the rest of the BSS. The result is a condition where the mobile station with limited connectivity can effectively communicate with the AP but cannot hear the other stations (and vice versa) in the WLAN. This will cause collisions and retransmissions, reducing throughput. The solution is the use of request to send (RTS) and clear to send (CTS) frames.

RTS/CTS is a method of NAV distribution used to reduce the possibility of collisions. As you will recall, the NAV distribution essentially reserves the medium for the duration of a data transmission. When an AP receives an RTS frame from the remote station, it transmits a CTS frame onto the network, which also performs a NAV distribution. Even if all other associated stations have not heard the RTS transmission from the remote station, they will hear the CTS transmission from the AP and reset their NAV timer. The RTS frame represents, in microseconds, the time required to transmit CTS/data/acknowledgment frames plus three SIFS durations. The CTS transmission consists of data/acknowledgment frames plus two SIFS durations.

Another case is CTS-to-self. CTS-to-self is used by a station to reserve the medium and works the same as a RTS/CTS exchange but with lower overhead. If a station wants to transmit data, it will transmit a CTS-to-self frame to reserve the medium. All stations will reset their NAV timer and defer transmission. CTS-to-self is typically used in a mixed-mode environment where DSSS and ERP-OFDM stations coexist. One issue with this method is that if a remote station, as described above, attempts to reserve the medium, other stations may not hear the transmission. Elimination of the AP in this case will result in collisions and retransmissions. The CTS-to-self mechanism is better suited to use by an AP to reserve the medium.

Newer iterations of the contention algorithms allow blocks of frame data to be sent in excess of single frames and block acknowledgment is implemented, which has sped things up considerably.

– Daniel E. Capano, owner and president, Diversified Technical Services Inc. of Stamford, Conn., is a certified wireless network administrator (CWNA). He can be reached at Edited by Chris Vavra, production editor, CFE Media, Control Engineering,

ONLINE extras 

Home has other wireless tutorials from Capano on the following topics:

Carrier sense multiple access with collision detection

Medium arbitration

Modulation techniques

Upcoming Webcasts has wireless webcasts, some for PDH credit.

Control Engineering has a wireless page.

Author Bio: Daniel E. Capano is senior project manager, Gannett Fleming Engineers and Architects, P.C. and a Control Engineering Editorial Advisory Board member