Carrier Sense and Backoff Algorithms: How Networks Manage "Traffic Jams"

In the world of networking, ensuring that multiple devices can communicate over a single medium without interfering with each other is a critical challenge. This is where Carrier Sense Multiple Access (CSMA)—often referred to as Listen Before Talk (LBT)—comes into play.

1. What is CSMA?

CSMA is a protocol where any station wishing to transmit data must first "listen" to the medium to determine if it is currently in use.

  • If the medium is idle: The station can proceed with its transmission.

  • If the medium is busy: The station must wait until the medium becomes quiet.

While this significantly reduces collisions, they can still occur due to propagation delay—when two stations sense an idle bus at the same time and begin transmitting simultaneously. Standard CSMA does not have collision detection; it will finish sending a corrupted frame even if a collision has occurred, which lowers bus efficiency.

The Solution: CSMA/CD

To improve efficiency, Carrier Sense Multiple Access with Collision Detection (CSMA/CD) was developed. In this version:

  1. Listen: If idle, send.

  2. Monitor: Continue listening during transmission.

  3. Detect: If a collision is detected, stop immediately and send a Jam signal to notify all other stations.

  4. Wait: Wait for a duration determined by a backoff algorithm before retrying.


2. Understanding Backoff Algorithms

Backoff algorithms determine exactly how long a station should wait before attempting to retransmit. The three most common strategies are:

● Non-persistent CSMA

  • Rule: If the medium is idle, transmit immediately. If busy, wait for a random period determined by a probability distribution before sensing again.

  • Pros/Cons: The random delay reduces the likelihood of collisions. However, it can lead to wasted idle time because multiple stations might be waiting even when the medium is clear.

● 1-persistent CSMA

  • Rule: If idle, transmit immediately. If busy, continue listening until the medium becomes idle, then transmit instantly. If a collision occurs, wait for a random amount of time and repeat.

  • Pros/Cons: This maximizes utilization because stations transmit the moment the bus is free. The downside? If two or more stations are waiting, a collision is guaranteed the moment the bus becomes idle.

● P-persistent CSMA

  • Rule: This is a compromise. If the medium is idle, transmit with a probability of $p$, and defer with a probability of $(1-p)$ for one time unit. If busy, continue listening until idle and repeat the check.

  • Pros/Cons: By introducing a probability factor, it balances the "greediness" of the 1-persistent approach with the "caution" of the non-persistent approach.


Conclusion: From Ethernet to IoT

With the development of network technology, Full-Duplex Ethernet has largely replaced Half-Duplex, using independent channels for sending and receiving. In such environments, collisions no longer occur, and CSMA/CD is no longer required.

However, in Wireless LANs (Wi-Fi) and the Internet of Things (IoT), backoff algorithms remain vital. Due to the broadcast nature and half-duplex essence of wireless channels, these algorithms continue to play a crucial role in ensuring stable and efficient data transmission.