Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction to CSMA with Collision Avoidance
1.1.
Procedure of CSMA with collision avoidance 
1.2.
IEEE 802.11 RTS/CTS Exchange 
2.
Advantages of CSMA/CA 
3.
Disadvantages of CSMA/CA 
4.
Frequently Asked Questions
4.1.
On which Principle carrier sense multiple access(CSMA) is based?
4.2.
What is collision avoidance?
4.3.
What is the difference between CSMA/CA and CSMA/CD?
5.
Conclusion
Last Updated: Mar 27, 2024

CSMA with Collision Avoidance

Computer Networks

Introduction to CSMA with Collision Avoidance

In computer networking, carrier-sense multiple access with collision avoidance (CSMA/CA) is a network multiple access approaches in which nodes employ carrier sensing but only begin transmission once the channel is judged to be "idle." Nodes communicate their packet data in its entirety when they transmit.

It's especially crucial for wireless networks because using collision detection CSMA/CD isn't an option since wireless transmitters desensitize (switch off) their receivers during packet transmission.

Procedure of CSMA with collision avoidance 

Collision avoidance attempts to distribute the channel fairly among all transmitting nodes inside the collision domain to enhance the performance of the CSMA technique.

  • Prior to broadcasting, a node listens to the shared medium (for example, listening for wireless signals in a wireless network) to see whether another node is transmitting or not. It's worth noting that the hidden node issue implies that another node is broadcasting but isn't being recognized at this time.

 

  • Collision Avoidance: If another node is detected, we wait for a certain amount of time (typically random) for the node to cease broadcasting before searching for a free communication channel.

 

  • Request to Send/Clear to Send (RTS/CTS) may be used to mediate access to the shared medium at this point. Because, for example, in a wireless network, the Access Point only delivers one node at a time, this helps to alleviate the problem of hidden nodes, whereas Wireless 802.11 implementations, on the other hand, do not usually employ RTS/CTS for all transmissions; they may turn it off entirely, or at the very least not use it for short packets (the overhead of RTS, CTS, and transmission is too great for small data transfers).

 

  • Transmission: If the medium has been detected as clear, or if the node has received a CTS indicating that it may transmit, the frame is sent in its entirety. Unlike CSMA/CD, it is very difficult for a wireless node to listen and transmit simultaneously (its transmission will dwarf any attempt to listen). Continuing with the wireless example, the node waits for the Access Point to send an acknowledgment packet indicating that the packet was received and checksummed appropriately. If the acknowledgment does not come within a reasonable amount of time, it is assumed that the packet collided with another transmission, leading the node to enter a binary exponential backoff phase before trying to re-transmit.

 

  • Although CSMA/CA has been utilized in a number of wired communication systems, it is especially useful in a wireless LAN because of a typical issue in which several stations may see the Access Point but not each other. This is due to variations in broadcast power and receives sensitivity, distance, and position from the AP.

 

  • This will prevent a station from 'hearing' another station's transmission. This is the dilemma of the 'hidden node' or 'hidden station.' Collision avoidance (RTS / CTS handshake and Point coordination function) is available to devices that use 802.11-based protocols. However, it is not enabled by default. By default, they use a Carrier sensing method known as 'exponential backoff,' or (Distributed coordination function), which requires a station to 'listen' for another station's broadcast before transmitting. After asking it (Request to Send / Clear to Send), the AP (or receiver for Ad hoc networks) grants a station the exclusive right to broadcast for a set length of time.
Simplified Algorithm for CSMA/CA

Simplified Algorithm for CSMA/CA

 

IEEE 802.11 RTS/CTS Exchange 

The exchange of the Request to Send (RTS) packet issued by sender S and a Clear to Send (CTS) packet sent by the intended recipient R may optionally be added to CSMA/CA. As a result, any nodes within range of the sender, receiver, or both are advised not to communicate during the primary communication. The IEEE 802.11 RTS/CTS exchange is what this is called. RTS/CTS implementation aids in partly resolving the hidden node issue that plagues wireless networking.

Advantages of CSMA/CA 

  • It aids in the prevention of data collisions.
  • With the RTS/CTS extension, you can save excessive data transmission.
  • It prevents a terminal collision that is disguised.
  • It manages the packets and transmits them to whomever the recipient specifies.
  • When data is huge, the odds of colliding are reduced.

Disadvantages of CSMA/CA 

  • Waiting periods are longer.
  • It leads to an increase in traffic.
  • The only way to solve the hidden station issue is to use the RTS/CTS extension.
  • Make the issue of the exposed station.
  • It is inefficient in comparison to CSMA/CD.
  • It is unable to resolve the MAC layer issue in wireless networks.
  • In wireless networks, avoiding a collision is tough.

Frequently Asked Questions

On which Principle carrier sense multiple access(CSMA) is based?

The "Listen Before Talk" (LBT) is the principle of CSMA/CA. This indicates that before the station can start transmitting, the line must be verified to determine if it is free ("idle").

What is collision avoidance?

A complicated schedule that seeks to avoid possible collisions by guaranteeing that no two or more participants transmit at the exact moment. Overlapping will be recognized, and the procedure will be repeated whenever it occurs.

What is the difference between CSMA/CA and CSMA/CD?

CSMA/CD (carrier sense multiple access/collision detect) is different from CSMA/CA in that it deals with transmissions after a collision has occurred.

Conclusion

In this article, we learned about the introduction to CSMA/CA, and procedure to implement CSMA with collision avoidance, and the advantages and disadvantages of CSMA/CA. I hope you understand the carrier sense multiple access with collision avoidance(CSMA/CA). 

Recommended Readings:


Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, etc. on Coding Ninjas Studio.

Check out some of the amazing Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Basics of C, Basics of Java, Computer Networks, etc. along with some Contests and Interview Experiences only on Coding Ninjas Studio

Until then, Keep Learning and Keep Coding.

Live masterclass