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
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.