Communication Networks · Visualized

CSMA/CD

Media Access

Sharing one wire or radio channel fairly: ALOHA, CSMA/CD and collision handling.

3 interactive subtopics — each one animated, step-through and explained.

CSMA/CD

Media Access

Carrier Sense Multiple Access with Collision Detection refined ALOHA for Ethernet: sense the wire before transmitting (CS), keep listening while talking, and abort the instant a collision is detected (CD). After a jam signal, each station backs off a random multiple of the slot time — exponentially growing with consecutive failures.

How CSMA/CD Works

  1. Sense carrier: if the channel is busy, wait for silence plus the interframe gap.
  2. Transmit while continuing to monitor the cable.
  3. Signals take up to one end-to-end delay to meet — collisions happen mid-transmission.
  4. On voltage anomaly, send the 32-bit jam, drop the frame, and double the backoff range.
  5. Retry after k × 51.2 µs (k random in [0, 2^min(attempts,10))); give up after 16 tries.

CSMA/CD Worked Example

Try it: Play — station A senses and transmits; B senses too early, both jam, and exponential backoff separates their retries.

The collision flash marks where the two wavefronts met. Watch the backoff dice roll differently for A and B — that asymmetry is what finally lets one win the channel.

shared bus — everyone hears everythingStation AStation B👂 carrier?
A signal B signal collision / jam
Stage 1 / 9
Station A has a frame ready. Carrier sense… channel silent → transmit, and KEEP listening while talking.

CSMA/CD: Key Facts to Remember

Minimum frame64 bytes ensures a sender is still transmitting when a collision echoes back
Binary exponenttruncated exponential backoff — fair on average, no starvation guarantee
Obsolescenceswitched full-duplex Ethernet removed collisions entirely; CD logic sleeps unused

Recommended resourcesAffiliate links · may earn us a commission

Recommended for learners

Cloud hosting for side projectsShip the portfolio project that gets you hired — free credits for new accounts.Claim credits Pro code editor & AI assistantWrite, debug and explain code faster while you practice the patterns here.Try it free Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses

See how packets really travel

Networks are built on the structures and algorithms you can watch step by step — queues, trees, and routing algorithms.