Media Access in Ethernet
What is CSMA/CD?
CSMA/CD is a modified version of CSMA.
A scheme known as carrier sense multiple access with collision detection (CSMA/CD) governs the way the computers share the channel. This scheme is relatively simple compared to the token ring. When one computer on the network wants to send some data to another computer, the following algorithm is followed:
- Start - If the wire (also referred as ethernet cable) is idle, start transmitting, else go to step 4.
- Transmitting - If detecting a collision, continue transmitting until the minimum packet time is reached (to ensure that all other transmitters and receivers detect the collision) then go to step 4.
- End successful transmission - Report success to higher network layers; exit transmit mode.
- Wire is busy - Wait until wire becomes idle - This will go back to step 1 and the loop continues until the wire is idle for data transmission.
- Wire just became idle - Wait a random time, then go to step 1, unless maximum number of transmission attempts has been exceeded.
- Maximum number of transmission attempt exceeded - Report failure to higher network layers; exit transmit mode.
Ethernet originally used a shared coaxial cable to connect every machine on the network. Computers were connected to an Attachment Unit Interface (AUI) transceiver, which in turn was connected to the cable. While a simple passive wire was highly reliable for small Ethernets, it was not reliable for large extended networks, where damage to the wire in a single place, or a single bad connector could make the whole Ethernet segment unusable. This presented a single point of failure at multiple locations.
Since all communications happen on the same wire, any information sent by one computer is received by all, even if that information was intended for just one destination. The network interface card filters out information not addressed to it, interrupting the CPU only when applicable packets are received unless the card is put into “promiscuous mode“. This “one speaks, all listen” property is a security weakness of shared-medium Ethernet, since a node on an Ethernet network can eavesdrop on all traffic on the wire if it so chooses. Use of a single cable also means that the bandwidth is shared, so that network traffic can slow to a crawl when, for example, the network and nodes restart after a power failure.
Note: Collision is an event that occurs when data is simultaneously transmitted over the same wire by two computers. Collision is very common on ethernet and should not be considered a problem.

