Skip to content

hop 7 of 32 · 5 min

Sharing one channel

When several devices share one medium, two transmitting at once corrupt each other. The medium access control protocol decides who may talk.

ALOHA

Transmit whenever you have something. If no acknowledgement arrives, assume a collision and retry after a random delay.

Simple, and its maximum channel utilisation is about 18 percent. Slotted ALOHA, which only allows transmission at fixed slot boundaries, halves the window in which collisions can happen and doubles it to 37 percent. Still poor, and historically important as the first of these.

CSMA/CD, wired Ethernet

Carrier sense multiple access with collision detection:

code
1. listen. If busy, wait
2. transmit, and keep listening
3. if what you hear differs from what you sent, that is a collision
4. send a jam signal so everyone knows
5. wait a random time, doubling the range each attempt, then retry

Step 5 is binary exponential backoff. After the first collision, wait 0 or 1 slots; after the second, 0 to 3; then 0 to 7. The widening range means heavy load spreads attempts out rather than colliding repeatedly.

There is a minimum frame size in Ethernet for this to work: a frame must take longer to send than the round trip across the maximum cable length, or a collision could occur after the sender has finished and gone deaf.

CSMA/CA, wireless

Wireless cannot detect collisions. A radio cannot listen while transmitting, because its own signal drowns everything, so collision avoidance replaces detection:

code
listen, wait a random backoff even when idle, then send
the receiver acknowledges; no acknowledgement means retry

There is also a problem wired networks do not have. A and C can both reach the access point and not each other, so neither hears the other's transmission and both send. That is the hidden terminal problem, and the optional fix is a request to send and clear to send exchange, where the access point's reply is heard by everyone.

CSMA/CDCSMA/CA
Mediumwiredwireless
Collisionsdetectedavoided
Acknowledgementsnot per frameper frame
Extra problemnonehidden terminals

Why modern Ethernet has none of this

A switch gives each device its own dedicated link operating in full duplex. There is no shared medium, so there are no collisions, so CSMA/CD never activates. It is still in the standard and effectively historical, which is worth knowing when an exam asks about it and a network engineer says it does not happen.