Understanding Wi-Fi Carrier Sense

The Importance of Carrier Sense
Carrier Sense (CS) is one of the most integral parts of modern Wi-Fi networks. Fundamentally, Wi-Fi is a multiple access link, which means that it is shared and requires vastly different protocol design and architecture than a point to point circuit (as any Masters graduate student studying computer science could tell you). In addition, random access to the medium is distributed across all stations on the network. Wi-Fi does not pass tokens, reserve the medium with bit-mappings, or use any other control mechanisms dictating which stations have access to transmit.

This distributed nature makes carrier sense (and subsequent medium contention) core components of network operation and efficiency. The practical implications are seen in Wi-Fi engineer's daily work. We perform site surveys, develop non-overlapping 1, 6, 11 channel plans, optimize channel re-use, and perform capacity planning all in the name of performance optimization for a network that runs over an unguided medium with random access distributed between stations. Understanding these principles of design and the protocol operation behind them are important for engineers to adequately and successfully build wireless networks.

The precursors to the IEEE 802.11 and Wi-Fi protocol design were developed in the pure ALOHAnet protocol, slotted ALOHA, and finally Carrier Sense Multiple Access (CSMA) developed for the 802.3 Ethernet specification.

As I've previously written, 802.11 Wi-Fi is based on CSMA/CA, whereas 802.3 Ethernet is based on CSMA/CD. What's the deal, one little letter difference? Well that one little letter represents a significant underlying difference between the two network protocols. What they both have in common is the need to perform Carrier Sense (CS) for medium idle/busy detection on a Multiple Access (MA) network segment (hence the CSMA portion). What differs are how stations determine if the medium is idle (Collision Detection versus Collision Avoidance), and how they are granted access to the medium once it is found to be idle (1-persistent for Ethernet versus p-persistent for Wi-Fi, where "p" indicates the probability of transmission when the medium is found to be idle). This is largely due to the inherent differences of electromagnetic signalling over guided versus unguided media (copper or fiber cabling versus the air). For an overview of collision avoidance and medium contention, see my previous series on Wireless QoS.

Let's review how carrier sense is performed.

Wi-Fi Carrier Sense Overview
Wi-Fi carrier sense is composed of two separate and distinct functions, Clear Channel Assessment (CCA) and the Network Allocation Vector (NAV). From a high level perspective, CCA is physical carrier sense which listens to received energy on the radio interface. NAV is virtual carrier sense which is used by stations to reserve the medium for mandatory frames which must follow the current frame.

It is important to note that CCA is not the same as the NAV. CCA indicates a busy medium for the current frame, whereas NAV reserves the medium as busy for future frames that are required to be transmitted immediately following the current frame.

Clear Channel Assessment
CCA is defined in the IEEE 802.11-2007 standards as part of the Physical Medium Dependant (PMD) and Physical Layer Convergence Protocol (PLCP) layer. For reference, the IEEE layer specifications include PMD, PLCP, MAC/LLC as shown below:

Clear Channel Assessment is composed of two related functions, carrier sense (CS) and energy detection (ED).

Carrier sense refers the ability of the receiver to detect and decode an incoming Wi-Fi signal preamble. In addition, CCA must be reported as BUSY when another Wi-Fi signal preamble is detected, and must be held as BUSY for the length of the received frame as indicated in the frame's PLCP Length field. Typically, any incoming Wi-Fi frame whose PLCP header can be decoded will cause CCA to report the medium as busy for the time required for the frame transmission to complete.

The PLCP header Length field indicates either the number of microseconds required for transmission of the full frame MPDU payload (DSSS), or the number of octects carried in the frame MPDU payload (OFDM) which is then used in combination with the Rate field (which identifies the modulation used for the payload) to determine the time required for MPDU transmission. Either way, the Length or Rate + Length fields give the receiver the information required to de-modulate the frame and determine how long the medium will be busy.

For reference, here is the PLCP frame header format for the DSSS PHY:

Note - for those curious, the PLCP header is always encoded at a fixed data rate so that the receiving stations can decode the information. DSSS PLCP is transmitted at 1 Mbps, DSSS Short Preamble at 2 Mbps, and OFDM at 6 Mbps. Only the frame MPDU payload is encoded at a variable data rate which is specified in the SIGNAL/RATE field.

Energy detection (ED) refers to the ability of the receiver to detect the non-Wi-Fi energy level present on the current channel (frequency range) based on the noise floor, ambient energy, interference sources, and unidentifiable Wi-Fi transmissions that may have been corrupted but can no longer be decoded. Unlike carrier sense which can determine the exact length of time the medium will be busy with the current frame, energy detection must sample the medium every slot time to determine if the energy still exists. In addition, energy detection requires a pre-defined threshold which determines if the reported energy level is adequate to report the medium as busy or idle. This is typically referred to as the ED threshold level or CCA sensitivity level. The ED threshold is usually much lower for valid Wi-Fi signals that can be decoded using carrier sense than it is for non-Wi-Fi signals. For example, the noise ED threshold must be 20 dB greater than the corresponding Wi-Fi signal ED threshold for most PHYs.

For more information on the CCA sensitivity level of each PHY, see the "Further Reading" notes at the end of this post.

As an interesting side note, when evaluating the RF environment with a spectrum analyzer, the ED threshold level value may be implemented differently than Wi-Fi stations. This may cause the spectrum analyzer's duty cycle metric to be out of alignment with how a Wi-Fi station would interpret the same environment. For example the Cisco Spectrum Expert SaGE v2 chipset reports duty cycle as any energy above the noise floor which is typically -92 to -95 dBm, whereas a client adhering to DSSS specifications transmitting at 50mW would only mark the medium as busy based on ED of -76 dBm or greater (per IEEE 802.11-2007 section This difference is worth noting, but in my experience is not cause for significant concern when evaluating an environment for noise or interference.

Network Allocation Vector
In addition to CCA determining the medium idle/busy state for the current frame and noise, the NAV allows stations to indicate the amount of time required for transmission of required frames immediately following the current frame. This is important to reserve the medium as busy for these mandatory frames.

The importance of NAV virtual carrier sense is to ensure medium reservation for frames critical to operation of the 802.11 protocol. Typically these are control frames, but not always. They include 802.11 acknowledgements, subsequent data and acknowledgement frames as part of a fragment burst, and data and acknowledgement frames following an RTS/CTS exchange.

The NAV is carried in the 802.11 MAC header Duration field which is part of the MPDU payload, and is encoded at a variable data rate as discussed previously. Therefore, not all stations within the area may be able to decode the MPDU due to insufficient SNR. However, all stations within the area should still be able to decode the PLCP header used for CCA. Since the critical frames that the NAV protects use shorter inter-frame spacing values (SIFS for example), those frames should still gain access to the medium before any other station attempts to transmit and stations will detect a busy medium through CCA carrier sense. However, the added protection through NAV reservation is lost.

Stations that are able to decode the 802.11 header extract the Duration field value and use it mark the medium as busy for the amount of time specified (in microseconds). Therefore, the transmitter should follow the strict rules defined in the 802.11 specification for calculation of the NAV value to be sent within frames. Stations (including APs) not adhering to the specification could reserve too much time in order to hog the medium, as has been accused of at least one infrastructure vendor in the past. (I won't name names, but they know who they are :)

Note - The NAV timer also accounts for time required for appropriate inter-frame spacing, such as SIFS intervals between data and acknowledgement for example.

Summary and Recap
Every Wi-Fi station must first determine the state of the medium as idle or busy through the process of carrier sense, prior to being allowed to perform pro-active collision avoidance and ultimately transmit a frame. Carrier sense is composed of clear channel assessment and the network allocation vector, which together allow for adequate sensing of the physical environment as well as reserve the medium for frames critical to the operation of the protocol.

If you're like me, you find the physical layer properties of Wi-Fi networks fascinating. These fundamental concepts of carrier sense, CCA, NAV, modulation, encoding and the underlying physical properties of radio frequency propagation form the building blocks for most of the advanced mobile technologies that form our modern civilization. It's exciting to understand these concepts and see real-world examples in front of us everyday that are shaping our culture and our lives.

My intent is to convey my joy of these concepts to you, my readers, and inspire the same passion for Wi-Fi as I have. We are a new generation of RF engineers, not all that different from generations past who invented the telegraph, radio communications, and amateur ham radio operators.


A Note on Nomenclature
PHY stands for Physical Layer Specifications.
DSSS stands for Direct Sequence Spread Spectrum, and is used in the original 802.11 PHY at 1 and 2 Mbps.
HR-DSSS stands for High Rate DSSS, and is used in the 802.11b PHY at 5.5 and 11 Mbps.
ERP stands for Extended Rate Physical, and is used with OFDM encoding with 802.11g PHY at 6 - 54 Mbps.
OFDM stands for Orthogonal Frequency Division Multiplexing, and is used in the 802.11a PHY at 6 - 54 Mbps.
HT stands for High Throughput, and is used with OFDM encoding with 802.11n PHY at 6.5 - 600 Mbps.

Further Reading
The following references are worthwhile reading for those looking for more information:

CSMA Persistence - "Computer Networks: Fifth Edition" by Andrew S. Tanenbaum and David J. Wetherall

The following sections in the IEEE 802.11-2007 standard:

PLCP Header Format in DSSS 15.2.2
PLCP Header Format in HR-DSSS 18.2.2
PLCP Header Format in ERP 19.3.2 (Can actually use any of the other 3 formats, depending on the situation)
PLCP Header Format in OFDM 17.3.2
PLCP Header Format in HT 20.3.2 (Found in the 802.11n amendment, not 802.11-2007)

CCA Sensitivity in DSSS
CCA Sensitivity in HR-DSSS
CCA Sensitivity in ERP 19.3.5
CCA Sensitivity in OFDM
CCA Sensitivity in HT (Found in the 802.11n amendment, not 802.11-2007)

NAV through, and 9.2.11