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.
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.
- 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. 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.
How a hub works, step by step
- PC A sends a frame to Printer D. Its NIC puts electrical pulses on the cable.
- The hub receives the pulses on PC A's port.
- It cleans up (regenerates) the signal so it is strong and sharp again.
- It sends the signal out of every other port at the same moment: to PC B, PC C and Printer D.
- 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.
- 1. PC A sends to Printer D. Destination MAC 02:00:00:00:00:0d, source 02:00:00:00:00:0a.
- 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. 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.
| Information | Does a hub use it? |
|---|---|
| Electrical signal (bits) | Yes: it regenerates and repeats it |
| MAC addresses | No |
| IP addresses | No |
| Port numbers or applications | No |
| OSI layer | Hubbits only |
|---|---|
| L7 ApplicationHTTP, DNS | – |
| L6 PresentationEncoding, encryption | – |
| L5 SessionSessions | – |
| L4 TransportTCP/UDP ports | – |
| L3 NetworkIP addresses | – |
| L2 Data LinkFrames, MAC addresses | – |
| L1 PhysicalBits on cable or radio | ✓ |
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.
- 1. PC A and PC C send at the same moment. Each one thought the cable was quiet.
- 2. The signals collide. The mixed-up signal reaches everyone. Both frames are destroyed.
- 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.
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:
- Carrier sense: listen first. If someone else is sending, wait.
- Multiple access: when it is quiet, anyone may start sending.
- Collision detection: keep listening while sending. If the signal on the wire doesn't match what you sent, a collision happened.
- Send a short jam signal so everyone knows there was a collision.
- 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.
| Hub | Switch | |
|---|---|---|
| OSI layer | Layer 1 | Layer 2 |
| Reads MAC addresses | No | Yes, learns them in a MAC address table |
| Where a frame goes | Out of every other port | Only the port it needs (floods only when unknown) |
| Collision domains | One for the whole hub | One per port |
| Duplex | Half only | Full (or half if needed) |
| Bandwidth | Shared by all ports | Dedicated 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:
| Symptom | Why | Fix |
|---|---|---|
| The whole network slows down when one person copies a big file | Shared bandwidth | Replace the hub with a switch |
| A collision light on the hub flashes constantly | Too many devices trying to send | Replace with a switch |
| Late collisions and errors on a PC | The PC is set to full duplex but the hub is half duplex | Set the PC to auto or half duplex; better, replace the hub |
| A fast NIC only gets 10 Mb/s | The hub only supports one speed | Replace 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.
- 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
PC A sends a frame to PC B through a 4-port hub. Which devices receive the signal?
A hub has 8 PCs connected. How many collision domains is that?
PC A and PC C on the same hub start sending at exactly the same moment.
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.