CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance)
CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance)
CSMA/CA is a random access protocol that tries to avoid collisions before they occur. It is mainly used in wireless LANs (Wi-Fi), where detecting collisions during transmission is difficult.
How CSMA/CA works
1. Sense the channel
The station checks whether the wireless channel is idle or busy.
2. Wait if necessary
If the channel is busy, the station waits. When it becomes idle, the station waits for a specified interval and selects a random back-off time.
3. Transmit the frame
When the back-off timer reaches zero, the station transmits its frame.
4. Receive acknowledgment
The receiver sends an ACK if the frame is received correctly. If the sender does not receive the ACK, it assumes the transmission may have failed and retries after a back-off.
Optional RTS/CTS mechanism
CSMA/CA may also use two control frames to reduce collisions:
RTS (Request to Send): The sender requests permission to transmit.
CTS (Clear to Send): The receiver grants permission.
Other stations hearing these frames defer their transmissions for the indicated duration.
CSMA/CD vs CSMA/CA
CSMA/CD | CSMA/CA |
|---|---|
Collision Detection | Collision Avoidance |
Detects collisions during transmission | Attempts to prevent collisions before transmission |
Used in traditional shared, half-duplex Ethernet | Used in Wi-Fi networks |
Aborts transmission when a collision is detected | Uses waiting, random back-off, and acknowledgments |
Key point to remember: CSMA/CD detects a collision after it happens, whereas CSMA/CA tries to reduce the probability of a collision before transmitting. CSMA/CA cannot eliminate all collisions.
Comments
Post a Comment