The one-sentence version

A switch connects devices within the same network and forwards traffic using MAC addresses. A router connects separate networks together and forwards traffic using IP addresses. That distinction — MAC vs IP, same network vs different networks — is the core of what the A+ exam tests.

🔀
Layer 3 device
Router
Connects different networks together. Decides the best path for traffic to travel between networks using IP addresses.
OSI Layer Layer 3 — Network
Uses IP addresses
Connects Different networks
Traffic scope WAN + LAN
🔌
Layer 2 device
Switch
Connects devices within the same network. Forwards frames efficiently to the right port using MAC addresses.
OSI Layer Layer 2 — Data Link
Uses MAC addresses
Connects Same network devices
Traffic scope LAN only

How they fit together in a real network

Routers and switches aren't competitors — they're partners. In almost every real network, both are present and each handles a different job. The router sits at the edge, facing the internet. The switch sits inside, connecting everything on the local network.

🏠 Typical Home / Small Office Network Layout
🌐
Internet (ISP)
🔀
Router
🔌
Switch
💻
PC
🖨️
Printer
🖥️
Server
Router handles internet traffic (Layer 3 / IP)
Switch handles local traffic (Layer 2 / MAC)

When your PC wants to print to the office printer, that traffic never touches the router — the switch handles it entirely within the local network using MAC addresses. When your PC wants to reach a website, the traffic goes switch → router → internet, with the router handling the IP-level routing to the correct destination.


Routers vs switches — full comparison

Router Switch
OSI Layer Layer 3 — Network Layer 2 — Data Link
Addresses used IP addresses MAC addresses
Primary job Route traffic between networks Forward frames within a network
Connects LAN to WAN (internet) Devices on same LAN
Traffic table Routing table (IP-based) MAC address table (CAM table)
Broadcast domain Separates broadcast domains All ports in one broadcast domain*
Default gateway? Yes — it IS the default gateway No — transparent to IP routing
NAT? Yes — translates private to public IPs No — doesn't touch IP addresses
Common location Network edge (ISP-facing) Inside the LAN (closet/rack)

* Managed switches with VLANs can segment broadcast domains — but that's a Network+ topic.

⚡ A+ Exam — The Key Memory Hook

Switch = Layer 2 = MAC addresses = same network.

Router = Layer 3 = IP addresses = between networks.

If the exam asks "what device separates broadcast domains?" — the answer is router. If it asks "what device uses a MAC address table?" — the answer is switch. If it asks "what is the default gateway?" — that's the router's IP address on the local network.


Hub vs switch — why it matters

📡 Don't confuse switches with hubs

A hub is an older Layer 1 device that blindly sends every incoming frame out to every single port — it has no intelligence. Every device on a hub receives every frame, whether it's meant for them or not. This wastes bandwidth and creates collisions.

A switch is smarter — it learns which device is on which port (via the MAC address table) and sends frames only to the correct port. This is called unicast forwarding and it's why switches replaced hubs. On the A+ exam, hubs still appear as a concept — just remember: hub = Layer 1, broadcasts to all; switch = Layer 2, sends only to the destination.


Real-world scenarios

🏠
Home network — internet not workingRouter issue
If devices can reach each other (print, share files) but can't reach the internet, the problem is almost certainly the router — it's the device responsible for connecting the LAN to the WAN. Check the router's WAN connection, run ping 8.8.8.8 to test internet connectivity.
🖨️
Can't reach network printerSwitch issue
If devices on the same network can't reach each other — say, a PC can't find the printer — the problem is likely in the switch layer. Check cables, check that the switch port is active, and run ping [printer IP] to verify local connectivity.
🏢
Office with 40 devicesBoth needed
A 24-port switch connects all 40 devices on the local network. A single router connects the switch (and therefore all devices) to the internet and acts as the default gateway. Both devices are essential — neither can replace the other.
🔀
Layer 3 switch — when things overlapAdvanced
Some enterprise switches are "Layer 3 switches" — they can do basic IP routing in addition to MAC-based switching. These blur the line between routers and switches. On the A+ exam, assume a switch is Layer 2 unless specifically told otherwise.

Key Takeaways

Router = Layer 3, IP addresses, connects different networks — it's the device that gets you to the internet
Switch = Layer 2, MAC addresses, connects devices on the same network — it's what your PC, printer, and server all plug into
The router IS the default gateway — when traffic needs to leave the local network, it goes to the router first
Switches use a MAC address table (CAM table) to forward frames only to the correct port — far more efficient than a hub
Hub = Layer 1, sends to all ports (dumb). Switch = Layer 2, sends only to destination (smart). Hubs are obsolete but still appear on the A+ exam.
Routers separate broadcast domains — switches do not (unless VLANs are configured)
In most networks, both devices work together: switch handles local traffic, router handles internet traffic

Related Articles

Preparing for the A+ exam?

See the books and practice exams that make the most difference.

See Best Study Resources →