Network Bytes · Episode 18 · CCNA 1.4 / 1.13

Collisions and why switches killed hubs

Hubs copied every message to every device, so signals crashed into each other. Here's what a collision is and how switches made them history.

Posted · About a 1 minute watch, 3 minute read · Take the quiz

A hub shouts to everyone

A hub is a very simple box. It doesn't look at what comes in. Whatever arrives on one port, it copies out of every other port. If your laptop sends something to the printer, the phone, the TV and everything else plugged into that hub hears it too.

Because everyone shares the same "air", only one device can send at a time. Everyone else has to listen and wait for a quiet moment.

What a collision is

If two devices start sending at the same moment, their electrical signals run into each other on the shared wire and both messages are garbled. That's a collision.

Classic Ethernet had a rule for this called CSMA/CD (carrier sense, multiple access, collision detection): listen before you talk, and if you detect a collision, stop, wait a random amount of time, and try again. The random wait matters: if both devices waited the same amount, they'd just crash again.

The catch is that every device on a hub shares the same collision domain. Add more devices and you get more collisions, more waiting and a slower network for everyone.

A switch sends only where it's needed

A switch looks at each frame. When a frame arrives, the switch notes the sender's MAC address and the port it came in on, and saves that pair in its MAC address table. Over time it learns which device lives on which port.

When a frame arrives for a MAC address it knows, the switch forwards it out of that one port only. The other devices never see it.

Each switch port is its own collision domain, a private lane between the switch and one device. With full duplex, a device can send and receive at the same time on that lane, so collisions can't happen at all. That's why hubs disappeared from networks.

Try it yourself

Look at the box your home devices plug into with cables (often the back of your Wi-Fi router). Those ports are a small built-in switch, not a hub. On a computer you can see the duplex setting of a wired connection: on Windows, open Device Manager > Network adapters, open your Ethernet adapter and look at Speed & Duplex under Advanced; it will normally say Auto Negotiation or Full Duplex.

Good to know

  • Each switch port is its own collision domain; with full duplex there are no collisions at all.
  • CSMA/CD only applies to half-duplex links, like the old shared hub networks.
  • Switches still send some frames out of every port: broadcasts, and frames for a MAC address they haven't learned yet. That's covered in a later lesson.

For CCNA learners

This lines up with CCNA 200-301 exam topics 1.4 (interface and cable issues: collisions, errors, duplex mismatch) and 1.13 (switching concepts: MAC learning and aging, frame switching, frame flooding, the MAC address table).

Test your knowledge

Quick quiz: Collisions and why switches killed hubs

4 multiple-choice questions. Pick one answer for each, then check how you did.

1What does a hub do with a frame that comes in one port?
2What is a collision?
3After a collision, why do devices wait a random amount of time before trying again?
4How does a switch know which port to send a frame out of?

Sources

Video transcript

Hubs shouted at everyone. Switches whisper.

A hub is a simple box. Whatever comes in one port, it copies out of every other port. Everyone hears everything, so only one device can talk at a time.

If two devices talk at once, their signals crash into each other. That's a collision. Both stop, wait a random moment, and try again. More devices meant more crashes.

A switch learns which device lives on which port, using their MAC addresses. Then it sends each frame only where it needs to go. Each port gets its own private lane, so devices can talk at the same time.

That's why hubs disappeared. Switches made collisions history.

More from Network Bytes

All Network Bytes lessons