Chapter 7

802.11 Medium Contention

In this chapter, you will learn about the following:

  • 802.11 Channel Access
    • Describe the operation of CSMA/CA
    • Describe the essential components of the DCF
    • Describe the steps taken before a frame transmission

That 802.11 devices are resilient is no secret. Anyone who has ever managed a WLAN in a crowded space such as a trade show or office complex can attest to that. The secret is how it all works. The IEEE 802.11 standard was blessed with an elegant mosaic of medium contention protocols that allow a large number of devices to effectively share a wireless channel. Medium contention means that all 802.11 devices—access points (APs) and base stations—with frames ready to be transmitted onto a given channel will contend with each other for access to that channel. In this chapter, we’ll discuss these protocols that govern access to the wireless medium.

We will discuss the overall design of 802.11 medium contention, as well as additional medium contention protocols that are unique to the 802.11e and 802.11n amendments.

CSMA/CA

802.11 stations, including both AP stations and non-AP stations, use carrier sense multiple access with collision avoidance (CSMA/CA) to contend for the wireless channel. If the acronym CSMA looks familiar to you as a network professional, that’s because it should: 802.3 Ethernet LANs use carrier sense multiple access with collision detection (CSMA/CD) to contend for the wired channel. That means both wired and wireless LANs use carrier sense (observing the communication medium) for multiple access (more than one device at the same time), but they just do it differently.

The difference between CSMA/CA and CSMA/CD is as simple as examining the last two letters of each acronym: wireless devices must avoid collisions (defined as failed transmissions because of multiple devices transmitting simultaneously over a shared medium), while wired stations can detection collisions. The reason? Simply that wireless stations operate in a half-duplex, wireless medium. Any entity operating in a half-duplex, wireless medium is going to be unable to detect collisions. A half-duplex communications device is one that cannot transmit and receive at the same time. Imagine what would happen, then, if a person’s ears were to shut off as soon as they started talking (thus making the person’s audio capabilities the equivalent of half-duplex). Would such a person be able to tell whether a loud noise caused their spoken words to go unheard? No. The half-duplex human would be unable to detect collisions when speaking.

The analogy of a person hearing can be expanded to better understand the differences between CSMA/CD and CSMA/CA. Since human beings can detect audio collisions, they are able to repeat their words if a loud noise is detected during speech. If humans lacked the ability to detect loud noises while they were speaking, they’d have to avoid collisions. How? One method could be by raising their hands, as in a grade-school classroom. The first person with a hand up would be allowed to talk. That analogy bears some relation to the design of CSMA/CA.

It is important to understand that collision detection is more efficient than collision avoidance. This is because any type of collision handling takes precious time on the channel. Time spent on collision handling could be more efficiently spent on transmitting data. Collision detection means that collision handling has to happen only after a collision occurs. Collision avoidance means that collision handling has to happen before any data is transmitted. The end result is that CSMA/CA causes WLANs to have a much lower throughput-to-data rate ratio than wired LANs.

Distributed Coordination Function

CSMA/CA involves use of the distributed coordination function (DCF) for non-QoS WLANs and the hybrid coordination function (HCF) using enhanced distributed channel access (EDCA) for QoS WLANs (DCF, HCF, and EDCA will be explained later in the chapter). EDCA has a design that is very similar to the design of DCF, only with added parameters that differentiate priority levels. This prioritization of traffic makes EDCA the spine of Wi-Fi Multimedia (WMM), which is a Wi-Fi Alliance certification for APs and stations that support IEEE 802.11e QoS protocols.

What Happened to the Point Coordination Function?

The point coordination function (PCF), as defined in the original 802.11 standard, and the HCF using HCF-controlled channel access (HCCA), as defined in 802.11e, are also protocols that use CSMA/CA. Neither one, however, is used in real-world WLAN devices. Both the PCF and HCCA involve the AP taking control of the wireless channel and dictating which stations are allowed to send through the use of polling.

DCF and EDCA involve a series of protocols designed to keep the wireless channel clear so that collisions are avoided. These protocols are numerous, and they can be a bit difficult to comprehend. As these protocols are discussed, always remember that the most basic goal of 802.11 medium contention is similar to the goal of having students raise their hands in class: to keep the channel clear so that collisions are avoided.

An Example of 802.11 Medium Contention

A good way to begin learning about the protocols that make up 802.11 medium contention is by examining an example of WLAN devices using the DCF. Then once you understand DCF, we’ll discuss the minor adjustments that make up EDCA.

The basic concept of DCF and EDCA is that all WLAN devices must complete an arbitration process before transmitting a frame. Arbitration entails all APs and stations staying quiet for a variable amount of time before attempting to transmit. Whichever device finishes arbitration first gains access to the channel.

In the example, there are three total 802.11 devices: one AP and two non-AP stations. Both stations are associated to the AP, which means that all three devices must contend for access to the same channel. To simplify the medium contention process as much as possible, we will stipulate that all devices are not using 802.11e QoS.

By not using 802.11e, the AP and stations become non-QoS devices. Non-QoS APs must not include any QoS information elements in their beacon frames. This includes the EDCA parameter set and the QBSS load. Both non-QoS APs and non-QoS stations must use DCF rather than EDCA for medium contention. Both non-QoS APs and non-QoS stations must also use data and null frames rather than QoS data and QoS null frames. Data and null frames are encapsulated with a header that lacks the QoS Control field.

In this example, both stations have data to send, while the AP does not have data to send. Figure 7-1 illustrates this scenario. It should be remembered that if an AP does have data to send, it uses the exact same DCF or EDCA protocols that are used by stations.

Figure 7-1: Whose turn is it?

f0701.eps

A significant aspect of the DCF and EDCA protocols that govern 802.11 medium contention is the ability of APs and stations to identify when a channel is busy. There are two carrier sense protocols used by stations to indicate whether a channel is busy or idle:

  • Physical carrier sense, also known as the clear channel assessment (CCA)
  • Virtual carrier sense, also known as the network allocation vector (NAV)

Both QoS and non-QoS devices use the CCA and the NAV in the same way. So, before either station in this example attempts to transmit data, both the CCA and the NAV must be checked in order to verify that the channel is idle.

Physical Carrier Sense

The clear channel assessment is the physical carrier sense mechanism for 802.11 APs and stations. The CCA simply involves listening to the channel. If the channel is considered occupied, then the CCA indicates a state of busy. If the channel is considered clear, then the CCA indicates a state of idle.

The CCA is set to busy if a high enough level of energy is detected coming from valid, modulated 802.11 bits. The energy detection level varies by transmit power according to the chart shown in Figure 7-2.

Figure 7-2: CCA energy detection

f0702.eps

If modulated bits are detected at those energy levels, the CCA will go busy for 15 microseconds if DSSS modulation is being used or for 4 microseconds if OFDM modulation is being used. If at the end of that period modulated bits continue to be detected on the channel at the requisite energy levels, the CCA will continue to stay busy, and 802.11 devices—both APs and stations—will continue to stay quiet.

There are two important points to remember about the CCA. The first point is that it applies only to 802.11 modulation. Interference from non-802.11 devices does not cause the CCA to go into a busy state. The other important point is that the CCA may not keep all devices within a BSS quiet. If an AP or station is too far away to detect data transmissions at the requisite energy level, the CCA may go into the idle state even though the channel is still occupied.

If an AP or station sees the CCA as idle while the channel is still occupied, it could lead to collisions. That’s why 802.11 WLANs have the NAV, which acts as a virtual alternative to the CCA.

Virtual Carrier Sense

The network allocation vector is the virtual carrier sense mechanism for 802.11 APs and stations. The NAV is a timer that counts down toward zero. When a device has a NAV value greater than zero, the device stays quiet. Once the NAV value reaches zero, the wireless medium is considered clear.

The design of the NAV is that it keeps APs and stations quiet even if the CCA cannot be used to clear the channel. There are several reasons why the CCA may fail to keep other devices on the channel quiet, including the following:

  • Too far from the transmitting device
  • Obstructions blocking the RF path from the transmitting device
  • Interference in the RF path to the transmitting device

APs and stations set their NAV values according to the Duration value inside the 802.11 header. The Duration value is contained within the Duration/ID field of all 802.11 frames except the power save poll. The Duration value will set the NAV only if the AP or station viewing the header is not the receiver of the frame.

It is important to remember that APs and stations must be within RSSI data range in order to successfully demodulate a transmitted frame so that the Duration/ID field in the header can be read. If an 802.11 device lacks the ability to receive a high-quality signal from another device on the channel because of distance, obstructions, or interference, the two devices will not be able to read each other’s Duration/ID fields and therefore will not have their NAV values set properly.

Interframe Spaces

In the example shown in Figure 7-1, both wireless stations begin the 802.11 medium contention process by staying quiet when the channel is busy because of either the CCA or the NAV. Once the channel becomes idle, the stations will look to transmit data. The problem is that if both stations begin transmitting data immediately, there will be a collision. Therefore, 802.11 devices must have additional medium contention protocols beyond the CCA and the NAV. These additional protocols must be both similar and dissimilar to the CCA and NAV. They should be similar in that they will keep APs and stations quiet in order to avoid collisions. They should be dissimilar in that channel access will be differentiated so that one device can begin transmitting while all other devices stay quiet.

The first 802.11 protocol that differentiates medium access is the interframe space (IFS). The IFS is a quiet period that APs and stations must wait before any 802.11 frame transmission. There are several different IFS times. Shorter IFS times are used before transmissions with higher priority to the channel. The idea is that if APs and stations wait for a shorter quiet period before transmitting, they will gain access to the channel while other devices are still staying quiet. Once the device that used the shorter IFS begins transmitting, all other APs and stations on the channel will hear the frame transmission and stay quiet because of the CCA.

There are six different IFS values in 802.11 networks. The specific timing and parameters of those six values will be discussed shortly. Before getting into specifics, it’s best to understand when each IFS value is used. Here are four quick rules that define which IFS will be used before a frame transmission:

  • If the arbitration has been completed, then a reduced IFS (RIFS) or short IFS (SIFS) will be used. In most cases, the SIFS is used. The RIFS is only used between consecutive frames transmitted by the same 802.11n device.
  • If arbitration has not been determined, then an arbitration IFS (AIFS) or DCF IFS (DIFS) will be used. The AIFS is used for WLANs that support 802.11e QoS, and the DIFS is used for WLANs that do not support 802.11e QoS.
  • If an AP or station has received a corrupted frame—as defined by having an incorrect frame check sequence (FCS)—then an extended IFS (EIFS) will be used.
  • The PCF IFS (PIFS) is part of PCF and therefore not used in the real world.

In the example discussed earlier, two stations both have data to send at the same time. That means both stations will have to wait an IFS before transmitting a data frame over the wireless channel. In this example, the IFS used by both stations will be the DIFS because neither station has completed the random backoff and 802.11e QoS is not in use. Figure 7-3 shows a timeline illustrating the use of the DIFS for this example.

note.eps

Both stations are staying quiet for the same amount of time because of the DIFS. That means that in this particular example, neither station has gained priority over the other in the IFS.

It is important to understand the details of all types of IFS. Here is an overview of each type of IFS.

SIFS

The SIFS is designed as a foundation for all IFSs. It is set to a static length, and its length is used to determine the length of other IFSs.

Depending on the type of WLAN, the SIFS may be either 10 microseconds or 16 microseconds long. The SIFS will be 10 microseconds for 802.11b/g/n devices operating in the 2.4 GHz band and 16 microseconds for 802.11a/n devices operating in the 5 GHz band.

SIFS is a commonly used IFS. With one exception, it is used whenever arbitration has been completed. The exception is that if an 802.11n AP or station is using multiple input/multiple output (MIMO) to transmit frames. If an 802.11n device is transmitting multiple frames as part of a contention-free burst (CFB), then the RIFS will be used between those frames instead of a SIFS.

RIFS

The RIFS is the simplest IFS to understand. The length is always the same: 2 microseconds. Only one type of device uses it: 802.11n devices using MIMO. It precedes only one type of frame: data.

The RIFS is used only between frames of a CFB. It also is used only between frames sent by a single device. It cannot be used, for example, between a data/acknowledgment pair because those frames are transmitted by two different devices.

DIFS

The DIFS is designed to force APs and stations with ordinary data in the queue to stay quiet for enough time to allow higher-priority frames to have access to the channel. It is used when the arbitration process has yet to be completed. The DIFS is made long—equal to the length of an SIFS plus two slot times.

Slot times are quiet periods, just like IFSs. Slot times are 9 microseconds in length for 802.11a/n devices operating in the 5 GHz band. The same slot time length is used for 802.11g/n devices operating in the 2.4 GHz band, but only when HT or ERP is used with the short preamble. When 802.11b/g/n devices operate in the 2.4 GHz band using DSSS, a 20-microsecond slot time is used instead. The 20-microsecond slot time is also used if HT or ERP is used with the long preamble. The short preamble is the default setting when HT or ERP is used.

note.eps

There is a third slot time. 802.11 FHSS networks use a 50-microsecond slot time. Very, very few 802.11 FHSS APs or stations were ever produced in real life, but knowing the length of the FHSS slot time is a CWAP exam objective.

The DIFS is used only by APs and stations that do not use 802.11e QoS. For 802.11e QoS devices, the AIFS is used. The AIFS will be described in the “Quality of Service” section of this chapter.

EIFS

The EIFS is designed to give APs and stations a chance to retransmit after a failed frame. It takes a complicated design to make that happen.

A failed frame happens when an AP or station fails to receive an acknowledgment after a transmission. But how do APs and stations identify failed frames that are not their own? Each 802.11 AP and station is something of an island unto itself. Each device sees the wireless channel differently because each device is located in a different location. Since each device sees the channel differently, the identification of a failed frame cannot be perfect. APs and stations must simply do the best they can to identify frame failures. The way they do this is by looking for corrupted frames.

A corrupted frame is identified by having an incorrect FCS. The FCS is a 32-bit cyclic redundancy check that is both encapsulated with the header to form the MPDU and calculated after the reception of the frame. If the calculated FCS fails to match the encapsulated FCS, then the frame is regarded as corrupt. When APs and stations hear a corrupt frame on the channel, they stay quiet for an EIFS. The EIFS length is kept long so that the channel will stay quiet long enough for the assumed failed frame to be retransmitted.

The length of the EIFS is equal to an SIFS plus a DIFS plus the time it takes an acknowledgment frame to transmit. For 802.11b/g/n devices using DSSS in the 2.4 GHz band, that works out to 364 microseconds by default. For 802.11a/n devices operating in the 5 GHz band and 802a11g/n devices operating in the 2.4 GHz band using OFDM, that works out to 160 microseconds by default. Either way, the EIFS is by far the longest of the IFSs.

PIFS

The PIFS is equal to one slot time plus one SIFS, and it is designed to give APs the chance to send a beacon in order to begin a CFP. The design of the PIFS is that it has a shorter length than the DIFS, thus giving it a higher priority.

In real-world 802.11 devices, the PIFS is only used with the Channel Switch Announcement frame, which is one of the Action frames from 802.11h. When stations have a Channel Switch Announcement to transmit, the PIFS gives them priority over all other frame types that must be sent after arbitration.

Random Backoff

In the example of two stations having data to send, the IFS is not enough to determine which device will have access to the channel. Both devices stay quiet because of the CCA and the NAV while the channel is busy, and then both devices stay quiet for the length of a DIFS once the channel becomes idle. The problem then becomes making sure that both devices don’t start transmitting data simultaneously, thereby causing a collision.

The mechanism that prevents collisions by differentiating 802.11 channel access is the random backoff. The random backoff is a quiet period before a frame transmission, similar to the IFS. Unlike the IFS, the random backoff is not static. It is a period of time that changes based on a random number chosen by each AP or station.

APs and stations stay quiet during the random backoff by randomly choosing a number of slot times and then counting down until the number of slot times equals zero. Once the number of slot times hits zero, an AP or station is allowed to transmit a frame.

If all APs and station begin contending at the same time and choose differing numbers of slot times, then collisions should be prevented assuming all STAs begin contending at the same time. As soon as one device exhausts its slot times, it will transmit, thus turning the CCA to a busy state in all other devices on the channel. In our example, one station randomly chooses three slot times, while the other station randomly chooses eleven slot times, as depicted in Figure 7-4.

Figure 7-4: Random backoff

f0704.eps

For the random backoff to work, there must be an upper and lower limit to the number of slot times that can be chosen. The lower limit for the random backoff is always 0. The upper limit for the random backoff is always equal to the contention window (CW).

The CW is derived from the equation 2x – 1, where x is a value that increments with each failed frame. For DSSS-based networks, x starts at 5, which results in a CW of 31. For OFDM-based networks, x starts at 4, which results in a CW value of 15. For both DSSS and OFDM-based networks, the x value stops incrementing at 10, which results in a CW value of 1023. It should be noted that in the real world many APs and stations will give up retransmitting the frame before it ever reaches an x value of 10. That Retry limit is defined separately, however. There is no requirement in the 802.11 standard that stations and APs endure a specific number of retries before they give up.

The design of the CW gives OFDM-based WLANs a major boost in efficiency compared to DSSS-based networks. Not only is the slot time shorter (9 microseconds compared to 20), but the random sample is half as large.

This random backoff design should also illuminate why it is so important to monitor retransmissions on a WLAN. As stated earlier, failed frames cause the CW to grow exponentially because of incrementing x values. A larger CW results in more quiet time on the channel because of larger numbers of slot times being chosen on average when APs and stations have frames to transmit. More quiet time means a less efficient channel, thus resulting in lower throughput.

Frame Transmission

Once a station or AP counts down all slot times, it is given access to the channel. The original 802.11 standard specifies that the station or AP is allowed to transmit one frame during this time. That means if an 802.11 device has a large amount of data to transmit (say, an AP sending a web page containing multimedia content to a smartphone), it will have to go through the arbitration process multiple times before the full package of data reaches its destination.

note.eps

Always remember that the transmission of frames is unrelated to data rates. Whether a station or AP transmits at 6.5 Mbps or 450 Mbps, it always gets the same level of access to the wireless channel.

After a station or AP transmits data, an acknowledgment frame must be received in order for the transmission to be considered successful. Just as with data frames, an acknowledgment frame must be preceded by an IFS. But which IFS? If you look at the IFS rules that were articulated earlier in the “Interframe Spaces” section of this chapter, you see that when a nondata frame is about to be transmitted with arbitration having already been decided, an SIFS is used. Figure 7-5 shows this process.

Figure 7-5: SIFS and acknowledgment

f0705.eps

Once the acknowledgment has been received, the data transmission process is finished. The CCA will be set to IDLE because there will be no frame transmissions on the channel. The NAV will be at 0 because Duration values are designed to be exactly large enough to allow the NAV countdown to expire by the time the acknowledgment frame finishes. At this point, stations and APs go back to the beginning of the arbitration process and start over again. Stations and APs that have already begun the random backoff timer will keep the number of slot times they chose during the previous arbitration sequence.

In some cases, the arbitration process described to this point in the chapter will be altered. Corrupted frames, QoS, and 802.11n all may change the traditional 802.11 arbitration process.

Corrupted Frames

Corrupted frames cause the 802.11 arbitration process to change only slightly. The only difference is that when APs or stations demodulate a frame transmission with an incorrect frame check sequence (FCS) value, the frame is considered corrupt, and an EIFS is used in place of a DIFS during the arbitration process.

Figure 7-6 shows the 802.11 arbitration process after the receipt of a corrupted frame.

When APs and stations are forced to stay quiet for an EIFS instead of a DIFS, it gives the device that transmitted the corrupted frame an opportunity to retransmit. The spirit of this design is that 802.11 devices should retransmit failed frames as soon as possible in order to avoid delays that could affect time-sensitive applications.

Near/Far

An unfortunate side effect of the EIFS is that it can lead to a Near/Far problem. Near/Far is a nickname given to the problem of stations that are close to an AP causing problems for stations that are further from an AP. When data is sent between the AP and the near station, it may be transmitted at a data rate that is too high for the far station to correctly demodulate. (This is why stations dynamically switch their data rates downward when moving away from APs.) The frame therefore will appear to be corrupt even though it was transmitted successfully between the AP and the near station. The far station will then have to stay quiet for an EIFS at the beginning of the arbitration process, while the near station will be allowed to use the shorter DIFS. The use of the DIFS will give the near station higher priority, thus giving the near station two or more consecutive opportunities to transmit while the far station remains quiet. If this scenario perpetuates, it can lead to far stations having an adequate signal strength to join the basic service set (BSS), but little or no opportunity to transmit data on the channel.

realworld.eps

Near/Far, iPhone Problem

Anyone own an iPhone 4? Great, isn’t it? Anyone remember the iPhone 4 unveiling? Not so great.

For those who may have missed it, the unflappable Steve Jobs was flapped during the iPhone 4 unveiling by a poor Wi-Fi connection to his demo phone. Mr. Jobs and many of the people covering the event described the problem as “interference,” and as a layman explanation, that works.

The technical explanation for the Wi-Fi difficulties at the iPhone 4 unveiling is the aforementioned Near/Far problem. When multiple APs operate on the same channel in the same area, you run into a situation where a high rate data sent to and from one AP cannot be successfully demodulated by the stations associated to the other AP. The stations from the other AP may be close enough to receive a signal but not a signal high enough to read a high rate frame. When high rate frames are received and demodulated unsuccessfully, that is seen as corrupted data. Once corrupted data is seen, stations will then start using the EIFS. At that point, it becomes a vicious cycle whereby the journalists in the crowd successfully send and receive data to the near APs set up at their seats while Mr. Jobs’ iPhone 4 continually sees those frames as corrupted and therefore continually keeps quiet.

A solution at the iPhone 4 unveiling would have been the classic solution to the Near/Far problem: try to set up the wireless network so that only one AP operates on each channel in any given area. In that specific case, offering free Wi-Fi to the journalists covering the event may have done the trick.

Quality of Service

The 802.11e amendment introduced QoS to 802.11 networks, and most of the protocols that define 802.11e affect 802.11 channel access. 802.11e defines the hybrid coordination function as a new method for channel access that improves upon both the DCF and the PCF.

HCF involves two channel access methods:

HCF controlled channel access Designed to be an improvement for contention-free access (specifically, PCF)

Enhanced distributed channel access Designed to be an improvement for contention-based access (specifically, DCF)

Both are designed to make more efficient use of the wireless channel while also prioritizing time-sensitive traffic such as voice and video.

HCCA: Same Fate as PCF Mode

As with PCF from the original 802.11 standard, HCCA from 802.11e is not used in real-world APs and stations, probably because the theoretical efficiency of the design does not hold up in the real world when other WLANs are around. The design of HCCA makes a lot of sense in that it allows the AP to create service periods. These service periods would be negotiated as traffic specifications (TSPECs), which would define what type of channel access is needed by a station in order for its applications to run successfully. The AP would then allocate service periods to each station. Stations would be allowed to sleep between service periods, thus creating the most theoretically efficient usage of both the wireless channel and the wireless stations’ power resources.

APs and stations that support 802.11e QoS protocols are called QoS APs and QoS stations, respectively. When QoS stations associate to a QoS AP, they join a QoS BSS. A QoS AP or QoS station can be identified by the Wi-Fi Multimedia certification from the Wi-Fi Alliance. For a device to gain WMM certification, it must support all EDCA protocols that are described in the “Quality of Service” section of this chapter. HCCA protocols are not required for WMM certification.

When a QoS AP and QoS stations form a QoS BSS, channel access is altered. Instead of having channel access being equal for all devices, as is the case in a non-QoS BSS, a QoS BSS has four access categories (ACs) with varying levels of channel access. The four ACs, ordered from highest priority to lowest, are voice, video, best effort, and background.

EDCA prioritizes the four ACs by altering the traditional 802.11 medium contention protocols that were originally defined as part of the DCF. The three areas of 802.11 medium contention that are altered are as follows:

IFS An AIFS is used instead of a DIFS.

CW Different access categories are assigned different CW values.

Frame transmission A transmit opportunity (TXOP) is allocated rather than allowing a single frame.

The cumulative result of these changes is that traffic in higher-priority ACs gets more access to the channel, and traffic in any access category has a lower likelihood of being slowed down by low-speed traffic on the channel. The following section describes how.

AIFS

The AIFS is the 802.11e QoS replacement for the DIFS. Like the DIFS, the AIFS is used when arbitration has yet to be completed. Unlike the DIFS, the AIFS is not a static value equal to the length of an SIFS plus two slot times.

Slot times are used to determine the length of an AIFS. The AIFS is equal to a SIFS plus a varying number of slot times. The design of the AIFS is to vary based on the priority level of the data, as based on 802.11e QoS. By default, higher-priority data uses an AIFS with fewer slot times, thus making the length of the AIFS shorter. The number of slot times used in the AIFS is called the arbitration interframe space number (AIFSN).

802.11e QoS specifies four access categories (ACs) for WLAN traffic, and each AC uses a different number of slot times.

The highest- and second-highest priority ACs are voice and video, respectively. Both voice and video use two slot times by default.

The third-highest priority AC is best effort, which uses three slot times by default.

The lowest-priority AC is background. Background uses seven slot times by default.

The end result of the AIFS is that traffic in higher priority ACs has a greater chance of gaining immediate access to the channel.

QoS-Based Random Backoff Timer

The AIFS adds a degree of prioritization to QoS-based traffic, but it is not the only mechanism that prioritizes traffic by access category. The random backoff timer is a second way that EDCA differentiates channel access.

In the DCF that is part of the original 802.11 standard, the random backoff timer has a primary purpose of keeping the channel free of collisions. It also has a secondary purpose of giving all devices equal access to the channel over time.

The 802.11e amendment keeps the primary purpose of the random backoff timer while changing the secondary purpose. In EDCA, the random backoff timer still keeps the channel free of collisions, but instead of giving equal access to all traffic, it only gives equal access to all traffic in a given AC. That may seem like a minor difference, but it is a significant one. If data from two stations or APs is part of the same AC, then EDCA operates the same as the DCF. If different ACs are operating on the same channel, however, then channel access will not be equal.

The way that tiered access is given to different ACs is by manipulation of the CW. Each AC has a minimum CW (CWmin) and maximum CW (CWmax) value defined by the AP. Like in the DCF, the CW in EDCA is equal to 2x – 1. The difference with EDCA is that the minimum and maximum values are different for each AC. These values can be configured on the AP, but the 802.11e amendment does define default x values. These default x values and their corresponding default CWmin and CWmax values are shown in Table 7-1.

Table 7-1: AIFS

Table 07-01

In the example shown earlier in this chapter where two stations are attempting to send data, the CW could work one of two different ways with EDCA. If the two stations are in the same AC, then channel access will work similarly to the way it worked with the DCF, only with different times.

If the two stations in the example shown earlier are sending traffic in different ACs, then channel access will work differently than with the DCF. Figure 7-7 shows an example of how channel access would work if one station is using the voice AC and the other station is using the video AC.

Figure 7-7: EDCA-based channel access: different ACs

f0707.eps

It should be noted that transmitting data in a higher-priority AC does not guarantee that channel access will be acquired before data that is transmitted in a lower-priority AC. All ACs still use a random backoff timer. The randomness is necessary to avoid collisions, but it also introduces enough unpredictability that it is possible that traffic from a low-priority AC could gain immediate channel access. Figure 7-8 shows an example of how this could happen:

Figure 7-8: Best-effort AC usurping the voice AC

f0708.eps

TXOP

EDCA introduces one more change to 802.11 channel access that applies to traffic in all ACs. A TXOP limit is allocated for frame transmission when stations or APs gain access to the channel. The TXOP is just a time period where one device, called the TXOP holder, has unfettered access to the channel for data frame transmissions. The data frame transmissions within a TXOP are called a contention-free burst. No DIFS or AIFS may happen, and no random backoff time may interrupt the CFB as long as the TXOP has not expired. During a TXOP, only the data that makes up a CFB and the acknowledgments for that data may access the channel.

The benefit of the TXOP is that it theoretically prevents low-speed frames from taking up disproportionately large amounts of channel time. In a DCF-based WLAN, the wireless channel is sort of like an intersection governed by a four-way stop sign. When a low rate frame is transmitted, it’s like having a car at the intersection that crosses at five miles per hour. The offending car ends up taking more time at the intersection, but so does every other car. With an EDCA-based WLAN, the wireless channel effectively becomes an intersection with a stop light. When the light turns green, cars will get a given amount of time to access the intersection. If drivers proceed through the intersection slowly, it has less of an effect on other cars that are going in a perpendicular direction.

The 802.11e amendment defines default TXOP limit values for each AC, but these values can be configured on APs. TXOP limits are set in intervals of 32 microseconds, and they are configured individually for each AC. That means that if an AP has the voice AC configured for a TXOP limit of 47 (which happens to be the default value specified in 802.11e), then all traffic using the voice AC will be allocated a TXOP of up to 1,504 microseconds whenever access to the channel is won. If the TXOP limit is lower than the time it would take one data/acknowledgment cycle to complete, then a single data frame is transmitted.

Figure 7-9 shows an example of how the channel would be allocated when TXOPs are used.

note.eps

Notice how multiple frames are transmitted without having arbitration before each frame. This is a fundamental way that TXOPs make the wireless channel more efficient.

Table 7-2 shows a list of default TXOP limit values for each AC.

Table 7-2: Default TXOP limits

Access category DSSS (b,g,n) OFDM (a,g,n) TXOP
Voice 3264 1504
Video 6016 3008
Best effort 0 0
Background 0 0

Notice how the default TXOP limit for the best-effort AC is equal to 0. A TXOP limit value of 0 means that best-effort traffic will be sent one frame at a time, just like non-QoS traffic. That is by design, because traffic in the best-effort AC is supposed to be equivalent to non-QoS traffic.

802.11n

The 802.11n amendment does not affect arbitration. 802.11n stations and APs must stay quiet when the CCA or the NAV indicates that the channel is busy, just like 802.11a/b/g stations and APs. 802.11n devices use the DIFS or AIFS, just like legacy devices. And 802.11n devices use the same slot times and random backoff timer that are used by legacy devices. Why, then, would 802.11n need to be mentioned during a discussion of channels access? 802.11n needs to be mentioned in the channel access discussion because it affects channel access after arbitration has been completed. After the CCA, NAV, IFS, and random backoff timer have had their say in which AP or station has rights to the channel, the data frame transmission and acknowledgment process gets affected by 802.11n.

802.11n adds two features to channel access that improve the efficiency of the data/acknowledgment process: the RIFS and the block acknowledgment.

Block Acknowledgments

Block acknowledgments are designed to make the acknowledgment process more efficient. They were originally introduced in the 802.11e amendment, but they were made optional, and no real-world 802.11a/b/g APs or stations that support 802.11e use them. Block acknowledgments are mandatory in 802.11n and therefore are used in the real world by every 802.11n AP and station.

The block acknowledgment process is designed to make TXOPs more efficient. The basic design of the TXOP aids overall channel efficiency as described earlier in this chapter, but it does nothing to assuage the inefficiencies of acknowledgments. Even in a standard TXOP, the normal data-acknowledgment pattern must be adhered to. When block acknowledgments are used, the data frames of a CFB may be sent consecutively, without interruption by acknowledgments. At the end of the CFB, the data-transmitting station will simply send a block acknowledgment request frame and receive a single block acknowledgment frame in return.

By adding the block acknowledgment, 802.11n stations are able to transmit larger numbers of data frames within a TXOP. For instance, a station with eight data frames to transmit could transmit all eight frames consecutively instead of having valuable TXOP time taken up by waiting to receive individual acknowledgment frames after each data frame.

In the real world, the block acknowledgment is used in a different way. Real world WLAN devices rarely, if ever, use the CFB. Once reason is that the TXOP is almost never used and another reason is that when the TXOP is used, stations and APs almost never have more than one frame ready for transmission at any given moment. 802.11n devices, therefore, use the block acknowledgment for another purpose: to acknowledge aggregated frames. As discussed in the 802.11n chapter, HT stations and APs support frame aggregation (A-MPDU in the real world; A-MSDU as well in the standard). When multiple frames are aggregated by an 802.11n station or AP into an A-MPDU, a block acknowledgment can be used to acknowledge those frames more efficiently.

RIFS

A further 802.11n enhancement that is interwoven with the block acknowledgments is the RIFS. The RIFS is a two-microsecond IFS that is used in place of the longer SIFS when a TXOP, CFB, and block acknowledgment are all in use.

The RIFS was designed for the sole purpose of improving efficiency. Two microseconds is shorter than the 10 or 16 microseconds of the SIFS, which means that the RIFS takes up less channel time.

The RIFS is used only when block acknowledgments are enabled. While block acknowledgments are an optional part of 802.11e that could be used without the RIFS, the RIFS is defined only in 802.11n.

Figure 7-10 shows the use of the RIFS.

Exam Essentials

Know CSMA/CA and the DCF. That includes the CCA, the NAV, IFS, and the random backoff timer.

Understand the carrier sense mechanisms. You should know how both the CCA and the NAV keep APs and stations quiet when the channel is busy.

Know all of the different IFSs and when they are used. This includes DIFS, PIFS, SIFS, EIFS, AIFS, and RIFS.

Understand the random backoff timer. You should know what slot times are and how the CW works.

Be familiar with EDCA. QoS changes the 802.11 medium contention process, and you should know how that works. That includes the AIFS, changes to the CW, and the use of TXOPs.

Understand how 802.11n affects medium contention. You should understand RIFS and the block acknowledgment process.

Key Terms

AIFS

background

best effort

Block acknowledgments

CCA

CFB

contention window

CSMA/CA

DCF

DIFS

Duration/ID

EDCA

EIFS

energy detection

HCF

IEEE 802.11e

IFS

NAV

Near/Far

QoS

random backoff

RIFS

SIFS

slot times

TXOP

TXOP holder

TXOP limit

video

voice

Wi-Fi Alliance

WMM

Summary

The 802.11 medium contention process may initially seem complicated, but in some ways it is quite simple. If APs and stations hear a busy channel when listening, then they stay quiet. If APs and stations cannot hear a busy channel, there is a backup way that they stay quiet. Once the channel becomes idle, APs and stations must wait some more so that there is a space between frames. And in order to avoid collisions, a randomized countdown precedes frame transmissions. Listen, wait, count, and send—that’s all there is to it.

Review Questions

1. Which coordination function is an optional method that is not used in real-world 802.11 APs?

A. ACF mode

B. DCF mode

C. ECF mode

D. PCF mode

2. Which of the following will cause a 2.4 GHz 802.11n station to stay quiet even though it has data ready to be transmitted?

A. An 802.11b station from a nearby BSS is transmitting a data frame, and the received signal is above the ED threshold.

B. An 802.11b station associated to the same BSS is transmitting a data frame, and the received signal is below the ED threshold.

C. A Bluetooth pairing has been made and detected on the channel by the AP.

D. The 2.4 GHz 802.11n station has just chosen zero slot times in the random backoff timer.

3. Which IFS is used only in between frame transmissions by the same AP or station?

A. AIFS

B. EIFS

C. RIFS

D. SIFS

4. When an 802.11n station begins the arbitration process after a failed frame transmission, which IFS is used?

A. AIFS

B. DIFS

C. EIFS

D. SIFS

5. Which two access categories use the same default AIFSN values by default? (Choose two.)

A. Voice

B. Video

C. Best effort

D. Background

6. Which two access categories use the same default CW values by default?

A. Voice

B. Video

C. Best effort

D. Background

7. An AP without RTS/CTS enabled, a station with an RTS/CTS enabled, and a station with RTS/CTS disabled all have a data frame ready to be transmitted as part of the same BSS. Which device will transmit first?

A. The station with RTS/CTS enabled will always transmit first.

B. The AP will always transmit first.

C. The station without RTS/CTS enabled will be allowed to transmit first only if it chooses the lowest slot time during the random backoff timer.

D. The station with RTS/CTS enabled will be allowed to transmit first only if it chooses the highest number of slot times during the random backoff timer.

8. In a mixed mode 5 GHz WLAN, which of the following devices would transmit first?

A. An 802.11n AP with a beacon frame to transmit after choosing two slot times

B. An 802.11n station with a data frame to transmit after choosing one slot time

C. An 802.11n station with a data frame to send and RTS/CTS enabled, no matter what number of slot times are chosen

D. An 802.11a station with a data frame to transmit after choosing zero slot times

9. What is the minimum CWmin value for an 802.11b AP?

A. 15

B. 16

C. 31

D. 32

10. What is the non-QOS CW value for an 802.11g station when it is about to transmit its second retry frame to an 802.11n AP?

A. 63

B. 64

C. 127

D. 128

11. When will an EIFS be used prior to a frame transmission?

A. When a corrupted frame has been received

B. When a station is about to send a retransmitted frame

C. When an 802.11n station is about to transmit on a mixed mode 802.11b/g/n or 802.11a/n BSS

D. When an 802.11a/b/g station is about to transmit on a mixed mode 802.11b/g/n or 802.11a/n BSS

12. Which well-known problem is EIFS known to cause?

A. Hidden node

B. Mixed mode

C. Near/Far

D. Protection mechanism

13. Which 802.11e QoS channel access method requires the QoS AP to take control of the wireless channel and manage service periods for associated stations?

A. DCF mode

B. PCF mode

C. HCF mode using EDCA

D. HCF mode using HCCA

14. Which IFS is used prior to the random backoff timer when a QoS AP or station is about to transmit a frame and a corrupted frame has just been received?

A. AIFS

B. DIFS

C. EIFS

D. PIFS

15. By default, what is the AIFSN value for the background access category?

A. 2

B. 3

C. 5

D. 7

16. By default, what is the minimum CW value for the video access category?

A. 3

B. 7

C. 15

D. 31

17. If an AP is configured with the TXOP limit for the voice access category left to the default value of 47, how many microseconds will the maximum TXOP be for traffic that uses the voice access category?

A. 47

B. 188

C. 470

D. 1504

18. What protocols are required in 802.11n to make TXOPs more efficient that are not required in 802.11e? (Choose two.)

A. Block acknowledgments

B. CFB

C. CWmax

D. RIFS

19. How many frames will be transmitted within a TXOP if the transmitting AP has four frames to send and block acknowledgments are not used?

A. 4

B. 6

C. 8

D. 10

20. How long is the RIFS?

A. 2 microseconds

B. 10 microseconds

C. 16 microseconds

D. 32 microseconds

Answers to Review Questions

1. D. PCF mode is the coordination function that involves the AP taking control of the BSS at regular intervals in order to regulate channel access. It is optional in the 802.11 standard and unavailable in APs. DCF mode is the coordination function that involves all 802.11 devices—APs and stations—arbitrating equally for channel access. It is required in the 802.11 standard. ACF mode and ECF mode are not 802.11 coordination functions.

2. A. APs and stations stay quiet because of the CCA being set to Busy whenever another 802.11 transmission is detected above the ED threshold. In the case of a 2.4 GHz 802.11n station, that means an 802.11b, 802.11g, or 802.11n frame transmission received above the ED threshold will cause the CCA to be set to Busy, no matter which BSS the frame emanates from. If frames are received at a signal below the ED threshold, then stations set the CCA to Idle and frames may be transmitted. Bluetooth transmissions will not set the CCA to Idle in 802.11 stations. When zero slot times have been chosen in the random backoff timer, an 802.11 device immediately transmits a frame.

3. C. The RIFS, which was introduced with 802.11n, is used exclusively between frames transmitted during a single CFB. A single CFB is always transmitted by a single station. The AIFS and EIFS are used exclusively between frames transmitted by different stations. The SIFS may be used during a CFB, but it may also be used prior to an acknowledgment, which would place it between frames transmitted by different stations.

4. A. Even if the previous frame transmission failed, 802.11n stations will always use the AIFS during arbitration. DIFS is used during the arbitration process for 802.11a/b/g stations that are not using 802.11e QoS if the previous frame seen on the channel was not corrupted. EIFS is used only if the previous frame transmission on the channel was received as corrupted. This is the case for all 802.11a/b/g/n stations. SIFS is never used during arbitration.

5. A, B. The voice and video access categories both have default AIFSN values of 2. The best-effort access category has a default AIFSN value of 3. The background access category has a default AIFSN value of 7.

6. C, D. The best-effort and background access categories both have default CWmin values of 15 and default CWmax values of 1023. The voice access category has a default CWmin value of 3 and a default CWmax value of 7. The video access category has a default CWmin value of 7 and a default CWmax value of 15.

7. C. The station or AP that has the lowest amount of time from the combination of the IFS and the random backoff timer will always transmit first. That means a low number of slot times allows a station to transmit first. RTS/CTS settings do not affect which station or AP will gain access to the channel first when multiple devices have data ready to transmit. APs do not have priority over stations when accessing the wireless channel.

8. D. The station or AP that chooses the lowest number of slot times during the random backoff timer will always transmit first. Frame type, 802.11a/b/g/n standards support, and RTS/CTS do not affect which station will transmit first when multiple stations have data ready to be transmitted.

9. C. The default CWmin value for 802.11b devices is 31. That is the default CWmin value whenever DSSS frame transmissions are ready to be sent. The default CWmin value for 802.11a/g/n devices is 15. Finally, 16 and 32 are not default CWmin values under any circumstance.

10. A. An 802.11g station associated to an 802.11n AP will have a default CWmin value of 15. The CW will increase exponentially with each retry. On the first retry, the CW value will be 31, and on the second retry the CW value will be 63. On the third retry from an 802.11g station that is about to transmit to an 802.11n AP, a CW value of 127 will be used. Finally, 64 and 128 are not CW values under any circumstances.

11. A. The EIFS is used only after a corrupted frame has been received. When a station has failed to receive an acknowledgment after a frame transmission, it sends a retransmitted frame. The retransmitted frame will be sent after either DIFS (non-QoS) or AIFS (QoS). Distinctions between 802.11a/b/g/n do not affect whether the EIFS is used prior to a frame transmission.

12. C. Near/Far may be caused by EIFS because successful frame transmissions may be seen as corrupted if stations are too far from the AP. The hidden node problem is caused by two stations or APs that cover the same transmission area but cannot hear each other’s transmissions. Mixed mode and protection mechanism are not problems.

13. D. HCF mode using HCCA is a QoS-based channel access method that involves the AP taking control of the wireless channel in order to manage station service periods. DCF mode and HCF mode using EDCA do not involve the AP taking control of the wireless channel. PCF mode does involve the AP taking control of the wireless channel, but it comes from the original 802.11 standard, not the 80211e QoS amendment.

14. C. The EIFS is used prior to frame transmission any time a corrupted frame has just been received. The AIFS is used prior to frame transmission when data frames are about to be sent by QoS devices. The DIFS is used prior to frame transmission when data frames are about to be sent by non-QoS devices. The PIFS is used by APs to take control of the wireless channel before a contention-free period when in PCF mode.

15. D. The background AC has a default AIFSN value of 7. Higher AIFSN values give traffic a lower priority, and background is designed to be the lowest-priority AC. Voice and video traffic uses an AIFSN value of 2 by default, and best-effort traffic uses a default AIFSN value of 3. There is no AC with a default AIFSN value of 5.

16. B. The default CWmin value for the video AC is 7. That gives video traffic a lower priority level than voice traffic (which has a default CWmin value of 3) and higher priority than best-effort and background traffic (which both have default CWmin values of 15). 802.11b stations and APs that do not support QoS use the default CWmin value of 31.

17. D. The TXOP limit value is multiplied by 32 to determine the maximum number of microseconds in a TXOP. Therefore, a TXOP limit value of 47 would result in a maximum TXOP of 1504 microseconds.

18. A, D. Block acknowledgments are optional in 802.11e but required in 802.11n. Block acknowledgments make the channel more efficient by reducing the number of acknowledgment frames on the channel. The RIFS is not part of 802.11e and is required in 802.11n. The RIFS is an interframe space of 2 microseconds, allowing the channel to be more efficient than when the SIFS of 10 or 16 microseconds is used. CFBs were introduced in 802.11e and are required. CFBs do make the channel more efficient by allowing multiple data frames to be transmitted without going through arbitration for each frame. CWmax was part of the 802.11 standard. A low CWmax value could make the wireless channel more efficient because large CW values can cause stations to spend a large amount of time in the random backoff timer before transmitting a frame.

19. C. If block acknowledgments are not used, then one acknowledgment must be received for every data frame sent. That means a total of eight frame transmissions during a TXOP that includes a four-frame CFB. If block acknowledgments were used, a four-frame CFB would result in six total frames being sent during the TXOP.

20. A. RIFS is 2 microseconds. SIFS is 10 microseconds for 2.4 GHz 802.11b/g/n devices and 16 microseconds for 5 GHz 802.11a/n devices.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset