Hub vs Switch
| Feature | Hub (Layer 1) | Switch (Layer 2) |
|---|---|---|
| Intelligence | None — repeats signal to all ports | Learns MAC addresses, forwards selectively |
| Collision domain | Single (all ports share) | Per port (each port is isolated) |
| Duplex | Half-duplex | Full-duplex |
| Bandwidth | Shared across all ports | Dedicated per port |
| Efficiency | Low — collisions waste bandwidth | High — no collisions |
The hub broadcasts everything. If device A sends to device B, every device on the hub gets the signal (and has to ignore it). On a switch, only device B gets the frame — the rest are free to communicate simultaneously.
Switch vs Router
| Feature | Switch (Layer 2) | Router (Layer 3) |
|---|---|---|
| Address type | MAC addresses | IP addresses |
| Forwarding | Switch fabric (hardware) | Routing table + CPU |
| Network scope | Within the same LAN | Between different networks |
| Broadcast handling | Forwards broadcasts | Drops broadcasts (doesn’t propagate) |
| Default gateway | None | Typically the gateway for the LAN |
A switch connects devices inside one network. A router connects different networks together. Your home “router” is actually a combination: router + switch + WiFi access point + NAT.
Layer 3 Switch
A hybrid device that switches at hardware speed but also routes using IP addresses. Used in large enterprise networks where both high-speed internal switching and inter-VLAN routing are needed. Faster than a traditional router for internal traffic.
Other Comparisons
| Device | Layer | Function |
|---|---|---|
| Repeater | 1 | Regenerates weak signals (extends distance) |
| Hub | 1 | Multi-port repeater |
| Bridge | 2 | Connects two network segments, filters by MAC |
| Switch | 2 | Multi-port bridge |
| Router | 3 | Routes between networks |
| Gateway | 3+ | Protocol translation between different network types |
Q: Why is a Hub a broadcast device?
A: A hub has no intelligence — it doesn’t know MAC addresses. It simply repeats every incoming signal to ALL other ports. This means every device sees every frame, wasting bandwidth.
Q: Can a Switch replace a Router?
A: No. A switch forwards within a LAN using MAC addresses. A router connects different networks using IP addresses. You need a router to reach the internet — your home “router” is actually a router + switch combo.
Q: What is a Layer 3 Switch?
A: A switch that can also route using IP addresses. It combines the wire-speed throughput of a switch with the routing capability of a router. Used for inter-VLAN routing in large enterprise networks.
Q: What’s the difference between a Bridge and a Switch?
A: A bridge has 2 ports and connects two network segments. A switch is essentially a multi-port bridge — it learns MAC addresses and forwards selectively. Switches are faster and more scalable.
Premium Content
Unlock Critical Device Comparisons and all premium lessons with a subscription.
From ₹199.99/year — See plans