802.11 half duplex uses Carrier Sense Multi Access / Collision Avoidance (CSMA/CA) to ensure than collisions do not happen on the wireless network.
When a host wants to send a frame it picks a random number between 0 and 31 and counts down, 802.11b counts down in 20microsecond intervals, 802.11a and g count in 9 microsecond intervals. This is called the back off timer.
While another host is transmitting on the frequency the host stops counting, waits a length of time based on a mathematical algorithm and then continues it's count down. If the frequency is clear it then can transmit. The total time of this waiting plus the back off timer is called the contention window. The length of time calculated by the mathematical algorithm is called the NAV (Network Allocation Vector). So in actually the host doesn't stop counting and wait it just adds the NAV value onto the time it is counting down.
At the end of all this waiting the host needs to do one final check that the frequency is clear, this is called the Clear Channel Assignment (CCA). This all happens for each frame being sent.
If the frame transmission fails the process must start again, but the host picks a new random number between 0 and 127, then 0 and 255 for the 3rd attempt and 0 and 1023 for the final. After this it gives up.
After the frame is received the AP must send back an acknowledgement. This is sent with a higher priority to ensure that it gets sent and the host doesn't attempt to resend the original frame.
SIFS (Short Interframe Space) = High priority used for ACKs
DIFS = (Distributed Interfame Space) Standard priority used for normal frames
No comments:
Post a Comment