• No results found

The IEEE 802.11 standard defines two methods in which an IEEE 802.11 radio card may gain control of the half-duplex medium. The default method, Distributed Coordination Function (DCF), is a random access method determining who gets to transmit on the wireless medium next. The other medium access control method called Point Coordi-

nation Function (PCF), where the access point briefly takes control of the medium and polls the stations served by the AP. DCF uses a contention-based algorithm to provide access to all traffic, which includes two methods, CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance) and DCF with RTS/CTS (Request to Send/Clear to Send). The PCF and DCF sub-layers are shown in Figure 2.3.

Figure 2.3: IEEE 802.11 protocol architecture

In IEEE 802.11 standards, carrier sensing is the primary method used to avoid colli- sions. Carrier sensing is accomplished by simply measuring the amount of energy received on the channel. If that energy is above a certain threshold, the sensing node determines

that another node is currently transmitting and that it must remain wait for the channel to become free/available.

Along with carrier sensing, inter-frame space (IFS) is primarily used to ensure that the channel is truly free. When a node is sensing the channel, the channel must be free for the length of the distributed coordination function IFS (DIFS) period. The DIFS is the longest inter-frame space, used as a minimum delay for asynchronous frames contending for access. The SIFS is the shortest waiting time for medium access and used as the wait time between the Request to Send (RTS), Clear to Send (CTS), DATA, and acknowledgement (ACK) frames. Since the SIFS is always shorter than the DIFS, this ensures that another node does not incorrectly determine that the channel is idle during the handshake and that priority is given to the transmission in progress.

In the following subsections, we discuss two medium access mechanisms in DCF, CS- MA/CA (Carrier Sense Multiple Access/Collision Avoidance) and RTS/CTS/Data/ACK.

2.1.3.1 CSMA/CA

Carrier sense with multiple access and collision avoidance (CSMA/CA) is a media ac- cess control (MAC) layer mechanism used by IEEE 802.11 wireless local area networks (WLANs). CSMA/CA is a random access scheme with carrier sense and collision avoid- ance through random backoff. The basic CSMA/CA mechanism is shown in Figure 2.4. If the medium is idle for at least the duration of the DCF (distributed coordination function) inter-frame spacing (DIFS), a node can access the medium right away.

Figure 2.4: CSMA/CA

If the medium is busy, nodes have to wait for the duration of the DIFS, entering a contention phase afterwards. Each node chooses a random backoff time within a con- tention window and starts counting down its backoff timer. The backoff timer stores a node’s residual backoff times. The node continues to sense the medium. If a node senses the channel is busy, it has to wait for the next chance until the medium is idle again. If a certain station does not get access to the medium in the first cycle, it stops its backoff timer, waits for the channel to be idle again for the DIFS duration and starts the counter again. As soon as the counter expires, the node accesses the medium. This means that deferred stations do not choose a randomized backoff time again, but continue to count down. Stations that have waited longer have an advantage over stations that have just entered, in that they only have to wait for the remainder of their backoff timer from the previous cycles. Thus, this randomly distributed delay helps to avoid collisions; other-

wise all stations would try to transmit data after waiting for the medium to become idle again. CSMA/CA reduces the probability of collision among nodes, but it cannot avoid the hidden terminal problem.

2.1.3.2 RTS/CTS/Data/ACK

To solve the hidden terminal problem discussed in Section 2.1.2, the IEEE 802.11 WLAN standard defines a medium access control mechanism using two control packets RTS and CTS. Acknowledgements are added for enhanced reliability. Figure 2.5 illustrates the use of RTS, CTS, data and acknowledgement (ACK).

Figure 2.5: DCF with RTS/CTS/Data/ACK

After waiting for the DIFS duration (plus a random backoff time if the medium was busy), the sender issues a RTS control packet. The RTS packet includes the receiver’s address of the data transmission to come and the duration of the whole data transmission. This duration specifies the time interval necessary to transmit the whole data frame and the acknowledgement (ACK) related to it. Every node receiving this RTS has to set its

network allocation vector (NAV) in accordance with the duration field. The NAV then specifies the earliest point at which the station can try to access the medium again.

If the receiver of the data transmission receives the RTS, it answers with a CTS message after waiting for a short inter-frame spacing (SIFS) interval. The CTS packet contains the duration field. All stations receiving this packet from the receiver of the intended data transmission have to adjust their NAV. The latter set of receivers need not be the same as the first set receiving the RTS packet. All nodes have to wait be- fore accessing the medium. Thus, this mechanism reserves the medium for one sender exclusively.

Finally, the sender can send the data after a SIFS interval. The receiver waits for a SIFS period of time after receiving the data packet and then acknowledges whether the transfer was correct. When the transmission completes, the NAV in each node marks the medium as free and the standard cycle can start again.

When using RTS and CTS to avoid the hidden terminal problem, collisions can only occur at the beginning while the RTS is sent. This is because two or more stations may start sending at the same time (RTS or other data packet).

The above RTS/CTS mechanism is only used in unicast communications, but not used in multicast communications. There currently does not exist an effective algorithm for implementing RTS/CTS mechanism in multicast communications for the following two reasons. First, CTS packets sent by the multicast neighbors of a transmitter have a very high probability of colliding at the transmitter. More importantly, it may not be possible

for all the multicast neighbors to agree on a common time slot for the transmission of a packet, or the delay would be very long to reach such an agreement. Therefore, all multicast implementations in wireless networks so far have used only CSMA/CA without RTS/CTS.