CSMA CD Mechanism - buaamer81/IT130-Networking-Wiki GitHub Wiki
π CSMA/CD Mechanism
π Overview
CSMA/CD stands for Carrier Sense Multiple Access with Collision Detection. It was used in traditional Ethernet networks that shared a common transmission medium (like coaxial cable or hubs). The mechanism helps prevent and handle data collisions, ensuring fair communication between devices on the same network segment.
Modern Ethernet networks using switches and full-duplex communication no longer need CSMA/CD, but understanding it is critical for grasping how early Ethernet worked.
π¦ How CSMA/CD Works (Step-by-Step)
- Carrier Sense (CS): A device listens to the cable to see if any other device is currently transmitting.
- Multiple Access (MA): All devices share the same communication channel (the medium).
- If idle β the device begins transmitting.
- If two devices transmit at once β a collision occurs.
- Collision Detection (CD): Devices detect the collision by comparing the transmitted signal to whatβs on the cable.
- Jam Signal is sent to notify all devices.
- Each device waits a random time (called backoff) and then tries again.
π‘ Important Points
- CSMA/CD was crucial in early half-duplex Ethernet networks (like 10Base2, 10BaseT with hubs).
- It relies on random backoff (usually using the binary exponential backoff algorithm).
- As network traffic increases, collisions increase, reducing efficiency.
- Switches eliminate collisions by creating separate collision domains for each port.
π When Is CSMA/CD Used?
| Ethernet Type | Uses CSMA/CD? | Reason |
|---|---|---|
| 10Base2 / 10Base5 | β Yes | Shared coax cable |
| 10BaseT + hub | β Yes | Shared media (hub) |
| 10BaseT + switch | β No | Switches isolate traffic |
| Full-Duplex | β No | Devices transmit and receive at the same time |
πΌοΈ Optional Visual Suggestion
Diagram Idea: A simple flowchart showing a station sensing the line, transmitting, detecting a collision, jamming, and backing off.
(Do you want me to generate this diagram too?)