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
- Sense the carrier: A station listens to the medium.
- Wait if busy: If another station is transmitting, the station defers until the medium becomes idle.
- Transmit: When the medium appears idle, the station begins sending its frame.
- Continue monitoring: The station listens while transmitting to detect a collision.
- Detect a collision: If the signal on the medium does not match the expected transmission, the station recognizes a collision.
- Stop the frame: Affected stations stop sending the current frame.
- Send a jam signal: Each detecting station sends a jam signal so that stations across the shared segment recognize that a collision occurred.
- Back off: Each station selects a randomized delay based on binary exponential backoff.
- Retry: After the delay and another carrier-sense check, the station attempts retransmission.
| Stage | Station action | Medium condition | Outcome |
|---|---|---|---|
| Carrier sense | Listen before sending | Idle or busy | Transmit if idle; defer if busy |
| Transmission | Send the Ethernet frame and monitor the medium | Station is transmitting | Frame may complete or a collision may occur |
| Collision detection | Compare the observed signal with the expected signal | Overlapping transmissions | Collision is recognized |
| Jam signal | Stop the frame and send a collision-indicating signal | Shared segment is notified | Other stations know not to treat the partial frame as valid |
| Backoff | Choose a random slot-time delay | Stations wait before retrying | Simultaneous retries become less likely |
| Retransmission | Sense the medium and send again | Medium should be idle | Frame 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 Number | Random Wait Range Concept | Why the Range Changes |
|---|---|---|
| 1 | 0 through 1 slot time | A short delay is usually enough after the first collision |
| 2 | 0 through 3 slot times | A larger range reduces synchronized retries |
| 3 | 0 through 7 slot times | More contention requires more separation |
| Later attempts | Range continues growing until the protocol cap | Repeated 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.
| Device | Collision Domain Behavior | Typical Duplex Mode | CSMA/CD Relevance |
|---|---|---|---|
| Hub | All attached ports share one collision domain | Half duplex | CSMA/CD is required |
| Legacy coaxial segment | All stations on the shared cable contend together | Half duplex | CSMA/CD coordinates access |
| Switch port | Each physical port is normally a separate collision domain | Full duplex | CSMA/CD is normally unnecessary |
| Switch port connected to a hub | The hub and its attached stations form a shared domain on that port | Usually half duplex for the shared segment | CSMA/CD remains relevant on the shared side |
Hubs, Switches, and Duplex Modes
| Characteristic | Shared Half-Duplex Ethernet | Switched Full-Duplex Ethernet |
|---|---|---|
| Transmission direction | One direction at a time | Transmission and reception can occur simultaneously |
| Device model | Hub, coaxial segment, or other shared medium | Switch with a dedicated link per port |
| Collision domain | Several stations share one domain | Normally one domain per physical switch port |
| Collision handling | CSMA/CD, jam signals, and backoff | Normal collisions should not occur |
| Performance | Contention and backoff reduce effective throughput | Higher 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
| Condition | When It Occurs | Likely Cause | Recommended Investigation |
|---|---|---|---|
| Normal collisions on a half-duplex shared segment | Several active stations contend for the medium | Normal shared-medium contention or excessive utilization | Verify the segment is intentionally shared; review utilization and collision counters; migrate to switched Ethernet |
| Late collisions | Collision is detected outside the expected timing window | Duplex mismatch, cabling fault, excessive distance, or invalid legacy topology | Compare speed and duplex settings, inspect cabling, and review both endpoints' statistics |
| Collisions on a switch port | Port is operating in a shared or half-duplex condition | Connected hub, legacy device, or duplex mismatch | Confirm actual operational duplex and identify the directly connected device |
| Intermittent slowness on a legacy LAN | High traffic produces repeated collisions and backoff | Too many devices or excessive utilization in one collision domain | Measure 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.