Course contentsShow
← Computer Science
Lesson 1454 of 2,87233. Networking FundamentalsFree lesson

Network Switches vs Hubs

Contrasting how switches intelligently forward frames versus how hubs broadcast to all ports.

Network Switches vs Hubs

What you'll learn: How switches intelligently direct traffic while hubs blindly broadcast everything.

The Fundamental Difference

Now that you understand MAC addresses and CSMA/CD, you need to know how devices connect within a local network. Both hubs and switches physically connect multiple devices, but they handle incoming frames very differently.

Hubs: The Broadcast Approach

A hub is a simple, unintelligent repeater. When a frame arrives on any port, the hub copies it to every other port indiscriminately. It doesn't examine MAC addresses or make decisions—it just floods everything everywhere.

Analogy: A hub is like shouting in a crowded room. Everyone hears your message, even if you only wanted to talk to one person.

Consequences:

  • Creates one large collision domain
  • Wastes bandwidth (irrelevant traffic reaches all devices)
  • Poor security (everyone sees everyone else's frames)
  • Relies entirely on CSMA/CD for access control

Switches: The Intelligent Approach

A switch maintains a MAC address table that maps addresses to physical ports. When a frame arrives, the switch:

  1. Reads the destination MAC address from the frame
  2. Looks it up in its table
  3. Forwards the frame only to the destination port

If the destination is unknown, the switch floods the frame (like a hub) but learns from the source MAC addresses it sees, building its table over time.

Benefits:

  • Each port is a separate collision domain
  • Better bandwidth utilization
  • Improved security and privacy
  • Enables full-duplex communication

Key Takeaway: Hubs blindly broadcast frames to all ports creating one collision domain, while switches intelligently forward frames only to the destination port, creating separate collision domains and dramatically improving network efficiency.