written 5.7 years ago by | • modified 5.7 years ago |
• CSMA/CA protocol is used in wireless networks because they cannot detect the collision so the only solution is collision avoidance.
• CSMA/CA avoids the collisions using three basic techniques.
(i) Interframe space
(ii) Contention window
(iii) Acknowledgements
1. Interframe Space (IFS)
• Whenever the channel is found idle, the station does not transmit immediately. It waits for a period of time called interframe space (IFS).
• When channel is sensed to be idle, it may be possible that same distant station may have already started transmitting and the signal of that distant station has not yet reached other stations.
• Therefore the purpose of IFS time is to allow this transmitted signal to reach other stations.
• If after this IFS time, the channel is still idle, the station can send, but it still needs to wait a time equal to contention time.
• IFS variable can also be used to define the priority of a station or a frame.
2. Contention Window
• Contention window is an amount of time divided into slots.
• A station that is ready to send chooses a random number of slots as its wait time.
• The number of slots in the window changes according to the binary exponential back-off strategy. It means that it is set of one slot the first time and then doubles each time the station cannot detect an idle channel after the IFS time.
• This is very similar to the p-persistent method except that a random outcome defines the number of slots taken by the waiting station.
• In contention window the station needs to sense the channel after each time slot.
• If the station finds the channel busy, it does not restart the process. It just stops the timer & restarts it when the channel is sensed as idle.
3. Acknowledgement
• Despite all the precautions, collisions may occur and destroy the data.
• The positive acknowledgment and the time-out timer can help guarantee that receiver has received the frame.
CSMA/CA Procedure:
Fig. Shows the flow chart explaining the principle of CSMA/CA.
• This is the CSMA protocol with collision avoidance.
• The station ready to transmit, senses the line by using one of the persistent strategies.
• As soon as it find the line to be idle, the station waits for an IFG (Interframe gap) amount of time.
• If then waits for some random time and sends the frame.
• After sending the frame, it sets a timer and waits for the acknowledgement from the receiver.
• If the acknowledgement is received before expiry of the timer, then the transmission is successful.
• But if the transmitting station does not receive the expected acknowledgement before the timer expiry then it increments the back off parameter, waits for the back off time and resenses the line.