Multiple Access and Ethernet

Imagine a dinner party where everyone shares one microphone lying in the middle of the table. If two guests grab it and speak at once, neither is understood — the words collide into noise, and both have wasted their breath. There is no chairperson. Somehow the guests must invent their own etiquette for taking turns, using nothing but what they can hear. This is, almost exactly, the problem a shared broadcast medium poses to a link layer.

A wireless channel is one such medium — every radio in range hears every transmission. So was classic coax Ethernet: a single cable that every machine tapped into, a literal party line. When two stations transmit so their signals overlap at some receiver, the frames are garbled and lost. The multiple-access problem is the design of a medium-access-control (MAC) protocol — a decentralised set of rules by which many stations share one channel without a central scheduler, keeping collisions rare and the channel busy. This page walks the three great families of answer, then lands on the one that built the modern LAN: Ethernet.

Three families of answer

Every multiple-access protocol ever devised falls into one of three strategies. Each makes a different bet about traffic, and each shines under different load.

Random access, step by step

The random-access family is a ladder of increasingly clever manners, each rung fixing a flaw in the one below.

ALOHA (Norm Abramson, Hawaii, 1970) is the ancestor and the simplest: when you have a frame, send it immediately; if it collides (no acknowledgement comes back), wait a random time and retry. Delightfully simple, but two frames overlap if they merely touch at any point, so each frame is vulnerable for twice its own duration. Its peak throughput is a dismal 1/2e \approx 18\% of the channel. Slotted ALOHA tightens this by forcing all stations to start only at the edges of synchronised time-slots. Now two frames either miss entirely or overlap completely — halving the vulnerable window and doubling peak throughput to 1/e \approx 37\%.

CSMAcarrier-sense multiple access — adds the obvious human courtesy: listen before you talk. Sense the channel; if it is busy, wait. This cuts collisions dramatically, but does not abolish them, because of propagation delay: two stations can both sense an idle channel at nearly the same instant, both begin, and only discover the clash once their signals meet in the middle. The further apart they are, the wider this blind window.

The chart plots throughput S (fraction of the channel carrying useful frames) against offered load G (average frames attempted per slot). Both curves rise then fall: too little traffic wastes the channel, too much drowns it in collisions. Slotted ALOHA peaks at S = 1/e when G = 1; pure ALOHA peaks at only 1/2e at G = 0.5. Sensing the carrier (CSMA) pushes the achievable throughput far higher still.

CSMA/CD — collision detection, the heart of classic Ethernet

Classic wired Ethernet adds one more refinement: collision detection (CSMA/CD). Because a station on a wire can listen while it transmits, it can compare what it hears on the medium to what it is sending. The moment those differ, a collision is in progress — so abort immediately rather than wastefully finish the doomed frame. A short "jam" signal makes sure every station sees the collision, then everyone backs off. Detecting and aborting in microseconds, instead of transmitting a whole ruined frame, is what let Ethernet run efficiently on a shared cable.

But how long should a station wait before retrying? Wait too little and the same stations collide again; wait a fixed time and every colliding station retries together forever. Ethernet's answer is binary exponential backoff: after the n-th collision, pick a random wait uniformly from \{0, 1, \dots, 2^n - 1\} slot times (capped at n = 10). Each collision doubles the range stations randomise over, so a lightly-loaded network resolves a clash in a slot or two, while a heavily-loaded one automatically spreads its retries wider and wider until the storm clears.

// Binary exponential backoff: how many slots until N stations that all // collided finally each transmit in a slot with nobody else? We simulate // the Ethernet rule: after collision n, pick a delay in [0, 2^n - 1]. function simulate(stations: number, seed: number): number { // tiny deterministic PRNG so the run is reproducible let s = seed; const rand = () => (s = (s * 1103515245 + 12345) & 0x7fffffff) / 0x7fffffff; // each station tracks its collision count n and its scheduled slot const n = new Array(stations).fill(0); const slot = new Array(stations).fill(0); const done = new Array(stations).fill(false); const pickDelay = (nc: number) => Math.floor(rand() * Math.pow(2, Math.min(nc, 10))); for (let i = 0; i < stations; i++) slot[i] = pickDelay(0); let now = 0, transmitted = 0; while (transmitted < stations && now < 500) { // who wants THIS slot? const waiting = []; for (let i = 0; i < stations; i++) if (!done[i] && slot[i] === now) waiting.push(i); if (waiting.length === 1) { // clean transmission done[waiting[0]] = true; transmitted++; } else if (waiting.length > 1) { // collision: all back off further for (const i of waiting) { n[i]++; slot[i] = now + 1 + pickDelay(n[i]); } } now++; } return now; } for (const k of [2, 5, 10, 20]) { console.log(`${k} colliding stations resolved in ${simulate(k, 7)} slots`); } console.log("More stations -> collisions push the backoff windows wider automatically.");

CSMA/CA — collision avoidance, the heart of Wi-Fi

Radio changes the rules. On a wire a station can compare send-versus-hear, but a radio's own transmitter is so much louder than any distant signal that it cannot hear a collision while transmitting — its own outgoing signal drowns everything out. So Wi-Fi cannot do collision detection. Instead it does collision avoidance (CSMA/CA): sense the channel, wait a random backoff even when idle to desynchronise waiting stations, and use explicit ACK frames — because a sender can't tell a collision from a fade, silence is the only signal that something went wrong.

Radio also suffers the hidden-terminal problem. Stations A and C can both reach the access point B, but a wall (or sheer distance) means A and C cannot hear each other. Each senses the channel idle, both transmit to B, and their frames collide at B — yet neither A nor C ever sensed a problem. Carrier sensing failed because the "carrier" they needed to hear was invisible to them.

The fix is a brief handshake: a sender first transmits a tiny RTS (request-to-send); the access point answers with a CTS (clear-to-send) that everyone in range hears — including the hidden station — which then holds off for the announced duration. A few bytes of reservation prevent a whole frame's worth of collision.

A tempting mistake is to assume Wi-Fi works like wired Ethernet — sense, transmit, and abort if you hear a clash. It can't. A half-duplex radio transceiver cannot meaningfully listen to the faint channel while its own transmitter is blasting away, so collision detection is physically impossible on radio. That single fact is why the wireless protocol is CSMA/CA (avoidance) rather than CSMA/CD (detection): it leans on pre-transmission backoff, explicit ACKs, and RTS/CTS to dodge collisions, because it has no way to catch them mid-frame. If you ever write "Wi-Fi uses CSMA/CD," you have swapped the two worlds.

Addresses and frames: naming stations on the wire

A shared medium needs a way to say who a frame is for. That is the MAC address — a 48-bit identifier (written like 00:1B:44:11:3A:B7) burned into every network interface at manufacture, globally unique, the first half naming the vendor. Every frame carries a destination and source MAC; a station's card matches the destination against its own address (or the all-ones broadcast address FF:FF:FF:FF:FF:FF) and discards the rest.

But applications address each other by IP address, not MAC. So when a machine has a destination IP on its local link and needs the matching MAC, it uses ARP (Address Resolution Protocol): it broadcasts "who has IP 192.168.1.7? tell me your MAC," and the owner replies directly. The answer is cached, so the broadcast happens rarely. ARP is the little translator that lets layer-3 addresses ride on layer-2 frames.

They live on different layers and answer different questions. A MAC address (layer 2) is a fixed, flat name for a physical interface — it never changes as the device moves, and it is only meaningful on the local link; routers strip and rewrite it at every hop. An IP address (layer 3) is a topological, hierarchical name that says where you are in the network, so packets can be routed across the whole internet, and it changes when you join a new network. A frame crossing five routers keeps the same source and destination IP end to end, but carries a fresh pair of MAC addresses on every one of its six link-layer hops. ARP is exactly the bridge between the two.