Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Ethernet Basics & CSMA/CD
CN

Ethernet Basics & CSMA/CD

The rules of the local cable: Understand the Ethernet standard and how it handles data collisions.

Ethernet (IEEE 802.3) is the dominant LAN technology. It defines wiring, signaling, frame formats, and media access rules. Over 90% of wired local networks use Ethernet.

Ethernet Frame Structure

FieldLengthPurpose
Preamble7 bytesSynchronization
SFD1 byteStart Frame Delimiter
Destination MAC6 bytesTarget address
Source MAC6 bytesSender address
EtherType2 bytesProtocol type (e.g., IPv4 = 0x0800)
Payload46-1500 bytesActual data
FCS4 bytesCRC-32 error check

Maximum frame size: 1518 bytes (without preamble). Minimum: 64 bytes (to ensure collision detection works).

CSMA/CD (Carrier Sense Multiple Access with Collision Detection)

On shared Ethernet (hubs), all devices share the same medium. CSMA/CD prevents chaos:

  1. Carrier Sense — listen before transmitting. If the cable is busy, wait.
  2. Multiple Access — many devices share the same medium.
  3. Collision Detection — while transmitting, listen for collisions. If a collision is detected:
    • Transmit a jam signal (ensures all devices know a collision occurred)
    • Wait a random backoff time (exponential backoff)
    • Retry

Important: CSMA/CD is Obsolete on Modern Switches

Modern Ethernet switches operate in full-duplex mode. The switch connects each device to its own dedicated port with separate transmit and receive paths. Collisions are physically impossible — no CSMA/CD needed.

Q: What are the main parts of an Ethernet frame?

A: Preamble (sync), Destination MAC, Source MAC, EtherType (identifies the protocol), Payload (data, 46-1500 bytes), and FCS (CRC-32 for error detection).

Q: Explain the CSMA/CD process.

A: Listen (carrier sense) before sending. If idle, transmit while listening for collision. If collision detected, send jam signal, wait random backoff time (doubles each retry), and retry. On a switch, this is unnecessary — full-duplex eliminates collisions.

Q: Is CSMA/CD still used today?

A: No. Modern switches use full-duplex, point-to-point connections — dedicated send and receive paths per device. Collisions cannot occur. CSMA/CD was only needed on older shared-media networks (hubs).

Q: What is the minimum Ethernet frame size and why?

A: 64 bytes. This ensures a transmitting station is still sending when a collision signal propagates back — guaranteeing collision detection. Smaller frames could complete before the sender knows a collision occurred.

My Private Notes

Notes are auto-saved locally to this device.