EC-11.3 Sharing One Medium, and Ethernet
en
What this is and why it exists
Multiple access is the part of networking that most resembles a design problem rather than a specification.
There is no single right answer. The schemes trade fairness against efficiency against delay. Which one wins depends on how many senders there are, how often they speak, and whether they can hear each other.
It also explains the shape of every local network a reader will meet. And it explains why the answer for radio had to differ from the answer for a cable.
The vocabulary
- Shared medium — one physical channel used by several senders.
- Collision — two transmissions overlapping, destroying both.
- Multiple access — any scheme for deciding who transmits when.
- Carrier sense — listening before transmitting to see whether anyone else is.
- Exponential backoff — waiting a random time that doubles after each failure.
- Hardware address — a fixed identifier belonging to an interface, not to a location.
- Hub — a device repeating every signal to every port.
- Switch — a device learning which address is on which port and forwarding only there.
- Hidden node — a sender audible to a receiver but not to another sender.
The mental model
One problem generates this entire topic. If two senders transmit at once on a shared medium, both messages are destroyed.
There are three families of answer and it is worth holding them as three rather than as a list of protocol names.
Divide the medium. Give each sender its own slice of time or of frequency. This is perfectly fair and perfectly efficient when everyone always has something to send. It is wasteful when they do not, because an idle sender's slice goes unused.
Hand out permission. Pass a token around, or have a controller ask each sender in turn. Nothing collides and the delay has a guaranteed bound, which is why this family is used in industrial and vehicle networks. The cost is the machinery to keep the permission moving when a station fails.
Let everyone try. Transmit when you have something and recover when it goes wrong. Very efficient at low load, and it degrades badly when the medium gets busy, because collisions themselves consume the medium.
Ethernet took the third family and improved it. Listening before sending removes most collisions at once, because most of the time somebody else is already talking and you can wait.
It does not remove all of them. Two senders can find the medium idle at the same instant, and both start. The recovery is to wait a random time, and to double the range of that random wait after each failure. Randomness stops the two repeating the same collision; doubling stops a busy network collapsing into permanent collision.
Now addressing at this layer, which is where a common misunderstanding lives. Every Ethernet interface has a fixed six-byte address, assigned at manufacture. It identifies the device and says absolutely nothing about where the device is.
That is not an oversight. A flat address is exactly right for a shared medium where everyone hears everything. It is exactly wrong for finding a machine across the world. That is why a second, hierarchical address exists one layer up, and why both are needed.
The last piece is why collisions largely vanished. A hub repeats every signal to every port, so the whole network is one shared medium and all of the above applies.
A switch learns which address it has seen on which port and forwards a frame only there. Each device then has a medium to itself, full duplex, with no contention at all. The multiple access machinery is still in the standard and is mostly dormant on a modern wired network.
Radio could not follow. A radio sender cannot hear a collision while transmitting, because its own signal is overwhelmingly the loudest thing present. And two senders can both be audible to a receiver without being audible to each other. Listening then tells one of them nothing about the other.
Both facts make listen-and-detect useless. Radio networks therefore avoid collisions rather than detecting them, by asking permission first and by acknowledging every frame. That is the subject of a later topic.
What you should now be able to explain or do
- State the collision problem and classify any access scheme into one of three families.
- Say which family suits steady load, which suits guaranteed delay, and which suits bursty traffic.
- Explain why the backoff must be both random and increasing.
- Say what a hardware address identifies and why a second kind of address is needed.
- Describe how a switch learns and why it removes contention.
- Explain the two reasons radio cannot use collision detection.
Check yourself
Why must backoff be random as well as increasing?
Randomness stops two senders that collided from colliding again in the same way. Increasing the range stops a heavily loaded network from spending all its capacity on repeated collisions.
What does an Ethernet address tell you about where a device is?
Nothing. It identifies the interface and is assigned at manufacture. A hierarchical address is needed at the network layer to route across the world.
How does a switch differ from a hub?
A hub repeats everything everywhere, so all ports share one medium. A switch learns which address is on which port and forwards only there, giving each device a medium of its own.
Name the two reasons radio cannot detect collisions.
A transmitting radio cannot hear anything over its own signal. And two senders can both reach a receiver without reaching each other, so listening reveals nothing about the other.
Go deeper
We haven't checked most of these for screen reader use yet.
Back to Sharing One Medium, and Ethernet: work through the checklist