Nintendo 64 - Zelda: Ocarina of Time CRT screen
FeatureHubSwitch
OSI layerLayer 1 – PhysicalLayer 2 – Data Link
What it doesRepeats signals to every portForwards frames only to the intended device
Uses MAC addresses?❌ No✅ Yes
TrafficEveryone receives the trafficUsually only the destination receives it
CollisionsOne shared collision domainEach port has its own collision domain
PerformanceSlow and inefficientFaster and more efficient
SecurityPoorer — traffic is visible to all connected devicesBetter — traffic is normally sent only where needed
Modern useVery rareExtremely common

A simple example

Imagine PC-A wants to send data to PC-C.

With a hub:

PC-A → Hub → PC-B + PC-C + PC-D

The hub doesn’t know who the data is for. It simply repeats the signal to everyone. Each computer has to check the data and decide whether it is meant for them.

With a switch:

PC-A → Switch → PC-C

The switch learns the MAC addresses of devices connected to its ports. When PC-A sends a frame destined for PC-C, the switch can forward that frame specifically to PC-C.

The big idea

A hub broadcasts everything. A switch makes decisions.

That’s why switches dramatically reduce unnecessary traffic and collisions and provide much better network performance.

One small clarification to the transcript: modern Ethernet switches don’t literally “eliminate” all collisions in every possible configuration, but with full-duplex switched Ethernet, collisions are effectively eliminated because each link can transmit and receive independently.

Easy way to remember it:

🔌 Hub = Layer 1 = repeat everything
🔀 Switch = Layer 2 = look at MAC addresses and forward intelligently

Why do companies still use hubs?

Companies almost never use traditional Ethernet hubs in normal production networks anymore. Switches have replaced them because they are faster, more efficient, and much easier to manage.

However, there are a few situations where you might still encounter a hub:

Why don’t companies normally use them?

Imagine a company with 50 computers.

With a hub, when computer A sends data to computer B:

A → Hub → 49 other devices also see the traffic

With a switch:

A → Switch → B

The switch makes a decision based on the destination MAC address, so unnecessary traffic isn’t sent to every device.

There’s also an important historical reason: old Ethernet networks using hubs operated in half-duplex and had to deal with collisions. Modern switched Ethernet normally operates full-duplex, so collisions aren’t an issue on the individual links.

The easiest way to remember it

Hub: “I don’t know where this goes, so I’ll send it everywhere.”

Switch: “I know where this device is, so I’ll send it directly there.”

So if you’re studying networking today, think of a hub as primarily a historical/educational device, while the switch is the standard device used to connect computers on a modern LAN.

Geef een reactie

Ontdek meer van Maikel van Esdonk

Abonneer je nu om meer te lezen en toegang te krijgen tot het volledige archief.

Lees verder