Router vs Switch
A router sits between networks — typically your home or office and the internet — and decides where each packet goes next. A switch connects multiple devices inside one network so they can talk to each other directly. Many home gateway boxes do both jobs and call themselves "routers" colloquially, which makes the words easy to confuse.
Last reviewed on 2026-04-27.
Quick Comparison
| Aspect | Router | Switch |
|---|---|---|
| Job | Connect different networks | Connect devices within one network |
| OSI layer | Layer 3 (Network — uses IP addresses) | Layer 2 (Data link — uses MAC addresses) |
| Forwarding decision based on | IP address | MAC address |
| Number of networks | Two or more | One |
| NAT and firewall | Yes (typical for home/office routers) | No (a plain switch does not firewall) |
| Where it sits | At the edge of a network | Inside the network, often near devices |
| Home setup | The box that plugs into the modem | Built into the router; or extra rack/desktop switches for more ports |
Key Differences
1. Different jobs at different layers
A router works at Layer 3. It reads the destination IP address on each packet and decides which network to forward it to. That decision can include rewriting source addresses (NAT), applying firewall rules, and choosing routes.
A switch works at Layer 2. It reads MAC addresses (the hardware addresses on each network card) and forwards frames to the specific port the destination MAC is on. It doesn't care about IPs at all.
2. How traffic flows
Router: traffic from your laptop to a website passes through it on the way out, gets translated to the public IP, and the response comes back through it on the way in.
Switch: traffic from your laptop to your printer (both on the same network) goes through the switch — directly, without bothering the router.
3. Many devices, one or many networks
Routers connect different networks. The most familiar example is your home network plus the internet, but routers also link branch offices, separate VLANs, or VPN endpoints.
Switches are about expanding one network. Need eight more wired ports? Add a switch. The switch doesn't introduce a new network — it spreads the same one across more cables.
4. Security
Routers in homes and offices typically include firewall, NAT, and sometimes content filtering. The router is the natural enforcement point because it's where networks meet.
Switches by default forward everything inside their network without filtering. Managed switches add VLANs and access control, but a plain switch is a transparent fabric.
5. Inside a typical home box
The thing your ISP gives you usually combines a modem, a router, a switch (the wired ports), and a Wi-Fi access point.
In larger setups those parts are separate boxes: a router from one vendor, a switch (or several) from another, access points where Wi-Fi is needed. The conceptual roles stay the same.
6. Performance characteristics
Router performance is usually limited by the WAN link (your internet speed) — the router rarely runs full-bandwidth.
Switch performance is usually about full line rate per port. Modern gigabit switches forward at line speed without breaking a sweat.
When to Choose Each
Choose Router if:
- Connecting your home or office to the internet.
- Linking multiple separate networks (branch offices, VLANs, VPNs).
- Implementing NAT, firewall, and access control at the network edge.
- Routing between subnets in a larger network.
Choose Switch if:
- Adding more wired ports to one existing network.
- Connecting many devices that need to talk to each other (servers in a rack, lab equipment).
- Building the internal fabric of an office network.
- Anywhere the wire-speed forwarding of a switch is what you need.
Worked example
In a typical home, one box does most of it: the modem function connects to the ISP, the router function connects the home network to the internet, and a small built-in switch (the four Ethernet ports on the back) connects wired devices to each other. In a small office, the same logical boxes might be separate: a dedicated router at the WAN edge, a 24-port switch in the cabinet, and one or more access points for Wi-Fi. The roles are the same; the boxes are split.
Common Mistakes
- "My home router is a switch." It includes a switch (the LAN ports) but it's also a router and an access point.
- "Switches make networks faster." They prevent contention compared to old hubs, but on a modern network the switch is rarely the bottleneck.
- "All switches are the same." Unmanaged switches forward everything; managed switches support VLANs, QoS, and monitoring — different price points and capabilities.