IEEE 802.11 DISTRIBUTED COORDINATION FUNCTION (DCF) INTRODUCTION: In distributed coordinating function (DCF) of the IEEE 802.11 MAC protocol, coordination of channel access for contending nodes is achieved with carrier sense multiple access with collision avoidance (CSMA/CA). If a station has a packet to transmit, it checks if the medium is idle for a Distributed Inter-Frame Space (DIFS) time. If the channel is idle, it sends a Request to Send (RTS) message to the destination station. The destination station acknowledges the message by sending a Clear to Send (CTS) back to the sender. If the destination receives the packet without errors, it sends an Acknowledgment (ACK) back to the sender. Otherwise, the sender assumes that the packet did not arrive and it retransmits it again. If the medium is busy, the station defers until the medium is idle for a DIFS time and the back off algorithm is invoked. DISTRIBUTED COORDINATION FUNCTION (DCF): DCF (Fig 1) is a contention-based protocol where nodes contend for the channel. A node with a packet to transmit selects a random back-off value b uniformly from the set {0, 1… W −1}, where W is the (fixed) size of the contention window. The back-off counter decreases by one at each time slot that is sensed to be idle and the node transmits after b idle slots. In case the channel is perceived to be busy in one slot, the back-off counter stops momentarily. After the back-off counter is decreased to zero, the transmitter can reserve the channel for the duration of data transfer. First, it sends a request-to-send (RTS) packet to the receiver, which responds with a clear-to-send (CTS) packet. Thus, the channel is reserved for the transmission. Both RTS and CTS messages contain the intended duration of data transmission in the duration field. Other hosts overhearing either the RTS or the CTS are required to adjust their network allocation vector (NAV) that indicates the duration for which they will defer transmission. This duration includes the SIFS intervals, data packets and acknowledgment frame following the transmitted data frame. An unsuccessful transmission instance due to collision or interference is denoted by lack of CTS or ACK for the data sent and causes the value of contention window to double. If the transmission is successful, the host resets its contention window to the minimum value W. DCF uses the Binary Exponential Back off algorithm explained in the next Section.
Fig. 1. Distributed Coordination Function (DCF) THE BINARY EXPONENTIAL BACK OFF ALGORITHM (BEB) A station with data to send selects a back-off value based on the current contention window (CW) as follows: Back off = int (CW × rand × slot time) Where rand is a random number uniformly distributed between 0 and 1, slottime is 20μs, and CWmin < CW < CWmax, where CWmin is the minimum CW, and it is usually set to 31 and CWmax is the maximum CW and often set to 1023. At the first transmission CW = CWmin − 1, which means that the station chooses a CW from the range [0. . . CWmin − 1]. After DIFS idle time, the station senses the medium to determine whether or not it is idle. If it is idle, then the station decrements its back off value by a slot time, otherwise the back off value stays the same. When the back off value of a station reaches 0, the station transmits its packet to the destination station. If the sender receives an ACK from the destination, the transmission is assumed to be successful, and the station sets its CW back to CWmin − 1. If a collision happens, both stations back off and increase their CW exponentially to CW = 2i −1, where i is the
number of collisions. The maximum number of transmission permitted by a station is 10 times. TOOL USED: • • • •
NS2 Glomosim Opnet Omnet++
We are going to use NS2 for our simulation. NS2 is implemented with C++ as the back end and OTcl as the front end. The IEEE 802.11 standard is implemented as an agent in C++. That agent extends itself from the bi-connector class of the NS2 class hierarchy. Now this class implementing IEEE 802.11 standard could be readily used for our simulation purposes of Wireless Networks. We could configure the Wireless nodes to make use of this protocol.