What Is CSMA/CD and How Did Ethernet Handle Collisions?
Table of Contents
The Shared Wire Problem
Early Ethernet networks used a shared medium. Every device on the network was connected to the same coaxial cable (10BASE2, 10BASE5) or the same hub. When one device transmitted, every other device on that segment received the signal. If two devices transmitted simultaneously, their signals collided and both transmissions were destroyed.
This is the fundamental challenge of any shared medium: how do multiple devices coordinate access so they do not talk over each other? CSMA/CD was Ethernet's answer.
CSMA/CD stands for Carrier Sense Multiple Access with Collision Detection. Like WiFi's CSMA/CA, it uses carrier sense (listen before transmitting) and handles multiple access (many devices sharing one channel). The difference is in what happens when things go wrong: Ethernet detects collisions as they happen, while WiFi can only discover them after the fact.
How CSMA/CD Works
The algorithm follows a clear sequence:
- Listen - the device checks whether the wire is idle. If another device is transmitting, it waits.
- Transmit - when the wire is idle, the device begins sending its frame.
- Monitor - while transmitting, the device continues listening to the wire. It compares the signal on the wire to what it is sending.
- Detect - if the signal on the wire does not match what the device is sending, a collision has occurred. Another device started transmitting at nearly the same time.
- Abort and jam - the device stops transmitting its frame and sends a short jam signal to ensure all devices on the network know a collision happened.
- Backoff and retry - the device waits a random amount of time, then returns to step 1.
The entire process happens in microseconds. On a 10 Mbps Ethernet segment, a minimum-size 64-byte frame takes 51.2 microseconds to transmit. The collision detection window is even shorter - the device must detect the collision before it finishes transmitting the frame.
Collision Detection: Listen While You Talk
This is the key difference between CSMA/CD and CSMA/CA. On a wire, a device can transmit and receive simultaneously. The device knows exactly what signal it is putting on the wire. If the signal it reads back does not match, something else is also transmitting - that is a collision.
This works because electrical signals on copper are additive. When two devices transmit simultaneously, their signals combine into a garbled waveform that does not match either original transmission. The transmitting device detects this mismatch within a few bit times and immediately aborts.
WiFi cannot do this. A radio cannot listen on the same frequency it is transmitting on - the transmitter overwhelms the receiver. This is why WiFi uses collision avoidance (try to prevent collisions) rather than collision detection (catch collisions in progress).
The Jam Signal and Backoff
The complete CSMA/CD algorithm including the exponential backoff process. After each collision, the contention window doubles. (Diagram: Wikimedia Commons, CC BY-SA 4.0)
When a collision is detected, the transmitting device sends a 32-bit jam signal. The jam signal is not data - it is a deliberate pattern that tells every device on the segment "a collision just happened, discard whatever you received."
After jamming, the device uses truncated binary exponential backoff to determine how long to wait before retrying. After the first collision, it picks a random delay of 0 or 1 slot times (a slot time is 51.2 microseconds on 10 Mbps Ethernet). After the second collision, it picks from 0 to 3 slot times. After the third, 0 to 7. The range doubles with each collision up to a maximum of 1023 slot times after 10 collisions.
If 16 consecutive collisions occur, the device gives up and reports a transmission failure to the upper layer. In practice, this almost never happens - it would indicate a severely overloaded or malfunctioning network segment.
Why Switches Made CSMA/CD Obsolete
The Ethernet frame structure remains the same whether the network uses hubs (shared, CSMA/CD) or switches (dedicated links, no collisions). (Diagram: Wikimedia Commons, public domain)
Hubs are simple repeaters. A hub receives a signal on one port and broadcasts it out every other port. This means every device connected to a hub shares the same collision domain - only one device can transmit at a time.
Switches changed everything. A switch learns which MAC address is on which port and forwards frames only to the correct destination port. Each port on a switch is its own collision domain. When Device A sends a frame to Device B through a switch, Device C can simultaneously send a frame to Device D through the same switch with zero interference.
With switches, collisions effectively disappeared. Full-duplex links (where a device can transmit and receive simultaneously on separate wire pairs) eliminated even the theoretical possibility of collisions. CSMA/CD still exists in the Ethernet specification, but on modern switched, full-duplex networks it never activates.
This is why modern Ethernet achieves close to its theoretical maximum throughput. There is no contention for the medium, no backoff delays, no wasted bandwidth from collisions. Each device gets a dedicated, full-speed link to the switch.
CSMA/CD vs CSMA/CA
The comparison is instructive because it reveals a fundamental hardware constraint:
| Property | CSMA/CD (Wired Ethernet) | CSMA/CA (WiFi) |
|---|---|---|
| Medium | Copper wire (shared bus) | Radio frequency (shared airspace) |
| Can listen while transmitting? | Yes | No |
| Collision handling | Detect during transmission, abort immediately | Discover after transmission via missing ACK |
| Wasted bandwidth per collision | Partial frame + jam signal | Entire frame |
| Still in use? | No (switches eliminated collisions) | Yes (WiFi still shares the channel) |
WiFi's collision problem is worse than Ethernet's ever was, and it cannot be solved with switches because the radio medium is inherently shared. This is why WiFi performance degrades in dense environments while wired Ethernet scales cleanly.
Why This Still Matters
Understanding CSMA/CD matters for security research because the concepts carry over to wireless analysis. The contention window, exponential backoff, and collision domain concepts all apply directly to WiFi's CSMA/CA. When the BLEShark Nano monitors WiFi channel utilization and reports high retry rates, it is observing the wireless equivalent of the collision problem that CSMA/CD was designed to solve - except on WiFi, there is no switch to eliminate it.
The transition from shared hubs to dedicated switches is also a useful mental model for network segmentation. A flat switched network with no VLANs is like a large shared collision domain for broadcast traffic - every device sees every broadcast. Segmenting with VLANs is the Layer 2 equivalent of what switches did for collision domains.