CSMA+CD

Carrier Sense Multiple Access/Collision Detect (CSMA/CD) is the protocol for carrier transmission access in Ethernet networks. On Ethernet, any device can try to send a frame at any time. Each device senses whether the line is idle and therefore available to be used. If it is, the device begins to transmit its first frame. If another device has tried to send at the same time, a collision is said to occur and the frames are discarded. Each device then waits a random amount of time and retries until successful in getting its transmission sent.


 * Main procedure **
 * Frame ready for transmission.
 * Is medium idle? If not, wait until it becomes read.
 * Start transmitting.
 * Did a collision occur? If so, go to collision detected procedure.
 * Reset retransmission counters and end frame transmission.


 * Collision detected procedure **
 * Continue transmission until minimum packet time is reached to ensure that all receivers detect the collision.
 * Increment retransmission counter.
 * Was the maximum number of transmission attempts reached? If so, abort transmission.
 * Calculate and wait random backoff period based on number of collisions.
 * Re-enter main procedure at stage 1.