CSMA-CD vs CSMA-CA: A Comparative Overview

csma
csma-cd
csma-ca
collision avoidance
wireless communication

This article compares CSMA-CD and CSMA-CA, outlining the functional differences between these two techniques. Both are protocol mechanisms primarily used in wireless systems like WLAN (Wireless LAN) to efficiently manage and utilize the wireless medium.

CSMA stands for Carrier Sense Multiple Access. CD stands for Collision Detection, and CA stands for Collision Avoidance. These protocols help in the efficient use of the wireless medium.

We’ve previously explored multiple access schemes like TDMA and FDMA, which allow multiple users to share a common bandwidth based on time and frequency division, respectively.

CSMA-CD: Carrier Sense Multiple Access with Collision Detection

CSMA-CD

Figure 1: CSMA-CD

CSMA (Carrier Sense Multiple Access) is a fundamental technique where a station “listens” before transmitting.

  • If the channel is sensed as idle, the station transmits the entire frame.
  • If the channel is sensed as busy, the station defers its transmission.

This concept is akin to the human rule of “DO NOT Interrupt Others.”

CSMA/CD operates in one of three states: contention, transmission, or idle.

CSMA - Carrier Sense Multiple Access

Figure 2: CSMA

The core idea behind listening to the channel before transmitting is to avoid collisions and, consequently, increase throughput. There are several variations of CSMA:

  • 1-Persistent CSMA:

    • Sense the channel and proceed as follows:
      • If busy, keep listening and transmit immediately when the channel becomes idle.
      • If idle, transmit the packet immediately.
    • If a collision occurs:
      • Wait for a random period and restart the process.

    It’s termed “1-persistent” because the station transmits with a probability of 1 whenever it finds the channel idle.

  • Non-persistent CSMA:

    • Sense the channel and proceed as follows:
      • If busy, wait for a random period and then sense or listen to the channel again.
      • If idle, transmit the packet immediately.
    • If a collision occurs:
      • Wait for a random amount of time and restart the process.
  • P-persistent CSMA:

    • Here, a station transmits with a probability of p.

The key difference between persistent and non-persistent systems is that non-persistent systems reduce the chance of collisions (and hence reduce efficiency), while persistent systems increase the chance of collisions.

To illustrate the difference:

If stations B and C become ready in the middle of A’s transmission:

  • 1-Persistent: B and C will likely collide.
  • Non-Persistent: B and C probably will not collide.

If only B becomes ready in the middle of A’s transmission:

  • 1-Persistent: B succeeds as soon as A ends.
  • Non-Persistent: B may have to wait.

Collision due to hidden terminal

Figure 3: Hidden terminal

The primary challenge in CSMA-CD arises from the “hidden terminal” problem.

Collisions occur when two or more nodes transmit simultaneously. Collision detection becomes ineffective if a hidden terminal exists, as illustrated in Figure 3, and the transmission is lengthy. Longer packets lead to wasted bandwidth. CSMA/CA, described below, offers a solution to this problem.

CSMA-CA: Carrier Sense Multiple Access with Collision Avoidance

CSMA-CA

Figure 4: CSMA-CA

CSMA-CA stands for Carrier Sense Multiple Access with Collision Avoidance.

The central idea here is to proactively avoid collisions rather than simply detecting them. This is achieved through RTS/CTS (Request to Send/Clear to Send) signaling and the NAV (Network Allocation Vector). This process is illustrated in Figure 4 and involves the following steps:

  • Sender initiates: The sender node transmits a short RTS (Request to Send) packet. This packet includes the duration of the intended transmission using the NAV. The NAV is broadcast to all stations within range.
  • Receiver responds: The receiver node replies with a short CTS (Clear to Send) packet. This packet can also inform the sender station/node about potential hidden nodes.
  • Hidden nodes defer: Hidden nodes will refrain from transmitting for the specified duration (indicated by the NAV).

This approach helps avoid collisions. Furthermore, since RTS and CTS packets are short, collisions are less likely to occur.

The NAV (Network Allocation Vector) is employed for virtual carrier sensing. It operates at the MAC layer and is widely used in IEEE 802.11 (WLAN) and 802.16 (WiMAX) standards.

The NAV represents the transmission time needed for a station to transmit a frame. This NAV value is broadcast in the CTS packet, informing other stations how long they should defer accessing the medium. This limits unnecessary physical carrier sensing, conserving power.

The NAV is essentially a counter that counts down to zero at a uniform rate. When the NAV is zero, it signifies that the medium is idle. Conversely, a non-zero NAV indicates that the medium is busy.

For detailed information on DIFS, SIFS, RTS, and CTS frames, refer to WLAN frame spacing and WLAN RTS and CTS frame resources.

Listen Before Talk (LBT) in Wireless Communication

Listen Before Talk (LBT) in Wireless Communication

Explore the Listen Before Talk (LBT) algorithm, its advantages like collision avoidance and efficient channel use, and disadvantages like power needs and time overhead.

wireless communication
lbt
channel utilization
CSMA vs. MACA: Key Differences Explained

CSMA vs. MACA: Key Differences Explained

Explore the distinctions between CSMA and MACA protocols for medium access control, focusing on collision handling and addressing hidden/exposed terminal problems in wireless networks.

csma
maca
wireless network

RF Interview Questions and Answers: Academic FAQ

A collection of frequently asked questions (FAQs) related to Radio Frequency (RF) engineering, useful for interview preparation and viva sessions.

rf engineering
interview question
radio frequency
Top 10 Radio Frequency (RF) Applications

Top 10 Radio Frequency (RF) Applications

Explore the diverse applications of radio frequency (RF) technology, from broadcasting and mobile communication to medical imaging and smart home devices.

rf
wireless communication
radio frequency