Definition of CSMA/CD
Ethernet was originally designed to connect computers and other digital devices on a shared physical line. The computers and digital devices can access the shared line only in half-duplex mode. Therefore, a mechanism of collision detection and avoidance is required to prevent multiple devices from contending for the line. This mechanism is called the carrier Sense Multiple Access with Collision Detection (CSMA/CD).
The concept of CSMA/CD is described as follows:
Carrier sense (CS)
Before transmitting data, a station checks whether the line is idle to reduce chances of collision.
Multiple access (MA)
Data sent by a station can be received by multiple stations.
Collision detection (CD)
If two stations transmit electrical signals at the same time, the voltage amplitude doubles the normal amplitude as signals of the two stations accumulate. The situation results in collision.
The stations stop transmission after detecting the collision, and resume the transmission after a random delay.
CSMA/CD working process
CSMA/CD works as follows:
A station continuously detects whether the shared line is idle.
If the line is idle, the station sends data.
If the line is in use, the station waits until the line becomes idle.
If two stations send data at the same time, a collision occurs on the line, and signals on the line become unstable.
After detecting the instability, the station immediately stops sending data.
The station sends a series of disturbing pulses. After a period of time, the station resumes the data transmission.
The station sends disturbing pulses to inform other stations, especially the station that sends data at the same time, that a collision occurred on the line.
After detecting a collision, the station waits for a random period of time, and then resumes the data transmission.