
Router vs Switch: One Connects Networks, the Other Connects Devices
A switch connects devices on one network by their MAC addresses. A router connects networks by their IP addresses, and the box sold as a home router contains both, plus a Wi-Fi radio and a firewall. Here is what each does, what managed switches, VLANs and PoE add, and when a cheap switch fixes a port shortage.
Tech Talk News Editorial
9 min read
Key takeaways
- A switch forwards data between devices on one network using MAC addresses, and a router forwards data between networks using IP addresses; the box sold as a home router is usually a router, a switch, a Wi-Fi access point and a firewall in one case.
- A switch adds Ethernet ports but no internet speed: your plan speed is set by the connection into the router, and every device on an added switch shares the one cable back to that router.
- Routers hide private addresses from the RFC 1918 blocks (10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16) behind one public address using NAT, which RFC 3022 defines.
- Devices in different VLANs need a routing device to talk to each other, according to Cisco, which is the job a layer-3 switch does inside one chassis.
- Power over Ethernet (PoE) delivers 15.4 W per port under IEEE 802.3af (2003), 30 W under 802.3at (2009), and 60 W or 90 W under 802.3bt (2018), so match the switch to the camera or access point before you buy.
On this page10 sections
Router vs switch is a question that only exists because of one box. The thing your provider calls a router has a switch inside it, and so does the one you bought at the store. Open the case and you would find both, plus a Wi-Fi radio and a firewall.
So when someone says they have run out of router ports, they have run out of switch ports. Fixing that is cheap, and it is also the one case where people expect a switch to do something it can't.
A switch connects devices, a router connects networks
A switch connects devices on one network and forwards data between them using MAC addresses, the hardware addresses built into network adapters. A router connects separate networks, like your home and the internet, and forwards data using IP addresses. A switch adds ports. A router is what makes those ports reach anywhere else.
Cisco, which sells both, puts the split in business terms. A switch links computers, printers and servers so they can share information. “Ultimately, a router works as a dispatcher, directing traffic and choosing the most efficient route.”[1] Note the verbs. A switch connects, and a router decides.
A packet's path
The switch delivers inside your network. The router takes over at the edge.
Where the data starts
- Laptop asks for a web pageThe destination is an IP address on the internet, so the frame is addressed to the router
- Phone streams from a media serverThe destination is a device in the same house, so the frame is addressed to that device
Switch, then router
The switch reads the MAC address and picks a port. The router reads the IP address, checks its routing table and rewrites the source with NAT.
Where it ends up
- Out the router's internet portYour private address is swapped for your one public address
- Reply returns the same wayThe router remembers who asked and hands the answer to the right device
The switch handles everything local. Only traffic that leaves the building goes through the router.
That excluded row is the part the top results skip, and it matters later. A switch is not a router's little brother. It is the reason local traffic never has to bother the router at all.
A switch learns where everyone is by listening
Data on a local network travels in frames, and every frame carries the MAC address of the sender and of the receiver. A switch keeps a MAC table, a list of which address sits behind which port.
Nobody has to fill it in. Juniper describes MAC learning as “the process of obtaining the MAC addresses of all the nodes on a network,” and the address is learned at the port where the frame arrived.[2]
When a frame arrives for an address the switch has already seen, it sends the frame out of that one port. When the address is unknown, the switch has to send the frame everywhere in the VLAN, which is called flooding.
Juniper's page shows the cost of not learning: with learning disabled, packets for those addresses “are flooded into the VLAN.”[2]
That is why a switch beats the old hub it replaced. A hub repeated every frame to every port. A switch that has listened for a while sends each frame only where it needs to go.
A router reads IP addresses, and hides your devices behind one
A router works one layer up. It ignores MAC addresses except to find the next hop, and it makes its decision from the IP address in the packet and a routing table, a list of which network is reachable through which connection.
On a home network the table is short: everything local stays local, and everything else goes to your provider.
Two more jobs come with the router role, and a switch does neither. The first is DHCP, which hands every device an address when it joins and usually tells it which DNS server to use. That lookup service has its own write-up in our explainer on DNS. The second job is NAT, network address translation.
RFC 1918 reserves three blocks for private networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.[3] Addresses in those blocks mean nothing on the open internet. RFC 3022 describes how a router maps many of them, along with their TCP and UDP port numbers, onto a single public address.[4] To the internet, your whole house looks like one device.
For the longer version of that story, including why two routers in a row cause trouble, read modem vs router. The short form is that a second router creates a second layer of NAT. A second switch creates nothing of the kind, because a switch has no addresses to translate.
The box you call a router is four devices in one case
Here is my complaint about the product name. A consumer “router” does at least four jobs, and only one of them is routing. The Ethernet ports on the back are a small switch.
The antennas are a Wi-Fi access point, a device that bridges wireless clients onto the wired network. And the firewall decides what from the internet is allowed in.
The router part is the thin slice between the internet port and everything else. The rest is a switch, an access point and a firewall sharing a power cord. That is why a provider's gateway can be called a modem, a router, or neither, depending on who wrote the box copy.
“Your router already has a switch inside it. Buying a switch adds another one.”
| Question | Network switch | Router |
|---|---|---|
| What does it connect? | Devices on one network | One network to another, such as home to internet |
| Which address does it read? | MAC address, in each frame | IP address, in each packet |
| What does it remember? | A MAC table of which address is on which port | A routing table of which network is reachable where |
| Does it run DHCP and NAT? | No | Yes, on a home router |
| Does it add internet speed? | No, it adds ports | No, it shares what your provider delivers |
| Does it need setup? | Unmanaged: none. Managed: yes | A few minutes, once |
| Where is it in a home? | Inside the router, or a small box added behind it | Between the modem and everything else |
Managed switches add VLANs, and layer-3 switches add routing
Most switches sold for homes are unmanaged. You plug cables in and they work, with no settings to change. A managed switch has a settings page or a command line, and what it adds is control: which ports belong to which virtual LAN (VLAN), which ports carry power, and which traffic gets priority.
A VLAN splits one physical switch into separate networks. Cisco describes it as dividing devices into “distinct collision domains and Layer 3 (L3) subnets.”[6]
The standard behind it is IEEE 802.1Q, which specifies bridges that interconnect LANs “to provide Bridged Networks and VLANs.”[5] A common use is putting cameras and smart-home gadgets on one VLAN and your laptops on another.
Here is the catch. Devices in different VLANs can't reach each other without help. Cisco says plainly that “communication between devices in different VLANs necessitates a routing device.”[6]
A layer-3 switch keeps that routing in the same chassis. In Cisco's Catalyst example, each VLAN gets its own layer-3 address, which hosts use as their default gateway, and IP routing is switched on globally so the switch routes between them.[6]
My read, and it is a read, not a claim from Cisco: a layer-3 switch is a switch that borrowed the routing table, not a router that borrowed the ports.
In a typical network it still leaves the internet connection and NAT to a router or firewall at the edge. Unless you run VLANs at home, you will never buy one.
PoE lets the switch power the device, and the wattage is the catch
Power over Ethernet (PoE) is, in Cisco's words, “a technique for delivering DC power to devices over copper Ethernet cabling.”[11]
A PoE switch is the one switch feature that changes what you can mount where. An access point or a security camera on the ceiling needs one cable instead of two, and no outlet nearby.
The catch is that PoE comes in three generations. The power sourcing equipment (PSE), which is the switch, supplies one number. The powered device (PD), such as the camera, receives a smaller one, because cable loses some power on the way.
| Standard | Approved | Pairs used | Switch supplies | Device receives |
|---|---|---|---|---|
| IEEE 802.3af (PoE) | June 2003 | 2 | 15.4 W | 12.95 W |
| IEEE 802.3at (PoE+) | September 2009 | 2 | 30 W | 25.5 W |
| IEEE 802.3bt (PoE++) | September 27, 2018 | 4 | 60 W or 90 W | 51 W or 71 W |
The approval dates come from the IEEE 802.3 task force pages.[8,9,10] The power figures come from Cisco, which also notes the device-side values assume a 100-meter cable and that “the actual power available at the PD may be less because of losses in transmission.”[7]
Read the wattage before you buy. A ceiling camera that draws 15.4 W or less is fine on any generation. An access point that asks for 30 W won't get it from an 802.3af port.
And a PoE switch has a total budget as well as a per-port one, so eight ports rated at 30 W each don't mean the switch can supply 240 W at once. The spec sheet states the real total.
Do I need a switch? Only when you have run out of wired ports
Count the wired devices you own: desktop, console, TV, streaming box, printer, network-attached storage (NAS) drive, access point. If the number is higher than the free Ethernet ports on your router, a switch is the fix. Plug one cable from the router to the switch, and the switch's other ports work like the router's own.
A cheap unmanaged switch is the right buy here. It needs no setup, and the devices behind it get addresses from the router as if they were plugged in directly. If you're choosing cable too, our piece on what an Ethernet cable does covers what the cable itself limits.
A switch also helps in a second way, and this is the point I wish more guides made. When your desktop copies files to a NAS drive on the same switch, those frames never reach the router. The copy runs at the speed of the switch's ports, no matter how slow your internet plan is.
A switch won't make your internet faster
This is where expectations break. The speed your provider sells you arrives at the router's internet port. A switch sits behind it, so it can't add to that number, and no switch can make a slow plan fast. It adds places to plug in.
It also adds a shared link. Everything on the switch reaches the internet through the one cable back to the router, so three people streaming through one switch share that cable.
If your plan is faster than the port speed between the switch and the router, the switch becomes the limit, and the fix is to plug your busiest device into the router directly.
Heads up
Two more things a switch does not fix. Slow Wi-Fi is a radio problem, and extra wired ports don't touch it. That's the territory of extenders, boosters and mesh. And if wired speed is also low, the cause is upstream, in the router, the modem or the line.
One more trap is worth naming. If you want better range, a second router is the wrong box. You want a switch and an access point, or the second box set to access-point mode. A cable from a switch to a wireless access point extends the same network. A second router starts a new one.
Takeaway
Buy a switch for ports, for PoE, or for VLANs. Never buy one for speed. It lets you plug more things into the connection you already pay for, and that's the whole job.
Keep the router, add the switch
My rule is short. If the problem is too few wired ports, add an unmanaged switch. If you need to power cameras or access points from the closet, buy a PoE switch rated for the wattage in the table above.
And if you're splitting a home network into VLANs, buy a managed one and learn what an IP address range is first.
You will always keep the router. It's the only box in the house that knows where the rest of the internet is.
Primary sources
- 1.PrimaryCisco, "What is a switch vs a router?". A switch links computers, printers and servers; a router links switches and networks and directs traffic.
- 2.PrimaryJuniper Networks, "MAC Learning". How a switch learns source MAC addresses per port, and the flooding that follows when learning is off.
- 3.PrimaryIETF, RFC 1918, "Address Allocation for Private Internets". February 1996. The three private blocks: 10/8, 172.16/12 and 192.168/16.
- 4.PrimaryIETF, RFC 3022, "Traditional IP Network Address Translator". January 2001. Defines Basic NAT and NAPT, which maps many private addresses and ports onto one public address.
- 5.PrimaryIEEE 802.1, "802.1Q: Bridges and Bridged Networks". The standard specifies bridges that interconnect LANs to provide bridged networks and VLANs.
- 6.PrimaryCisco, "Configure Inter-VLAN Routing with Catalyst Switches". VLANs divide devices into L3 subnets, devices in different VLANs need a routing device, and Catalyst 3K/9K switches can route internally.
- 7.PrimaryCisco, "PoE for Industrial Automation" solution brief. PSE and PD power for 802.3af (15.4 W and 12.95 W), 802.3at (30 W and 25.5 W) and 802.3bt (60 W or 90 W, and 51 W or 71 W), assuming a 100-meter cable.
- 8.PrimaryIEEE 802.3af DTE Power via MDI Task Force. Work complete with the approval of IEEE Std 802.3af-2003 in June 2003.
- 9.PrimaryIEEE P802.3at DTE Power Enhancements Task Force. Work complete with the approval of IEEE Std 802.3at-2009 at the September 2009 Standards Board meeting.
- 10.PrimaryIEEE P802.3bt DTE Power via MDI over 4-Pair Task Force. IEEE Std 802.3bt-2018 approved by the IEEE-SA Standards Board on September 27, 2018.
- 11.PrimaryCisco, "What Is Power over Ethernet (PoE)?". PoE defined as a technique for delivering DC power to devices over copper Ethernet cabling.
Frequently asked questions
6 questions
What is the difference between a router and a switch?
A switch connects devices inside one network and forwards data between them using MAC addresses, while a router connects separate networks and forwards data using IP addresses. A switch adds ports to your network. A router is what lets that network reach the internet, hands out addresses with DHCP and translates them with NAT.
Do I need a switch if I already have a router?
Only if you have run out of wired ports on the router. Most home routers include a few Ethernet ports, and a switch plugged into one of them turns that single port into several. If everything you own connects over Wi-Fi, or your router has a free port for each wired device, a switch adds nothing.
Does a network switch make my internet faster?
No. A switch sits behind the router, so it cannot raise the speed your internet provider delivers. Every device on the switch shares one cable back to the router, and a switch can only help traffic that never leaves your network, such as copying files between a computer and a NAS (network-attached storage) drive.
Can a switch replace a router?
No. A plain switch does not hand out addresses with DHCP, does not translate them with NAT, and does not connect your private network to the internet. Without a router somewhere on the network, your devices can talk to each other through the switch but cannot reach anything outside it.
What is a PoE switch and how many watts does it supply?
A PoE (Power over Ethernet) switch sends power to a device over the same Ethernet cable that carries its data. IEEE 802.3af supplies 15.4 W per port, 802.3at supplies 30 W, and 802.3bt supplies 60 W or 90 W, and the device at the far end gets slightly less because the cable loses some power over a 100-meter run.
What is a layer-3 switch?
A layer-3 switch is a switch that can also route between VLANs, so it moves traffic by IP address as well as by MAC address. Cisco notes that devices in different VLANs need a routing device to communicate, and on Catalyst 3K and 9K switches that routing happens inside the switch itself.
Keep reading
Written by
Tech Talk News Editorial
Computer engineering background. Writes about software, AI, markets, and real estate, and the places where the three meet.
About Tech Talk News

