Lesson
Hubs, Bridges and Switches
Learning objective
Explain why hubs repeat signals while bridges and switches make link-layer forwarding decisions.
When several Ethernet hosts share a local network, the device between them determines who receives each signal or frame. A hub repeats physical signals. Bridges and switches examine link-layer addresses and make selective forwarding decisions.
One local Ethernet conversation
Picture a workstation sending an Ethernet frame to a local server. The workstation's network interface places a source MAC address and a destination MAC address in the frame. The source identifies the sender interface; the destination identifies the intended local recipient.
The frame enters an intermediary through an ingress port. Any port selected to carry it onward is an egress port. A hub, bridge, and switch do not make that selection in the same way. This lesson keeps one small topology stable so each behavioral difference is visible.
What a hub does
A hub is a physical-layer repeater with several ports. When a signal enters one port, the hub regenerates that signal toward its other ports. It does not inspect source or destination MAC addresses and it cannot build a forwarding table.
Every attached device shares the available bandwidth and the same collision domain. Historic hub-based Ethernet commonly used half duplex, so devices had to take turns and simultaneous transmissions could collide. A receiving interface still decides whether a repeated frame is addressed to it, but the hub has already sent the signal throughout the shared segment.
Why bridges changed Ethernet
A bridge connects Ethernet segments while examining frame addresses. Instead of repeating every signal everywhere, it can learn which source MAC addresses are reachable through each bridge port and avoid forwarding a frame to a segment that does not need it.
This divides the network into smaller collision domains. A classic bridge often had only a few ports and performed more work in software. A modern switch applies the same learning-bridge idea across more ports at higher speed. Neither device becomes a router merely because it forwards selectively.
How a switch learns
When a frame arrives, a switch records the frame's source MAC address against the ingress port. The arriving frame is evidence that the sender can be reached through that port. If the same source appears on another port later, the switch refreshes the entry to the new location.
The switch does not learn a destination merely by reading the destination field. It looks up that address to make a forwarding decision. Dynamic entries eventually age out after an implementation-dependent period unless traffic refreshes them; there is no universal timer.
How a switch forwards
After learning the source, the switch examines the destination:
- Known unicast: if the destination is learned on another port, forward only through that port.
- Filtering: if the destination is learned on the ingress port, do not forward it to other ports.
- Unknown unicast: if the destination is not learned, flood eligible ports except the ingress port.
- Broadcast: flood eligible ports except the ingress port.
- Reply learning: a reply teaches the switch where the replying source is located.
Each full-duplex switch port normally forms a separate collision domain with dedicated link capacity. The switch does not automatically split the broadcast domain, route IP packets, authorize users, or encrypt their traffic.
Compare hub, bridge and switch
The important improvement is a change in decision-making, not simply a faster box.
| Device | What it examines | Delivery behavior | Collision scope | What it does not do |
|---|---|---|---|---|
| Hub | Physical signal | Repeats toward all other ports | One shared collision domain | No MAC learning or filtering |
| Bridge | Source and destination MAC addresses | Learns and filters between segments | One collision domain per segment | Does not route between IP networks |
| Switch | Source and destination MAC addresses | Forwards, filters, or floods per frame | Normally one per full-duplex port | Does not create a security boundary by itself |
The interactive comparison will build on this table. The table preserves the complete public conclusion when JavaScript or motion is unavailable.
See the forwarding behavior change
Select one dimension and compare the same local conversation without treating a switch as a router or security boundary.
Hub
Hub repeats the incoming physical signal toward every other port and does not inspect MAC addresses.
- Host A NIC
- P1 ingress
- P2 egress
- P3 egress
- Host B/C NIC
Carried data
- Message
- Hello Host B
Stage 1 of 3
Traffic arrives on P1
Host A sends toward the Hub on its ingress port.
What changed?
- What entered?
- Traffic from Host A entered on P1.
- Where did it leave?
- P2 and P3, because a hub repeats toward every other port.
- What did it inspect or learn?
- The physical signal; it does not read MAC addresses.
Technical detail
Repeats the incoming physical signal toward every other port.
Free account
Continue this lesson for free
Unlock the remaining explanation, Wireshark checks, quizzes, interview answers, and saved progress. No payment required.
Continue with Google or email