| HowItWorksLab · Systems
English

How Ethernet CSMA/CD Collision Detection Works

On an old shared Ethernet cable, every station hears every frame. CSMA/CD is the rule that lets them share the wire: listen first, talk only if it is quiet, and if two talk at once, detect the clash and retry after a random wait.

ETHERNET CSMA/CD · COLLISION DETECTION carrier sense → transmit → collision → jam → random backoff → retry Shared cable (bus) — every station hears every frame Station A Station B Station C Station A Station B time ↓ 1 · Carrier sense 2 · Transmit 3 · Collision + jam 4 · Random backoff 5 · Retry listen listen both sense an idle line A starts sending B starts sending signals overlap → collision detected both send a jam signal to be sure both wait a random backoff time before trying again A retries first — frame arrives, no collision blue = A · orange = B · green = success · red = collision
The sequence, in order Carrier sense → Transmit → Collision → Jam + backoff → Retry
Display mode

Detailed Explanation

What is CSMA/CD?

CSMA/CD — Carrier Sense Multiple Access with Collision Detection — is the method early Ethernet used to share a single cable between many computers. Every station listens before it sends, and if two start sending at once, both notice and retry later.

Its three ideas are hidden in the name: carrier sense (listen first), multiple access (any station may transmit), and collision detection (spot the overlap and recover). There is no central controller; the stations simply follow the same rules.

Why look at it as a timing sequence?

CSMA/CD is really about time: who talks, when the signals meet, and how long each station waits before trying again. Laying it out along a shared bus and a time axis makes the collision and the backoff easy to see at a glance.

Components & their role

1. Everyone shares one cable

On a shared bus, all stations tap into the same wire. A frame sent by any one station travels its whole length, so every station hears it — whether or not it is the intended receiver. Sharing the medium is what makes collisions possible in the first place.

2. Listen before you talk

Before sending, a station performs carrier sense: it listens to the line. If it hears no signal, the medium is idle and it may begin transmitting. If the line is busy, it waits until the current transmission finishes.

3. Two stations start at once

Carrier sense is not perfect. A signal takes time to travel down the cable, so two stations can each listen, hear nothing, and start sending just before the other's frame reaches them. On the wire, the two signals run into one another.

4. Detect the collision, sound the jam

When the waveforms overlap, the combined signal is corrupted. A station sending notices that what it hears is not what it sent, and so detects the collision. Both stations send a short jam signal to make sure everyone knows, then stop transmitting.

5. Back off for a random time

Each station then waits before retrying. The wait is chosen at random, so the two stations rarely pick the same moment; one usually retries while the other is still waiting. On a busy network the random range grows, spreading the retries out further.

6. Retry and get through

When its timer expires, a station starts over: listen, and if the line is clear, transmit. This time only one station is sending, so the frame arrives intact. The collision has cost only a little time, not the data.

What does CSMA/CD stand for?

Carrier Sense Multiple Access with Collision Detection. Carrier sense means listen before sending; multiple access means any station may transmit; collision detection means noticing when two signals overlap, then backing off and retrying.

Why did collisions happen on old Ethernet?

Because every station shared one cable. A station could not hear another's frame until the signal had travelled down the wire, so two stations could start sending just before each other's signal arrived, and their frames would overlap.

What is a jam signal for?

A short burst each station sends the moment it detects a collision. It guarantees that every other station also notices the clash and stops transmitting, instead of one of them carrying on as if nothing were wrong.

Why is the backoff random?

If both stations waited the same fixed time, they would collide again in exactly the same way, forever. Choosing a random wait means they almost never pick the same moment, so one retries while the other is still waiting.

Is CSMA/CD still used?

Rarely. Modern Ethernet uses switches and full-duplex links, where each device has its own dedicated path and can send and receive at once, so collisions cannot happen. CSMA/CD lives on as the method that let early shared Ethernet work.

Common Misconceptions

A collision destroys the data for good. The corrupted frame looks like unrecoverable lost information.
The frame is discarded and sent again. After a backoff the station retransmits, so nothing is lost once the retry succeeds.
Stations can transmit whenever they want. It looks like anyone on the cable may just start talking.
They must listen first. Carrier sense keeps a station silent while the line is busy; the whole scheme depends on it.
CSMA/CD prevents collisions. The name suggests it stops clashes before they happen.
It detects collisions, it does not prevent them. Avoiding collisions outright is CSMA/CA, used in Wi-Fi, which reserves the medium in advance.
Disclaimer: Diagrams are heavily simplified for educational demonstration only. Real-world systems contain far more variables and complexity. Not for engineering production use. Not financial, political or professional advice.