DOI: 10.6084/m9.figshare.8210381.v4
title: Validation of IEEE 802.11 DCF and Optimization of RTS Threshold

description: 802.11 Distributed Coordination Function (DCF) is a protocol which uses carrier sensing along with a four way handshake to maximize the throughput while preventing packet collisions. A packet collision is defined as any case where a node is receiving more than one packet at a time, resultingin neither packet being correctly received. The 802.11 protocol is the most well known and widely used wireless networking protocol in real applications. Essentially, 802.11 is a carrier sensing multiple access with collision avoidance(CSMA/CA) medium access control (MAC) protocol using a direct sequence spread spectrum (DSSS) physical interface.<br>In 802.11, priority access to the wireless medium is controlled by the use of inter-frame space(IFS) time between the transmission of frames. Totally three IFS intervals have been specified by 802.11 standard: short IFS(SIFS), point coordination function IFS(PIFS), and DCF-IFS(DIFS). The SIFS is the smallest and the DIFS is the largest. The station may proceed with its transmission if themedium is sensed to be idle for an interval larger than the Distributed Inter Frame Space(DIFS). If the medium is busy, the station defers until after a DIFS is detected and then generate a random back-off period before transmitting. The back-off timer counter is decreased as long as the channel is sensedidle, frozen when the channel is sensed busy, and resumed when the channel is sensed idle again for more than a DIFS. A station can initiate a transmission when the back-off timer reaches zero. The back-off time is uniformly chosen in the range (0, w&gt;1). Also (w&gt;1) is known as Contention Window(CW), which is an integer with the range determined by the PHY characteristics CWmin and CWmax. After each unsuccessful transmission, w is doubled, up to value 2^m * W where W equals to (CWmin+1) and 2^m * W equals to (CWmax+1) .<br>Upon received a packet correctly, the destination station waits for a SIFS interval immediately following the reception of the data frame and transmits a MAC ACK back to the source station, indicating that the data frame has been received correctly. In case the source station does not receive an ACK, the data frame is assumed to be lost and the source station schedules retransmission with the CW doubled. When the data frame is transmitted, all the other stations hearing the data frame adjust their Network Allocation Vector(NAV), which is used for virtual CS at the MAC layer, based on the duration field value in the data frame, which includes the SIFS and the ACK following the data frame.<br>The basic functionality of 802.11 is as follows. Assume that a node has data that it needs to transmit. First it will wait a random backoff time. This is a random number of time slots which is within a contention window. If at any time the node senses that another node is using the channel, it will pause its timer until the other node has finished transmitting. When the backoff time has expired, the node will sense the channel to determine if there is another node transmitting. If the channel is clear, it will then wait for a short time and sense the channel again. If the channel is still free, it will transmit a request to send (RTS) to the destination. The destination will respond with a clear to send (CTS) if it is available to receive data (i.e. if it is not receiving data from another node) 802.11 Distributed Coordination Function (DCF) maximizes throughput while preventing packet collisions. When the source node receives the CTS, it will transmit its data. Along with both the RTS and CTS, a network allocation vector (NAV) is transmitted. After correct reception of the data, the destination will transmit an acknowledgment (ACK) back to the sender. At this point, if the sender has more data to transmit, it will again begin its backoff and repeat the process. This process is demonstrated in figure above.<br>In 802.11, carrier sensing is the primary method used to avoid collision. Carrier sensing is accomplished by simply measure the amount of energy received on the channel. If that energy is above a threshold, the sensing node determines that another node is currently transmitting and that it must remain silent.Along with carrier sensing, interframe spacing is primarily used to ensure that the channel is truly free. When a node is sensing the channel, it must be free for the length of the DCF interframe spacing (DIFS) period. The short interframe spacing (SIFS) is used as the wait time between the RTS, CTS, DATA and 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.<br>Default value of RTS threshold is 2347 bytes and the allowed range is 0-2347 bytes, only minor change is recommended. If a network packet is smaller than the preset RTS threshold size, the RTS/CTS mechanism will not be activated. The wireless router sends Request to Send (RTS) frames to a particular receiving computer and negotiates the sending of a data frame. After receiving an RTS, the computer responds with a Clear to Send (CTS) frame to acknowledge the right to begin transmission. This feature will prevent packet collisions on wireless network but it slows down network throughput too if used incorrectly. If you have many wireless users located far apart and also far from wireless router/access point, you can then test to decrease this threshold to 2304 bytes and check the result. The optimal tuning of the RTS threshold allows the network to choose an access mode, that will guarantee the best throughput performance.