Routelearn.net
Course menu

Unit 2: Network DevicesLesson 2.2 (2 of 8 in this unit)6 of 84 in the Network Fundamentals course

Hubs

A hub is the simplest device that can join computers into a network. It repeats every signal it receives out of every other port, without looking at any addresses. This lesson explains how hubs work, the problems they cause, and why switches replaced them.

Beginner · 11 min read · Before this: Network interface cards (NICs)

A hub is a Layer 1 device that regenerates every signal it receives on one port and repeats it out of all other ports without reading any addresses. All devices attached to it share one collision domain and must work in half duplex.

In simple terms: A hub is a simple box that repeats everything it hears to every other cable. Every device gets every message, and only one can talk at a time.

A hub is a box with several Ethernet ports. Plug computers into it and they can talk to each other. Inside, it does one thing: whatever signal comes in on one port, it repeats out of every other port. It does not read the frame, does not know any addresses, and does not make decisions. That is why a hub is also called a multiport repeater.

💡 In simple terms: a hub is like someone shouting in a small room. Everyone in the room hears every word, even if the message was meant for just one person. And if two people speak at once, nobody can understand either of them.

A hub in the middle with five devices. PC 1 sends a frame; the hub copies it out to every other device.PC 1PC 2LaptopPrinterServerHUBA frame arrives from PC 1 (green). The hub repeats it out of every other port (blue).Every device receives it, even though only one of them was the destination.
A small Ethernet hub. It has no idea who the frame is for, so it sends it everywhere.

Why hubs existed

Early Ethernet used one long coaxial cable that every computer clipped onto (a bus topology). One bad connector could break the whole network, and finding it was hard. Hubs solved this: each computer got its own cable to a central box, forming a star. If one cable broke, only one computer was affected. The hub also regenerated the signal, so cables could reach further.

But electrically, a hub still behaves like that single shared cable. It looks like a star, but works like a bus. That is the root of all its problems.

Where a hub sat in a network

In a 1990s office, a hub joined the PCs and printer of one room or floor. A router connected that group to other networks.

PC 1PC 2PrinterHubshared 10 Mb/sRouter192.168.1.1Other networks
  1. 1. PC 1 prints. The hub repeats the signal to every other port: the printer, PC 2 and even the router all receive it.
  2. 2. PC 2 reaches another network. The frame is for the router, but PC 1 and the printer hear it too. Only the router passes it on.
Every device on a hub hears every frame. Devices whose MAC address doesn't match simply drop it.

How a hub works, step by step

Signal arrives
on port 1
Regenerate
clean up the signal
Repeat
out ports 2, 3, 4
Each NIC checks
is the MAC mine?
A hub never reads the frame. The receiving NICs do the filtering.
  1. PC A sends a frame to Printer D. Its NIC puts electrical pulses on the cable.
  2. The hub receives the pulses on PC A's port.
  3. It cleans up (regenerates) the signal so it is strong and sharp again.
  4. It sends the signal out of every other port at the same moment: to PC B, PC C and Printer D.
  5. Each NIC reads the destination MAC address. Printer D sees its own address and keeps the frame. PC B and PC C see someone else's address and drop it.
Hub4 ports, 10 Mb/sPC A02:00:00:00:00:0aPC B02:00:00:00:00:0bPC C02:00:00:00:00:0cPrinter D02:00:00:00:00:0d
  1. 1. PC A sends to Printer D. Destination MAC 02:00:00:00:00:0d, source 02:00:00:00:00:0a.
  2. 2. The hub repeats it everywhere. Three copies leave the hub. It has no idea which port Printer D is on, and never will.
  3. 3. Only the printer keeps it. PC B and PC C drop the frame after reading the destination MAC. Their link was still busy while it was sent.

What the hub sees in the frame

Nothing at all. A switch reads the MAC addresses and a router reads the IP addresses, but a hub only sees a stream of bits. It cannot tell a broadcast from a unicast frame, or a web page from a print job. The frame leaves the hub exactly as it came in: same source and destination MAC, same IP addresses, same everything.

InformationDoes a hub use it?
Electrical signal (bits)Yes: it regenerates and repeats it
MAC addressesNo
IP addressesNo
Port numbers or applicationsNo
OSI layerHubbits only
L7 Application–
L6 Presentation–
L5 Session–
L4 Transport–
L3 Network–
L2 Data Link–
L1 Physical✓
A hub works only at Layer 1 (Physical).

One collision domain

Because a hub repeats everything everywhere, only one device can send at a time. If two devices send at once, their signals meet inside the hub and mix together into garbage. This is called a collision. The group of devices that can collide with each other is a collision domain. Every port on a hub is in the same collision domain.

Hub4 ports, 10 Mb/sPC A02:00:00:00:00:0aPC B02:00:00:00:00:0bPC C02:00:00:00:00:0cPrinter D02:00:00:00:00:0d
  1. 1. PC A and PC C send at the same moment. Each one thought the cable was quiet.
  2. 2. The signals collide. The mixed-up signal reaches everyone. Both frames are destroyed.
  3. 3. They wait and try again. Each waits a random short time. PC A happens to pick the shorter wait, so it sends first this time.
On a hub, every device shares one collision domain.

You can learn more in Collision domains.

How devices take turns: CSMA/CD

Devices on a hub use a set of rules called CSMA/CD (Carrier Sense Multiple Access with Collision Detection). It sounds complicated, but it is how polite people talk in a meeting:

  1. Carrier sense: listen first. If someone else is sending, wait.
  2. Multiple access: when it is quiet, anyone may start sending.
  3. Collision detection: keep listening while sending. If the signal on the wire doesn't match what you sent, a collision happened.
  4. Send a short jam signal so everyone knows there was a collision.
  5. Wait a random time (called backoff), then try again. The random wait makes it unlikely both devices pick the same moment again.

Half duplex only

Half duplex means a device can send or receive, but not both at the same time, like a walkie-talkie. Every device on a hub must use half duplex, because sending while someone else is sending causes a collision. Switches allow full duplex: send and receive at once, like a phone call. See Speed and duplex.

A real-world example: the shared 10 Mb/s

Imagine 20 PCs on one 10 Mb/s hub. The 10 Mb/s is not per PC. It is shared by all 20. If they all try to send, each gets well under 0.5 Mb/s on average, and collisions waste even more. When one person copied a large file to a server, everyone else's network slowed to a crawl. Replacing that hub with a 100 Mb/s switch gave each port its own full-duplex 100 Mb/s link.

Problems with hubs

Shared bandwidth

All ports share one speed. More devices means less for each.

Collisions

Simultaneous senders destroy each other's frames and must resend.

Half duplex

No device can send and receive at the same time.

No privacy

Every device receives every frame. Anyone running a packet capture can read other people's traffic.

Doesn't scale

The busier the network, the more collisions, until it barely works.

No speed mixing

Basic hubs run all ports at one speed, so a fast NIC is held back.

Why hubs became obsolete

Switches fix every problem in the list above. A switch reads the destination MAC address and sends the frame only to the port where that device lives. Each port is its own collision domain, so with full duplex there are no collisions at all. Once switches became cheap, there was no reason to buy a hub. Gigabit Ethernet and faster standards are used in full duplex in practice, so hubs for those speeds were never really sold.

HubSwitch
OSI layerLayer 1Layer 2
Reads MAC addressesNoYes, learns them in a MAC address table
Where a frame goesOut of every other portOnly the port it needs (floods only when unknown)
Collision domainsOne for the whole hubOne per port
DuplexHalf onlyFull (or half if needed)
BandwidthShared by all portsDedicated to each port

There is a full side-by-side in Comparing network devices.

When a hub network struggles

If you ever meet an old hub, these are the signs that it is the problem:

SymptomWhyFix
The whole network slows down when one person copies a big fileShared bandwidthReplace the hub with a switch
A collision light on the hub flashes constantlyToo many devices trying to sendReplace with a switch
Late collisions and errors on a PCThe PC is set to full duplex but the hub is half duplexSet the PC to auto or half duplex; better, replace the hub
A fast NIC only gets 10 Mb/sThe hub only supports one speedReplace with a switch

On a PC, a large and growing count of collisions or errors in the adapter statistics is the clue. The commands to see them are in Layer 1 and 2 problems.

Common mistakes

  • Calling a small switch a “hub”. Many people say “hub” for any small box with ports. Check the label: if it says “switch”, it reads MAC addresses.
  • Thinking a hub sends a frame only to its destination. It can't: it doesn't know any addresses.
  • Thinking a hub creates separate collision domains per port. It is one collision domain for all ports.
  • Thinking a hub stops broadcasts. It repeats everything, broadcasts included. Only a router stops broadcasts.
✅ Key takeaways
  • A hub is a Layer 1 multiport repeater: it copies every signal out of every other port.
  • It never reads MAC or IP addresses; the receiving NICs do the filtering.
  • All ports on a hub share one collision domain and one bandwidth.
  • Devices on a hub must use half duplex and CSMA/CD.
  • Switches replaced hubs because they forward frames only where needed, with full duplex and no collisions.

Knowledge check

Predict · scenario 1

PC A sends a frame to PC B through a 4-port hub. Which devices receive the signal?

Predict · scenario 2

A hub has 8 PCs connected. How many collision domains is that?

Predict · scenario 3

PC A and PC C on the same hub start sending at exactly the same moment.

Predict · scenario 4

Someone sets a PC's NIC to 100 Mb/s full duplex and plugs it into an old hub.

Where to go next

Now see how the device that replaced the hub works in Switches. For the frames a hub blindly repeats, read The Ethernet frame.

FAQ

Are hubs still used today?
Almost never. Switches became cheap in the early 2000s and hubs stopped being made. You may still find one in an old building, a lab, or a museum. Today the word “hub” is often used loosely for a small switch or a home router, which is not a real hub.
Is a USB hub the same as a network hub?
No. A USB hub adds USB ports to a computer. It has nothing to do with Ethernet networks, despite the shared name.
Why did people ever use hubs instead of switches?
Price and simplicity. A hub only needs to copy signals, so it needed very little electronics. Early switches were expensive, so small networks used hubs until switch prices fell.
Can I use a hub to capture traffic for Wireshark?
That was a classic trick, because a hub copies everything to every port. On modern networks you use a switch's port mirroring feature (often called SPAN) or a network tap instead.