CSMA vs. MACA: Key Differences Explained
Advertisement
This article compares Carrier Sense Multiple Access (CSMA) and Multiple Access with Collision Avoidance (MACA) techniques, highlighting the functional differences between them.
Introduction
CSMA and MACA are protocols used by the MAC (Media Access Control) layer in both wired and wireless communication systems. Their primary function is to enable efficient access to the transmission medium. Over time, numerous Medium Access Protocols have emerged, including ALOHA, CSMA, collision-free protocols, and WDMA. CSMA/CD and CSMA/CA are among the most widely used. MACA, or Multiple Access with Collision Avoidance, was designed to address the hidden terminal problem inherent in CSMA.
CSMA: Carrier Sense Multiple Access
CSMA is used in both wired and wireless networks. Before transmitting, a node using CSMA first “senses” the medium.
- If the medium is idle: The node transmits its frame.
- If the medium is busy: The node waits for a random period before attempting to transmit again.
There are two main types of CSMA: CSMA/CD and CSMA/CA.
- CSMA/CD (Collision Detection): Used in wired networks (e.g., Ethernet, as per IEEE 802.3). It’s effective in handling collisions after they occur.
- CSMA/CA (Collision Avoidance): Used in wireless networks (e.g., IEEE 802.11 WLAN series). It’s designed to be effective in preventing collisions before they happen.
What is CSMA/CD (Collision Detection)?
A CSMA/CD protocol operates in one of three states: contention, transmission, or idle. The core principle of listening to the channel before transmission is to avoid collisions and, thereby, increase throughput.
Figure 1: CSMA-CD
CSMA/CD has subtypes: 1-persistent, non-persistent, and p-persistent.
The Hidden Terminal Problem
Figure 2: Hidden terminal issue
A problem arises in CSMA/CD when a hidden terminal is present. In wireless networking, a hidden terminal is a node visible to an Access Point (AP) or router but not to other nodes within the AP’s range. This situation leads to collisions because nodes are unaware of each other’s transmissions. Collision detection becomes ineffective when a hidden terminal is present, especially if frame transmissions are long. CSMA/CA is designed to solve this issue.
What is CSMA/CA (Collision Avoidance)?
CSMA/CA, or Carrier Sense Multiple Access with Collision Avoidance, focuses on avoiding collisions altogether. It primarily uses RTS/CTS (Request to Send/Clear to Send) signaling and NAV (Network Allocation Vector).
Figure 3: CSMA-CA
The steps involved in CSMA/CA are as follows:
- RTS Transmission: The sender node transmits a short RTS packet. This packet indicates the transmission duration using NAV. The NAV is broadcast to all stations within range.
- CTS Reply: The receiver node replies with a short CTS packet. This packet may also alert potential hidden nodes to the sender station/node.
- Hidden Node Silence: Hidden nodes refrain from transmitting for the duration specified in the NAV, thus avoiding collisions.
Because RTS and CTS packets are short, collisions are less likely. NAV (Network Allocation Vector) is used for virtual carrier sensing.
Understanding Hidden and Exposed Nodes
Figure 4: Hidden Node in WLAN
The hidden node problem occurs when two stations on opposite sides of an AP can hear the AP but not each other, often due to distance or obstructions. In the diagram above, ‘A’ and ‘C’ are hidden terminals from each other because they can hear ‘B’ (the AP) but not each other.
The exposed node problem is illustrated above. In this scenario, “B” is exposed to “C.” Although B wants to transmit to A, it refrains because it receives an RTS signal from C, incorrectly assuming the medium is busy.
MACA: Multiple Access with Collision Avoidance
MACA is used at the MAC layer in wireless ad hoc networks. It addresses collision issues caused by hidden and exposed terminals in wireless systems, serving as an alternative to CSMA.
Figure 6: MACA Protocol messages
Like CSMA/CA, MACA uses the RTS/CTS mechanism. A node intending to transmit first sends an RTS signal. The receiving node responds with a CTS signal. Upon receiving the CTS, the transmitting node begins sending data to the node that sent the CTS. After the data transmission, the receiver responds with an ACK signal.
Difference Between CSMA and MACA
Here’s a summary of the key differences between CSMA and MACA:
- Hidden Terminal Solution: CSMA/CA uses RTS/CTS frames to solve the hidden terminal problem found in CSMA/CD. However, it cannot solve the exposed terminal problem.
- MACA’s Foundation: MACA builds upon CSMA/CA by adding a “duration field” in RTS/CTS frames, informing other terminals about their backoff time.
- MACAW Improvement: MACAW is an improved version of the MACA protocol. It uses RTS/CTS/DATA/ACK messages and implements fast error recovery at the link layer. It addresses both hidden and exposed node problems in WLANs.