CSMA/CD and CA
Carrier Sense Multiple Access basics.
In any shared communication medium, multiple devices attempt to transmit data simultaneously, which leads to collisions and data loss. Carrier Sense Multiple Access (CSMA) is a set of protocols that governs how devices access a shared channel by first listening before transmitting. CSMA/CD and CSMA/CA are two distinct variants designed for wired and wireless environments respectively, and understanding their differences is essential for both network design and GATE examination.
Core Concept of CSMA
The fundamental principle behind CSMA is carrier sensing — before a node transmits, it listens to the channel. If the channel is idle, transmission begins. If the channel is busy, the node waits. This reduces but does not eliminate collisions, because two nodes may sense the channel simultaneously as idle and both start transmitting at the same instant, causing a collision.
There are three persistence strategies within CSMA. In 1-persistent CSMA, a node waits for the channel to become free and then transmits with probability 1, leading to high collision probability. In non-persistent CSMA, if the channel is busy, the node waits a random time before re-sensing, reducing collisions but also reducing channel efficiency. In p-persistent CSMA, the node transmits with probability p when the channel is free, and waits for the next slot with probability 1-p.
CSMA/CD: Collision Detection
CSMA/CD is used in wired Ethernet networks. After initiating transmission, the node simultaneously monitors the channel. If a collision is detected, it sends a jam signal to notify all nodes, then stops transmitting. Each colliding node waits a random backoff time computed using the binary exponential backoff algorithm before retransmitting. The backoff time is chosen randomly from the range [0, 2^k - 1] slot times, where k is the collision count (up to a maximum of 10).
A critical constraint in CSMA/CD is the minimum frame size. A node must continue transmitting long enough to detect a collision even if it occurs at the far end of the cable. The minimum frame transmission time must be at least twice the propagation delay, i.e., T_tx >= 2 * T_p. For Ethernet, this gives a minimum frame size of 64 bytes.
CSMA/CA: Collision Avoidance
In wireless networks, a transmitting node cannot simultaneously detect collisions because its own strong signal overwhelms the received signal. So CSMA/CA attempts to avoid collisions before they occur rather than detecting them after. After sensing the channel as idle for a duration called DIFS (DCF Interframe Space), the node starts a backoff counter. This counter decrements only when the channel is idle, pauses when busy, and transmission begins when the counter reaches zero.
An optional RTS/CTS (Request to Send / Clear to Send) mechanism is used to handle the hidden node problem. Node A and Node C may not hear each other but both communicate with Node B. Without RTS/CTS, they can collide at B without knowing it. With RTS/CTS, Node A sends RTS to B, B replies CTS, and all nodes hearing the CTS suppress their transmissions for the duration of the exchange.
Mathematical Expression
The efficiency of CSMA/CD under the condition of a long cable with many stations can be approximated. Let T_t be the frame transmission time and T_p be the propagation delay. The parameter a = T_p / T_t quantifies the ratio of propagation delay to transmission time. For low a (short cable or large frames), efficiency approaches 1. Efficiency is given by:
Efficiency = 1 / (1 + 2a) for the 1-persistent CSMA/CD case under ideal conditions.
For the backoff algorithm, after k collisions, a node picks a random integer r from [0, 2^k - 1]. The backoff time is r multiplied by the slot time (512 bit times in Ethernet). This exponentially increases the waiting range with each successive collision, spreading out retransmission attempts.
Practical Understanding
CSMA/CD is now largely historical since modern Ethernet uses switches that provide dedicated point-to-point links per port, eliminating collision domains entirely. However, CSMA/CA remains highly active in Wi-Fi (IEEE 802.11) networks used everywhere. Understanding CSMA/CA is essential for analyzing real-world wireless LAN behavior, throughput degradation under heavy load, and the impact of hidden nodes in ad-hoc networks.
The efficiency of CSMA/CA degrades significantly at high load because every node must complete a full backoff cycle even when many are waiting. This is in contrast to collision detection where the channel is quickly released after a jam signal. For GATE, emphasis is placed on recognizing the minimum frame size constraint for CSMA/CD and the role of IFS timings in CSMA/CA.
Given:
Propagation delay T_p = 20 microseconds
Frame size = 1000 bits
Data rate = 1 Mbps
Why this formula applies:
CSMA/CD efficiency depends on ratio a = T_p / T_t
Formula:
a = T_p / T_t
Efficiency = 1 / (1 + 2a)
Substitution:
T_t = Frame size / Data rate = 1000 / 1,000,000 = 1000 microseconds
a = 20 / 1000 = 0.02
Calculation:
Efficiency = 1 / (1 + 2 * 0.02) = 1 / 1.04 = 0.9615
Final Answer: Channel efficiency = 96.15%Exam Tip: In CSMA/CD, minimum frame size = 2 * T_p * Bandwidth. For 10 Mbps Ethernet with 25 microsecond propagation delay, minimum frame = 2 * 25e-6 * 10e6 = 500 bits = 64 bytes. GATE frequently asks this calculation. Also note: CSMA/CA does NOT detect collisions; it only avoids them.
Key Mechanism Points
- CSMA/CD detects collisions during transmission by monitoring the wire; CSMA/CA prevents collisions by randomized backoff before transmission.
- The binary exponential backoff in CSMA/CD uses range [0, 2^k - 1] after the k-th collision, capping at k=10 and dropping after 16 attempts.
- CSMA/CA uses IFS timing: SIFS (shortest) for ACK and CTS, PIFS for PCF, DIFS (longest of these three) for normal data frames.
- The hidden node problem in wireless is solved by the optional RTS/CTS exchange in CSMA/CA, but this adds overhead for small frames.
- Minimum frame size in Ethernet (64 bytes) ensures the sender is still transmitting when collision echo returns from the farthest node.
Quick Revision
- CSMA/CD: sense, transmit, detect collision, jam, binary exponential backoff. Used in IEEE 802.3 Ethernet.
- CSMA/CA: sense, wait DIFS, random backoff, transmit, wait ACK. Used in IEEE 802.11 Wi-Fi.
- Minimum frame size formula: Frame size = 2 * T_p * Bandwidth. For 10 Mbps Ethernet = 64 bytes.
- Efficiency of CSMA/CD = 1/(1+2a) where a = T_p/T_t. Lower a gives higher efficiency.
- 1-persistent: transmit immediately when free (high collision). Non-persistent: wait random time (low collision). p-persistent: transmit with probability p.
- Exam trap: CSMA/CA does not eliminate collisions entirely; it only reduces their probability.
- RTS/CTS solves hidden node problem but introduces additional overhead not suitable for small payloads.
CSMA CD Quiz
Test your understanding of CSMA/CD and CA collision handling mechanisms.
Q1.In CSMA/CD, after a collision is detected, a station must wait for a random backoff time before retransmitting. The backoff time is chosen from the range [0, 2^k - 1] slot times, where k is the attempt number. After the 10th collision attempt, what is the maximum number of slot times a station can wait?
Related Articles
Multiple Access Techniques
FDMA, TDMA, CDMA overview.
4 min read
OFDMA
Orthogonal Frequency Division Multiple Access, 4G/5G usage.
10 min read
CDMA Details
Code Division Multiple Access, orthogonality, near-far problem.
12 min read
Digital Modulation Overview
Coherent vs non-coherent, power vs bandwidth efficiency.
7 min read
Cognitive Radio
Spectrum sensing, dynamic spectrum access.
10 min read