Ethernet/The radio room/From hubs to switches
Lesson 5 of 12 · in 3D and VR

From hubs to switches

A hub repeats every bit to every port, so its stations still collide. A switch learns each source address and the port it came in on, sends by the destination, and floods what it has not learned.

Lonely BinaryUpdated 2026-10-095 min readNo board required

View it in VR

Lesson 5 of the Ethernet course opens in a VR headset, on a table in front of you, and a voice starts three seconds after you arrive. Type this short address into the browser on a headset such as Meta Quest or Apple Vision Pro, and press Enter VR. No headset? Press Start the lesson: the same lesson, full screen.

learn.lonelybinary.com/vr/ethernet/5

A star of twisted pairs

In September 1990 the IEEE approved 10BASE-T. Each station got its own twisted pair, run to a box in the middle: a physical star in place of one long shared cable. The wiring changed. What the box in the middle does with a frame decides whether anything else did.

The hub repeats

The first such boxes were hubs. A hub is a repeater: every bit that comes in on one port goes out of every other port. It does not read the frame, so every station still hears every frame, and two stations that send at once through a hub collide exactly as they did on coax. Through a hub, the stations share one collision domain, and each one still listens, backs off and retries.

So the star wiring alone changes nothing about sharing: every station on the hub still waits for every other, as on the shared channel.

The switch learns

A switch reads each frame. It writes the frame's source MAC address into a table against the port the frame came in on. It learns from the source only; a destination tells it nothing about where that station is.

Then it sends by the destination. A frame for an address in the table goes out of that one port. A frame for an address it has not learned yet, or a broadcast, goes out of every other port; that is flooding. The first frame to a quiet station is flooded, and its answer teaches the switch where it lives, so the table fills from ordinary traffic with no setup.

A switch does not set up a circuit between two ports, and it does not route IP. It forwards frames one at a time on the local network. Addresses themselves are in Who is this frame for?.

Full duplex

In March 1997 full duplex was standardised. A station alone on its switch port can send and receive at the same time, and a full-duplex point-to-point link does not use collision detection. A hub segment is still half duplex and keeps the old listen-and-back-off rules. For a board, the cable to a switch is the usual case: Ethernet instead of Wi-Fi in the ESP32 book.

Common mistakes

  • Saying a switch learns where a frame is going. It learns where a frame came from: the source address and its port. The destination only decides where the frame goes.
  • Expecting a switch never to send a frame everywhere. An unknown destination and a broadcast both go out of every other port, so a few flooded frames are normal.
  • Treating a hub as a small switch. A hub repeats every bit to every port, and its stations still collide. Only a full-duplex link to a switch port drops collision detection.

Edit this page — content/fundamentals/ethernet/from-hubs-to-switches.mdx

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Fundamentals on the forum →