KUNST
SCHÖNHEIT & WELLNESS
HANDWERK
KULTUR & GESCHICHTE
UNTERHALTUNG
UMFELD
ESSEN & GETRÄNKE
REVERSE ENGINEERING
WISSENSCHAFTEN
SPORT
TECHNOLOGIE
WEARABLES

Ethernet and CSMA/CD
Robert Metcalfe read Abramson's ALOHA papers, saw that eighteen percent was a poor return, and noticed the one thing a radio terminal in Hawaii could not do that a machine on a cable could: LISTEN. His memo at Xerox PARC in May 1973, written with David Boggs, describes a network where every station is attached to the same coaxial cable and must wait until the cable is quiet before speaking.
That is carrier sense, and it converts collisions from the normal case to the rare one. There is still a window — two stations that both find the cable quiet in the same instant will still collide — so Ethernet adds the second half: keep listening WHILE transmitting, and the moment you hear something that is not what you sent, stop immediately, send a brief jam so everyone agrees, and back off. A collision now costs a fraction of a frame rather than a whole one.
The backoff is binary exponential: after the nth collision, wait a random number of slot times between zero and two-to-the-n minus one. It is the only rule that reduces the retry rate as fast as the load rises, which the previous blueprint measures.
Everything else in the standard falls out of one calculation. A station must still be transmitting when the worst-case collision reaches it, so the minimum frame is set by the round-trip time of the longest legal cable. At ten megabits over two and a half kilometres that comes to 512 bit times, which is sixty-four bytes — and that is why a short Ethernet frame is padded. The pad exists so the speed of light does not outrun the transmitter.
USE THE RIG FROM THE PREVIOUS BLUEPRINT, UNCHANGED. Add carrier sense, measure it. Add collision detection, measure again. Eighteen percent, thirty-seven percent, and then above eighty-five.
Erfahren
4 hours
Anweisungen
1
1
Add carrier sense to the ALOHA rig
Add carrier sense to the ALOHA rig
Take the four-station rig from blueprint 7 exactly as it is and change ONE thing in the firmware: before transmitting, read the shared line and wait until it is idle.
Re-run the same load sweep and plot it on the same axes as before. Throughput climbs from the high thirties into the fifties, and it no longer collapses when you push hard — it flattens.
That single `while (channelBusy()) ;` is the difference between a shared radio channel and a local network. Nothing else changed: same hardware, same frames, same backoff.
Then look at what remains on the scope. Collisions still happen, and they happen only when two stations find the line idle within one propagation time of each other. The window did not close, it shrank to the size of the wire.
Benötigte Werkzeuge:
ESP32 Development Board
Digital Oscilloscope
Desktop Computer2
2
Add collision detection, and see the jam
Add collision detection, and see the jam
Now add the second half. While transmitting, keep reading the line back. If what you read differs from what you are driving, another station is on the cable — abort immediately, drive a short jam pattern so every station agrees a collision occurred, then back off.
Put the scope on the shared line, trigger on a collision, and look at it. You will see two overlapping frames, then both stations abandoning them, then the jam, then silence for two different random intervals. That picture is worth more than the throughput number.
Re-run the sweep. Utilisation climbs again, and the gain comes entirely from wasted TIME rather than wasted attempts — the collisions are no more numerous, they are just far shorter.
Finally, deliberately break the rule that makes it work: make one station's frames very short, shorter than the round trip across your wire. It will finish transmitting before a collision can reach it, declare success, and lose data silently. That is exactly the failure the 64-byte minimum exists to prevent.
Benötigte Werkzeuge:
ESP32 Development Board
Digital Oscilloscope
Desktop Computer3
3
The same sketch, two lines later
The same sketch, two lines later
The identical file from blueprint 7. Change MODE to MODE_CSMA and re-run the sweep: the only functional difference is `while (!busIdle()) ;` before transmitting.
Then set MODE_CSMA_CD. Now the transmitter reads the bus back mid-bit and, if what it hears differs from what it is driving, jams and aborts immediately instead of finishing a frame that is already destroyed.
Plot all four curves on one set of axes. The step from blind to slotted is a shared clock; the step to CSMA is one line; the step to CSMA/CD is one comparison inside the bit loop. Three small changes, and the channel goes from eighteen percent to most of the wire.
shared_medium.inocpp
Materialien für diesen Schritt:
Resistor Kit1 Stück
Jumper Wire Set1 StückBenötigte Werkzeuge:
ESP32 Development Board
Breadboard - Classic
Digital Oscilloscope
Desktop Computer4
4
Where 64 bytes comes from, and what listening buys
Where 64 bytes comes from, and what listening buys
Jupyter-Notebook wird geladen …
Benötigte Werkzeuge:
Desktop Computer5
5
Compendium: the frame, and why the standard outlived the cable
Compendium: the frame, and why the standard outlived the cable
THE FRAME, FIELD BY FIELD, AND WHY EACH EXISTS. A 7-byte preamble of alternating bits lets the receiver's clock recovery lock on — this is blueprint 1's problem solved the other way, with one long synchronisation per frame instead of two bits per byte, which is far cheaper on 1500 bytes and impossible without a crystal. Then a start-of-frame delimiter whose last two bits break the pattern, so the byte boundary is unambiguous. Six bytes of destination and six of source, globally unique because the top half is assigned to the manufacturer. A type field, so one cable can carry several unrelated protocols at once — which is precisely what let IP arrive later without changing anything. And a 32-bit CRC, blueprint 2, catching every burst under 32 bits.
THE SIBLING, MEASURED, on the same rig. Pure ALOHA 18.4 %: cannot sense the channel at all. Slotted 36.8 %: a shared clock. CSMA above 80 %: can sense before speaking. CSMA/CD above 90 %: can sense while speaking. Every step costs a stronger physical assumption, and the last one is why WiFi cannot do it — a radio is deafened by its own transmitter, so 802.11 uses collision AVOIDANCE and a request-to-send handshake instead. The cable earned its throughput by being a medium you can listen to.
WHAT KILLED IT AND WHY IT DOES NOT MATTER. Nobody has shared an Ethernet cable in decades: every station has its own switched full-duplex port and CSMA/CD is dead code in the standard. What survived is the FRAME — preamble, addresses, type, CRC — unchanged from 1980 and carried today over twisted pair, fibre and radio at a hundred thousand times the original rate. The access method was the clever part and the frame format was the durable one.
Materialien
2- ab€4.98
- 1 StückPlatzhalter
Verwandte Blueprints
Diese Blueprints teilen Wissen — Techniken, Materialien oder Prinzipien
CC0 Gemeinfrei
Dieser Blueprint ist unter CC0 veröffentlicht. Sie dürfen dieses Werk für jeden Zweck frei kopieren, ändern, verbreiten und verwenden, ohne um Erlaubnis zu fragen.
Unterstützen Sie den Maker, indem Sie Produkte über seinen Blueprint kaufen, wo er eine Maker-Provision von Anbietern festgelegt, verdient. Oder erstellen Sie eine neue Iteration dieses Blueprints und verbinden Sie ihn in Ihrem eigenen Blueprint, um Einnahmen zu teilen.




