Wireless - CSMA-CA
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) is a network protocol for managing data transmission in a shared medium, primarily used in wireless networks like Wi-Fi (IEEE 802.11 standards). Unlike wired networks, where physical connections and the Carrier Sense Multiple Access with Collision Detection (CSMA/CD) mechanism can manage data collisions directly, wireless networks face unique challenges due to their shared air medium. CSMA/CA aims to prevent collisions before they occur, which is crucial in environments where detecting collisions is more difficult or not feasible.
Here’s how CSMA/CA works:
-
Carrier Sense: Before a device begins transmitting data, it checks the medium (in this case, the airwaves) to ascertain if another device is already transmitting. If the medium is busy, the device waits for a random period before checking again, reducing the chance of multiple devices attempting to transmit simultaneously after the initial wait.
-
Collision Avoidance: To further minimize the risk of collision, CSMA/CA employs a method called the Request to Send/Clear to Send (RTS/CTS) handshake.
- RTS/CTS Handshake: A transmitting device first sends a short RTS (Request to Send) frame to the access point, requesting permission to send its data. All other devices hear this and pause their activities to avoid collisions. The access point replies with a CTS (Clear to Send) frame if the medium is clear, granting permission to the requesting device to transmit its data. This process ensures that only one device transmits at any given time, significantly reducing the likelihood of data collisions.
-
Acknowledgment: After successfully transmitting data, the sending device awaits an acknowledgment (ACK) from the receiving device. If the ACK is not received within a specified time, indicating that the transmission may have been unsuccessful (possibly due to a rare collision or other issues), the sending device will attempt to resend the data after waiting for a random backoff period.
-
Binary Exponential Backoff: If a device attempts to access the medium and finds it busy, it waits for a random backoff time before trying again. If the medium is still busy upon the next attempt, the device doubles the waiting period, up to a maximum limit. This strategy reduces the chance of collision by spreading out the retransmission attempts over time.
CSMA/CA effectively manages the transmission of data in wireless environments, where the detection of collisions is not straightforward. By attempting to avoid collisions before they happen, it helps to ensure efficient use of the wireless medium, although it may introduce some additional overhead and latency in the process.
Links:
https://networklessons.com/cisco/ccna-200-301/introduction-to-wireless-networks