Distributed Coordination Function (DCF)

802.11 Coordination Functions are the Medium Access Control (MAC) mechanisms for which a number of wireless devices are orchestrated within the shared medium (the electromagnetic spectrum). In this post we take a look at the Distributed Coordination Function (DCF).

DCF is the only mandatory MAC mechanism in 802.11. DCF establishes a series of intervals to defer access to the medium. A wireless station with data to transmit will hold it back until the timing is right, minimising the chances of collision with other stations.

The intervals defined in DCF are:

  • DIFS: DCF Inter Frame Space. This is the interval a station will listen to the medium before transmitting.
  • SIFS: Short Inter Frame Space. The interval required before transmitting a response frame (for example, responding to a data frame with an ACK frame).
  • BackOff Time: This is a random interval, different for each station.

We’ll dive into these intervals in a moment, but let’s first take a look at a simple example with two stations (STA1 and STA2) transmitting to an Access Point (AP):

In this example, STA1 listens to the medium for at least DIFS, but has no data pending to transmit. It finds the medium to be idle, so as soon as a data frame (DATA1) is ready, it is sent immediately.

Shortly afterwards, STA2 wants to transmit, but finds the medium busy. So it listens until the medium is clear and then waits DIFS and the Back-Off timer. STA2 keeps listening during DIFS + Back-Off, and since the medium is still available when the Back-Off expires, it then sends DATA2.

Meanwhile, STA1 is ready to send a new data frame (DATA3). In this case, it must wait DIFS + the Back-Off timer, so STA1 starts the timer countdown. However, before the countdown reaches zero, STA1 hears the transmission (DATA2) from STA2, so it pauses the countdown. The remaining countdown (in grey in the diagram) is then resumed after one additional DIFS when the medium is clear again. The medium is still clear when the countdown reaches zero, so STA1 transmits DATA3.

Update: Why STA1 needs the Back-Off timer to tansmist DATA3, but not DATA1? Find out in this post.

DIFS, SIFS, Back-Off

Let’s take a closer look at the intervals (DIFS, SIFS and Back-Off). To understand these, we need to introduce a new concept: the slot time. This time interval is fixed and different for every 802.11 standard.

Similarly as the slot time, SIFS is also fixed and different for every standard. DIFS is a function of both, and is calculated with this formula:

DIFS = (2x slot time) + SIFS

The following table shows the slot time, SIFS and DIFS for 802.11.

The figures in the coloured cells are the timing parameters for Access Points that have a mix of 802.11b/g/n (2.4 GHz) devices associated, to maintain backwards compatibility.

Now the Back-Off timer. This is made up by adding slot times up – how many? Each station picks a random number in the interval {1..CW}. With CW ranging from 15 to 1023.

In our example above, STA1 picks “5”, and STA2 picks “3”. Both stations start their Back-Off timers at the same time, however since STA2’s timer is shorter, it manages to transmit DATA2. Meanwhile, STA1 pauses its timer after the third time slot, and resumes the countdown when the medium is available.

Conclusions

DCF is an effective contention mechanism but is far from being efficient. These are its major drawbacks:

  • It assumes that every station can hear each other within a BSS, which is not always the case (“hidden node” problem).
  • There is no priority for data frames that require low latency, which can affect real-time applications.
  • Low-rate stations occupy the medium for much longer than higher-rate stations, as the former require more airtime to transmit the same amount of data (no airtime fairness).

The “hidden node” can be addressed with the use of a handshake mechanism involving the use of Request-to-Send / Clear-to-Send (RTS/CTS) messages. This post dissects its functioning.

Priority (QoS) is introduced in the 802.11 standard with the 802.11e amendment (2005). 802.11e defines the new Hybrid Distribution Function (HDF), and assigns Traffic Categories (TC) to different types of traffic. This post discusses HDF in detail.