Carrier Sense Multiple Access (CSMA) (original) (raw)

Last Updated : 3 Oct, 2025

Carrier Sense Multiple Access (CSMA) is a method used in computer networks to help devices share a communication channel without interfering with each other. Before a device sends data, it listens to the channel (or senses the carrier) to check if it’s free.

**Note: It works at the data link layer and was designed to reduce the chances of network traffic collisions, making communication smoother and more efficient. By checking the medium before transmitting, devices using CSMA improve overall network performance.

Types of CSMA Protocol

There are two main types of Carrier Sense Multiple Access (CSMA) protocols, each designed to handle how devices manage potential data collisions on a shared communication channel. These types differ based on how they respond to the detection of a busy network:

  1. CSMA/CA
  2. CSMA/CD

Vulnerable Time in CSMA

Vulnerable time is the short window in which there's a risk of collision between two devices trying to send data on the network at the same time. In CSMA-based networks like Ethernet or Wi-Fi, each device listens to the channel before transmitting.

CSMA

Propagation Time

**Note: Vulnerable Time = Propagation Time (Tp), This is the time it takes for a signal to travel from one device to another.

Types of CSMA Access Modes

There are 4 types of access modes available in CSMA. It is also referred as 4 different types of CSMA protocols which decide the time to start sending data across shared media.

What is CSMA/CA?

Why is CSMA/CA Needed?

Working Principle of CSMA/CA

The CSMA/CA protocol ensures that before a device transmits, it checks if the communication channel is free and then uses additional strategies to minimize collision chances.

Process Steps:

  1. **Initialize Attempt Counter (K = 0): Each device keeps track of retransmission attempts.
  2. **Sense the Channel: The device listens to see if the channel is busy, If busy -> Wait until it becomes free.
  3. **Interframe Space (IFS): After the channel is idle, the device waits for a short fixed time.
  4. **Check Again: If still idle after IFS, continue; otherwise, repeat sensing.
  5. **Random Backoff: Choose a random number R in a contention window to delay transmission.
  6. **Transmit Data Frame.
  7. **Wait for Acknowledgment (ACK): If ACK received -> Success & If ACK not received -> Assume collision, retry (K = K+1).
  8. **Retry Limit: If attempts exceed maximum K_{max}, abort transmission.

Strategies Used in CSMA/CA

  1. **Interframe Space (IFS): A short waiting period after the channel becomes idle to avoid immediate collisions. Devices with shorter IFS have higher priority.
  2. **Contention Window: A device waits for a random number of time slots before transmission, reducing the chance of simultaneous access.
  3. **Acknowledgments (ACKs): The receiver sends back an acknowledgment if data is received correctly. If no ACK is received, retransmission occurs.
  4. **RTS/CTS Mechanism (Optional): Request-to-Send (RTS) -> Sender asks for permission. Clear-to-Send (CTS) -> Receiver replies if the channel is clear.

**Note: This helps solve the hidden terminal problem in wireless networks.

Features of CSMA/CA

Applications of CSMA/CA

Comparison of Various Protocols

**Protocol **Transmission behavior **Collision detection method **Efficiency **Use cases
**Pure ALOHA Sends frames immediately No collision detection Low Low-traffic networks
**Slotted ALOHA Sends frames at specific time slots No collision detection Better than pure ALOHA Low-traffic networks
**CSMA/CD Monitors medium after sending a frame, retransmits if necessary Collision detection by monitoring transmissions High Wired networks with moderate to high traffic
**CSMA/CA Monitors medium while transmitting, adjusts behavior to avoid collisions Collision avoidance through random backoff time intervals High Wireless networks with moderate to high traffic and high error rates

Pros of CSMA

Cons of CSMA