Skip to main content

Ethernet with CSMA and CSMA/CD

Short answer

Ethernet is a LAN technology (IEEE 802.3) using CSMA/CD. Stations sense the carrier; if idle, they transmit while listening for collisions. On collision, they send a 32-bit jam signal and wait a random backoff time (K×51.2 µs) before retrying.

What is an Ethernet? Keeping in view of CSMA and CSMA/CD explain its working principle.

Ethernet

Ethernet is the most widely used LAN technology, standardised as IEEE 802.3. It was developed at Xerox PARC (Metcalfe, 1973) and later specified by DEC, Intel and Xerox (DIX). All stations share one channel (a bus, or a hub/switch in star wiring) and access it with CSMA/CD (Carrier Sense Multiple Access with Collision Detection). Classic Ethernet runs at 10 Mbps with Manchester coding; Fast Ethernet (100 Mbps), Gigabit and 10 Gigabit Ethernet followed.

TypeMediumMax segment
10Base5Thick coax500 m
10Base2Thin coax185 m
10Base-TUTP to hub100 m
10Base-FOptical fibre2000 m

Ethernet (802.3) frame

+--------+---+----+----+-----+---------+-----+
|Preamble|SFD| DA | SA | Len | Data+Pad| FCS |
|   7    | 1 | 6  | 6  |  2  | 46-1500 |  4  |
+--------+---+----+----+-----+---------+-----+
            (bytes)
  • Preamble 10101010… for clock sync; SFD 10101011 marks frame start.
  • 48-bit destination and source MAC addresses.
  • Data 46–1500 bytes (padded), so frame size is 64–1518 bytes.
  • FCS: 32-bit CRC for error detection.

CSMA (Carrier Sense Multiple Access)

In CSMA a station listens before talking: it senses the channel and transmits only if the channel is idle. This reduces collisions compared with ALOHA, but collisions still happen because a signal takes time (propagation delay) to reach other stations; two stations may both sense idle and start together.

Persistence methods when the channel is busy:

  • 1-persistent: keep sensing; send as soon as it becomes idle (probability 1). Used by Ethernet. Many collisions if several are waiting.
  • Non-persistent: if busy, wait a random time and sense again. Fewer collisions, more delay.
  • p-persistent: (slotted channels) when idle, send with probability p, otherwise defer to the next slot.

CSMA/CD – working principle of Ethernet

CSMA/CD adds collision detection: a station keeps listening while transmitting, and if it detects a collision it stops at once instead of sending the whole damaged frame.

  1. Station with a frame senses the channel (carrier sense).
  2. If busy, wait until idle (1-persistent), then wait the inter-frame gap (9.6 µs).
  3. Transmit the frame while monitoring the line.
  4. If no collision during the whole frame: success.
  5. If a collision is detected (signal on the line differs from sent signal / voltage too high):
    • stop sending the data and send a 32-bit jam signal so all stations notice the collision;
    • increment the collision counter nn; if n=16n = 16 (16 failed attempts), give up and report an error;
    • otherwise wait a random binary exponential backoff time, then go to step 1.

Binary exponential backoff: after the nn-th collision choose a random integer

K∈{0,1,…,2m−1},m=min⁡(n,10)K \in \{0, 1, \dots, 2^{m} - 1\}, \quad m = \min(n, 10)

and wait K×K \times slot time. Slot time = 512 bit times = 51.2 µs at 10 Mbps. The waiting range doubles after each collision, so the load adapts.

     Frame ready
         |
   Sense channel <------------------+
         | idle                     |
   Transmit + listen                |
     |           |                  |
 no collision  collision            |
     |           |                  |
  Success    send jam, n = n+1      |
             n = 16 ? --yes--> abort|
                 | no               |
         wait K x 51.2 us ----------+

Minimum frame size: a sender must still be transmitting when news of a collision returns from the far end, so frame time ≥ round-trip time (2τ2\tau). For 10 Mbps and 2500 m (with 4 repeaters) the slot is 512 bits, hence the 64-byte minimum frame.

Example: stations A and C both find the bus idle and start at almost the same time. Their signals collide; both detect it, send jam and stop. After the first collision each picks K from {0, 1}; if A picks 0 and C picks 1, A sends at once and C, on sensing a busy channel, waits until A finishes.

Features: simple, cheap, no central control, works well at light and moderate load; at heavy load collisions reduce efficiency. Modern switched full-duplex Ethernet has no shared medium, so CSMA/CD is not needed there.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Telecommunications chapter 8 questions →