Networking Tutorials

Hub vs Switch vs Router: What's the Difference?

These three devices are constantly confused, but they work at different layers and do different jobs: a hub blindly repeats (Layer 1), a switch forwards frames by MAC address within a network (Layer 2), and a router forwards packets between networks by IP address (Layer 3).

Side by side

DeviceOSI LayerForwards byKey behaviour
Hub1 (Physical)Nothing — repeats to all portsOne collision domain, obsolete
Switch2 (Data Link)Destination MAC addressPer-port collision domains, one broadcast domain
Router3 (Network)Destination IP addressSeparates broadcast domains, connects networks

The details that matter

A hub is a dumb repeater — everything in, everything out, causing collisions; it's effectively extinct. A switch learns MAC addresses and forwards frames only to the right port, giving each device its own collision domain — but all ports share one broadcast domain. A router is the boundary between networks: it stops broadcasts and routes between subnets using IP. Modern networks use switches within a LAN and routers to connect LANs — a core CCNA concept covered in our routing & switching guide.

Frequently asked questions

What is the main difference between a switch and a router?

A switch forwards frames within a network using MAC addresses (Layer 2); a router forwards packets between networks using IP addresses (Layer 3) and separates broadcast domains.

Why are hubs obsolete?

A hub repeats every signal to all ports, creating one big collision domain and wasting bandwidth. Switches replaced them by forwarding intelligently.

Does a switch separate broadcast domains?

No — a standard switch has one broadcast domain across all ports (unless VLANs are used). Routers separate broadcast domains.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.