keepcalculator

06 Numbers and Powers

Hub vs Switch: How Each Handles Network Traffic

Card No. 06·15431 · Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Finish time
50 min
You entered
Distance
10 km
You entered
You enter
Finish time, Distance
You get
Average pace, Average speed
Rounding
2 dp

A hub and a switch are both devices that connect multiple computers on a network, but they handle traffic in fundamentally different ways: a hub broadcasts every incoming data packet to every port, while a switch learns which device is on which port and sends the packet only to the intended recipient. This single difference determines everything else about their performance, security, and cost. Below we break down how each device works, where each is still used, and how to choose between them.

What a Hub Does with Traffic

A hub is the simplest possible network repeater. When a computer sends a frame (a small chunk of data) to the hub, the hub takes that electrical signal and sends it out on every single port except the one it came in on. Every connected device sees the frame, but only the device whose MAC address matches the destination actually processes it; the others discard it. This is called a broadcast domain — all devices share the same collision domain, meaning if two devices send at the same moment, their signals collide and both must resend.

Because hubs operate at Layer 1 (the physical layer) of the OSI model, they have no awareness of addresses or data structure. They simply regenerate the signal. In a 10Base-T or 100Base-T network, a hub forces every device to operate in half-duplex mode — it can either send or receive, never both at once. This cuts effective bandwidth in half compared to a switch, because the hub itself can only handle one conversation at a time.

What a Switch Does with Traffic

A switch is a smart hub. It operates at Layer 2 (the data link layer) and reads the destination MAC address inside each frame. The switch maintains a table (the MAC address table) that maps each port to the MAC address of the device connected to it. When a frame arrives, the switch looks up the destination MAC in its table and forwards the frame only out the correct port. If the address is not in the table, it floods the frame out all ports except the source — exactly like a hub — but only until it learns the address.

Switches support full-duplex communication: each port can send and receive simultaneously. This effectively doubles the throughput per connection. A 100 Mbps switch can deliver 100 Mbps in each direction at the same time, whereas a 100 Mbps hub can only deliver 100 Mbps total, shared among all devices. Modern switches also buffer frames, so if two devices send to the same destination at once, the switch queues them rather than letting them collide.

Background: Why Hubs Existed and Why Switches Replaced Them

In the early days of Ethernet (1980s and early 1990s), networks used coaxial cable with a bus topology — every computer tapped into the same wire. Hubs were introduced as a central connection point, making wiring easier and allowing star topologies. They were cheap and simple, which was fine when networks were small and traffic was light.

As networks grew, the limitations of hubs became painful. With more devices, collisions increased, and the effective throughput dropped dramatically. In the mid-1990s, switch prices fell, and switches became the default choice for new installations. Today, hubs are essentially obsolete, but they still appear in very old equipment, in some lab environments for network education, or as a way to passively capture traffic with a packet sniffer (since every frame is broadcast).

Performance and Collision Comparison

The most concrete difference is how each handles simultaneous transmissions. Consider a 4-port hub and a 4-port switch, both 100 Mbps, with four computers (A, B, C, D).

  • Hub: If A sends to B while C sends to D at the same moment, the two signals collide. Both A and C must wait a random backoff time and retransmit. The hub can only handle one transmission at a time, so the total throughput is capped at 100 Mbps, shared by all four devices.
  • Switch: The switch can forward A→B and C→D simultaneously, because each port pair is an independent collision domain. Total throughput can reach 200 Mbps in this scenario (100 Mbps per pair). With full-duplex, each link can carry 100 Mbps in both directions, so a 4-port switch can theoretically handle 800 Mbps of aggregate traffic.

In practice, real-world throughput is lower due to overhead, but the difference is huge. On a busy network, a hub will quickly become a bottleneck, while a switch handles multiple conversations without degradation.

Security and Troubleshooting Differences

Security is another area where switches are clearly superior. On a hub, every device sees every frame. Any computer can run a packet sniffer (like Wireshark) and capture all traffic on the network, including passwords and unencrypted data. On a switch, frames are sent only to the intended port, so a sniffer on one port only sees its own traffic and broadcast frames.

However, switches are not perfectly secure — there are techniques like ARP spoofing or MAC flooding that can trick a switch into sending traffic to the wrong port. But for a typical home or small office, a switch provides a strong default level of privacy that a hub cannot match.

For troubleshooting, hubs are actually easier in one respect: because everything is broadcast, you can plug a laptop into any port and see all traffic. With a switch, you need to configure port mirroring (SPAN) on a managed switch to do the same. But this is a minor advantage for a device that is otherwise obsolete.

How to Choose: Hub vs Switch in Real Life

For any new purchase, choose a switch. Hubs are not sold in mainstream retail anymore, and even a cheap unmanaged switch costs about the same as a hub did a decade ago. Here are the only situations where a hub might still appear:

  • You are maintaining a legacy network from the 1990s.
  • You are deliberately using a hub to capture traffic for educational purposes.
  • You have a very small network (2-3 devices) with minimal traffic and already own a hub.

When buying a switch, consider the number of ports (5, 8, 16, 24 are common), speed (Fast Ethernet 100 Mbps, Gigabit 1000 Mbps, or 10 Gbps for high-end), and whether you need managed features like VLANs or QoS. For home use, an unmanaged Gigabit switch is the standard choice.

Cost and Power Consumption

Hubs were cheaper than switches when both were new, but that advantage disappeared. A modern unmanaged 8-port Gigabit switch costs roughly the same as a 100 Mbps hub did in 2000 (adjusting for inflation), and it is far faster. Power consumption is also similar — a typical 8-port switch draws 2-5 watts, while a hub drew similar or more because it amplified signals to all ports.

In terms of total cost of ownership, switches win because they reduce network congestion, which means fewer retransmissions and less wasted bandwidth. For a business, the difference in employee productivity and network reliability easily justifies the slightly higher upfront cost of a managed switch if needed.

Frequently Asked Questions

Can I use a hub and a switch together in the same network?

Yes, you can. Connect the hub to one port on the switch. Devices on the hub will share that single switch port’s bandwidth, and they will still be in the same collision domain among themselves. But the switch will handle traffic between the hub and the rest of the network efficiently. This setup is rare but works for expanding an old network.

Does a hub slow down the internet?

Yes, indirectly. A hub does not slow down your internet connection itself, but it creates collisions and forces all devices to share the same bandwidth. If you have a fast internet plan (100 Mbps or more), a hub will bottleneck it because the hub’s total throughput is limited to its own speed (e.g., 100 Mbps) and that is shared among all devices. A switch avoids this by giving each port full bandwidth.

Why do switches have a MAC address table and hubs do not?

Because switches operate at Layer 2 and need to make forwarding decisions. They learn MAC addresses by reading the source address of every frame and recording which port it came from. Hubs operate at Layer 1 and simply repeat electrical signals, so they have no concept of addresses or tables.

Is a router the same as a switch?

No. A router connects different networks (like your home network to the internet) and routes packets based on IP addresses. A switch connects devices within the same network and forwards frames based on MAC addresses. Many home routers include a built-in switch (the LAN ports), but they are separate functions.

Can a switch replace a hub in an old network?

Yes, in almost all cases. A switch is backward compatible with Ethernet devices. You can unplug a hub and plug in a switch, and all devices will work. The only exception is if you have a device that requires half-duplex operation or relies on the hub’s broadcast behavior (e.g., some ancient network printers), but that is extremely rare. Switches auto-negotiate duplex mode, so they can handle both.

Are there any advantages of a hub over a switch today?

Very few. The main advantage is cost — if you find an old hub for free, it can be used for a small, low-traffic network. Also, for network security testing, a hub is a simple way to capture all traffic without configuring port mirroring. But for any practical purpose, a switch is better in every measurable way: speed, security, and reliability.

Related

Formula used
in t | Finish time | min | 50 | 0
in d | Distance | km | 10 | 0 | 100000
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →