Unit

CSMA/CD Explained: Ethernet Collision Detection and Backoff

Learn how CSMA/CD coordinates shared half-duplex Ethernet, including carrier sensing, collisions, jam signals, slot time, binary exponential backoff, hubs, switches, and duplex troubleshooting.

CSMA/CD means Carrier Sense Multiple Access with Collision Detection. It is a media-access-control method for coordinating transmissions on a shared Ethernet medium. A station listens before transmitting, detects collisions when simultaneous transmissions occur, and uses a recovery process to retry later.

This topic is mainly associated with legacy Ethernet that used coaxial cable, hubs, or another shared collision domain. Modern switched Ethernet normally uses full-duplex links, so CSMA/CD is generally not needed there.

What Problem Does CSMA/CD Solve?

On a shared medium, several stations compete for the same transmission opportunity. If two stations transmit at the same time, their electrical or optical signals overlap. This overlap is called a collision, and the affected frames cannot be interpreted reliably.

CSMA/CD reduces simultaneous transmissions and provides a recovery method when they still occur. A sender must continue monitoring the medium while transmitting. Listening only before transmission would not reveal that another station started transmitting shortly afterward.

The Three Parts of the Acronym

  • Carrier sense: The station listens to determine whether the medium is idle or busy.
  • Multiple access: Multiple stations share one medium and have an opportunity to transmit.
  • Collision detection: A transmitting station checks for an abnormal signal or a mismatch between the signal it sent and the signal present on the medium.

Where CSMA/CD Applies

CSMA/CD applies to half-duplex Ethernet, where communication can occur in only one direction at a time on a link or shared segment. Typical historical examples include coaxial Ethernet and Ethernet stations connected through a hub.

A hub repeats incoming electrical signals to its other ports. It does not make independent forwarding decisions for each conversation, so all attached stations share the same medium and collision domain.

In contrast, a switch usually provides a separate collision domain for each physical port. A correctly operating switched link normally runs in full-duplex mode, allowing transmission and reception simultaneously. Because the two directions are logically separated, normal full-duplex switched Ethernet does not need CSMA/CD.

CSMA/CD Operating Sequence

  1. Sense the carrier: A station listens to the medium.
  2. Wait if busy: If another station is transmitting, the station defers until the medium becomes idle.
  3. Transmit: When the medium appears idle, the station begins sending its frame.
  4. Continue monitoring: The station listens while transmitting to detect a collision.
  5. Detect a collision: If the signal on the medium does not match the expected transmission, the station recognizes a collision.
  6. Stop the frame: Affected stations stop sending the current frame.
  7. Send a jam signal: Each detecting station sends a jam signal so that stations across the shared segment recognize that a collision occurred.
  8. Back off: Each station selects a randomized delay based on binary exponential backoff.
  9. Retry: After the delay and another carrier-sense check, the station attempts retransmission.
StageStation actionMedium conditionOutcome
Carrier senseListen before sendingIdle or busyTransmit if idle; defer if busy
TransmissionSend the Ethernet frame and monitor the mediumStation is transmittingFrame may complete or a collision may occur
Collision detectionCompare the observed signal with the expected signalOverlapping transmissionsCollision is recognized
Jam signalStop the frame and send a collision-indicating signalShared segment is notifiedOther stations know not to treat the partial frame as valid
BackoffChoose a random slot-time delayStations wait before retryingSimultaneous retries become less likely
RetransmissionSense the medium and send againMedium should be idleFrame succeeds or another collision occurs

Example: Two Hosts on a Hub

Two workstations connected through a hub may both sense an idle segment at nearly the same instant. Both begin transmitting, and their signals collide. Both stations detect the abnormal signal, stop their current transmissions, send jam signals, and select randomized backoff delays. The station with the shorter delay retries first after the medium is idle.

Collision Detection and Ethernet Timing

A collision is useful only if the sender detects it while the frame is still being transmitted. If the sender finished transmitting before the collision signal propagated back, it could incorrectly assume that the frame succeeded.

Ethernet uses a timing interval called slot time. In classic Ethernet, one slot time is 512 bit-times. The network design and minimum frame size were chosen so that a station transmitting the smallest valid Ethernet frame remains active long enough for a collision from the farthest permitted point in the collision domain to be detected.

The minimum Ethernet frame size is 64 bytes, excluding the preamble and start-of-frame delimiter. This minimum is part of the timing design: a valid sender should still be transmitting during the collision-detection window.

Late Collisions

A late collision is detected after the expected collision window, normally after the permitted slot-time interval. It is not an ordinary, healthy retry condition. Late collisions commonly indicate a duplex mismatch, excessive cable distance, bad cabling, or an invalid legacy shared-media topology.

Jam Signals

The jam signal follows collision detection and precedes backoff. Its purpose is to make the collision recognizable throughout the shared segment. Without this notification, a station farther away might see only a fragment of a transmission and fail to recognize that a collision occurred.

The sequence is therefore: detect the collision, stop the current frame, send the jam signal, choose a backoff delay, and retry if attempts remain.

Binary Exponential Backoff

Binary exponential backoff lowers the chance that colliding stations will immediately transmit together again. After a collision, each station chooses a random integer number of slot times to wait.

Conceptually, after collision attempt n, the station chooses a value k from a range that grows approximately as:

k = a random integer from 0 through (2^n - 1)

Ethernet implementations cap the growth of this range. The important idea is that repeated collisions produce a wider possible waiting range. This separates stations that repeatedly selected similar retry times.

Collision Attempt NumberRandom Wait Range ConceptWhy the Range Changes
10 through 1 slot timeA short delay is usually enough after the first collision
20 through 3 slot timesA larger range reduces synchronized retries
30 through 7 slot timesMore contention requires more separation
Later attemptsRange continues growing until the protocol capRepeated collisions are increasingly spread out

Conceptual Calculation

Suppose a station experiences its first collision and randomly chooses k = 1. It waits one slot time before trying again. If that retry also collides, the next conceptual range is 0 through 3 slot times. If the station then chooses k = 3, it waits three slot times before its next attempt.

Ethernet limits the number of retransmission attempts. In the classic algorithm, a frame is discarded after the maximum retry count, commonly 16 collision attempts. The upper-layer protocol or application may later retransmit the data.

Collision Domains

A collision domain is the network segment in which simultaneous transmissions can interfere with one another. The more stations and traffic sharing that segment, the greater the contention and the likelihood of collisions.

DeviceCollision Domain BehaviorTypical Duplex ModeCSMA/CD Relevance
HubAll attached ports share one collision domainHalf duplexCSMA/CD is required
Legacy coaxial segmentAll stations on the shared cable contend togetherHalf duplexCSMA/CD coordinates access
Switch portEach physical port is normally a separate collision domainFull duplexCSMA/CD is normally unnecessary
Switch port connected to a hubThe hub and its attached stations form a shared domain on that portUsually half duplex for the shared segmentCSMA/CD remains relevant on the shared side

Hubs, Switches, and Duplex Modes

CharacteristicShared Half-Duplex EthernetSwitched Full-Duplex Ethernet
Transmission directionOne direction at a timeTransmission and reception can occur simultaneously
Device modelHub, coaxial segment, or other shared mediumSwitch with a dedicated link per port
Collision domainSeveral stations share one domainNormally one domain per physical switch port
Collision handlingCSMA/CD, jam signals, and backoffNormal collisions should not occur
PerformanceContention and backoff reduce effective throughputHigher aggregate performance and predictable forwarding

Half duplex means a link cannot transmit and receive at the same time. Full duplex permits simultaneous bidirectional communication. A duplex mismatch occurs when one endpoint uses half duplex and the other uses full duplex.

In a mismatch, the half-duplex endpoint uses collision-detection behavior while the full-duplex endpoint assumes that simultaneous transmission is safe. The result can include poor throughput, frame errors, retransmissions, and collisions or late collisions reported on the half-duplex interface.

Performance Implications

As utilization rises on a shared medium, stations find the medium busy more often and contend more frequently. Adding active devices increases the number of possible simultaneous transmitters. Collisions cause frames to be abandoned and retransmitted, while backoff adds waiting time. Together, these effects reduce effective throughput.

Switched full-duplex Ethernet replaced shared-media Ethernet in typical LAN deployments because each endpoint can use a dedicated link, collisions are removed from normal operation, and switches can forward separate conversations through different ports.

Commands for Interface Diagnosis

Use interface statistics to inspect operational speed, duplex mode, errors, collisions, late collisions, and dropped packets where the platform reports them. Counter names and availability vary by operating system, network adapter, and switch platform.

Cisco IOS:
show interfaces <interface>
show interfaces status

Linux:
ip -s link show <interface>
ethtool <interface>

Windows PowerShell:
Get-NetAdapter | Format-Table Name, Status, LinkSpeed
Get-NetAdapterStatistics

On a correctly operating full-duplex link, collision counters should not normally increase. A counter on a half-duplex shared segment may represent normal contention, but a rapidly increasing counter or any late-collision counter deserves investigation.

Addressing a Suspected Duplex Mismatch

Prefer autonegotiation on both endpoints when the hardware supports it. If manual configuration is required, set matching speed and duplex values at both ends, using only values supported by the interfaces.

Cisco IOS interface context:
speed auto
duplex auto

! Or use matching supported manual values:
speed <supported-value>
duplex full

Linux example:
ethtool -s <interface> speed <supported-value> duplex full autoneg on

After changing settings, check both endpoints again and compare interface counters while sending test traffic.

Troubleshooting Patterns

ConditionWhen It OccursLikely CauseRecommended Investigation
Normal collisions on a half-duplex shared segmentSeveral active stations contend for the mediumNormal shared-medium contention or excessive utilizationVerify the segment is intentionally shared; review utilization and collision counters; migrate to switched Ethernet
Late collisionsCollision is detected outside the expected timing windowDuplex mismatch, cabling fault, excessive distance, or invalid legacy topologyCompare speed and duplex settings, inspect cabling, and review both endpoints' statistics
Collisions on a switch portPort is operating in a shared or half-duplex conditionConnected hub, legacy device, or duplex mismatchConfirm actual operational duplex and identify the directly connected device
Intermittent slowness on a legacy LANHigh traffic produces repeated collisions and backoffToo many devices or excessive utilization in one collision domainMeasure utilization and errors, locate shared segments, and replace them with switched full-duplex links

Modern Relevance

CSMA/CD is primarily historical protocol knowledge for ordinary LAN operations, but it remains important for understanding Ethernet media access, collision domains, legacy topologies, and duplex diagnostics. It also helps explain why hubs behave differently from switches.

Do not expect normal CSMA/CD collisions on a correctly operating modern full-duplex switched link. If such a link reports collisions, verify the actual negotiated duplex, the connected hardware, and the interface counters rather than assuming that the link is behaving normally.

Exam-Ready Summary

  • CSMA/CD expands to Carrier Sense Multiple Access with Collision Detection.
  • It coordinates access to a shared Ethernet medium, primarily in half-duplex networks.
  • A station senses the carrier, transmits when idle, and monitors while transmitting.
  • After a collision, stations stop, send a jam signal, choose a random backoff, and retry.
  • Binary exponential backoff increases the possible delay range after repeated collisions.
  • Slot time and the minimum Ethernet frame size help ensure that collisions are detected during transmission.
  • A late collision is abnormal and commonly indicates a duplex, cabling, distance, or topology problem.
  • A hub creates one shared collision domain; a switch normally creates a separate collision domain per physical port.
  • Full-duplex switched Ethernet normally has no collisions and does not require CSMA/CD.