A switch connects devices inside one network and passes traffic between them, while a router connects separate networks to each other, such as your office network and the internet. In a business, the router role is usually filled by the firewall, and the switches supply the ports, power and network separation that computers, phones and access points plug into.
Put another way, the switch handles traffic that stays in the building and the router handles traffic that leaves it, or that crosses from one internal network to another. Most offices need both, even when a single box at home seemed to do everything.
What a switch does
A network switch is a box of Ethernet ports. Every device you plug into it joins the same local network, and the switch delivers traffic from one port to the right other port.
It does this using MAC addresses, the hardware addresses built into every network card. When a frame arrives, the switch notes which port the sender is on and stores it in a table. When a frame is addressed to a device it already knows, the switch sends it out of that one port only. When it does not yet know the destination, it sends the frame out of every port on that network until the reply teaches it where the device lives. Because switches work with frames and hardware addresses, they are called Layer 2 devices, after the second layer of the OSI networking model.
Business switches add more on top: Power over Ethernet for phones, cameras and access points, VLANs that split one switch into several separate networks, voice prioritization, and port statistics for troubleshooting. Those features are what separate a managed switch from a plug-and-play one, and our guide to managed vs unmanaged switches covers how to choose and how to size the power budget.
What a router does
A router joins networks that have different address ranges and decides where each packet should go next, using IP addresses and a routing table. For most offices the table is short: traffic for the local networks stays inside, and everything else follows a default route out to the carrier. Because routers work with IP addresses, they are called Layer 3 devices.
The router at the edge of a business network usually does several related jobs:
- Translates private internal addresses to your public address on the way out, known as NAT.
- Hands out internal addresses to devices with DHCP.
- Filters traffic with firewall rules, and terminates VPNs for remote staff and other offices.
- Routes between internal networks, such as the staff, phone and guest VLANs, applying rules to what may cross.
- Switches traffic to a backup circuit if the main one fails, when it has a second WAN port.
A router also marks a boundary for broadcast traffic. Broadcasts reach every device on a local network but stop at the router, which is one reason large flat networks get split into smaller ones.
That is why business routers are usually sold as firewalls, and why an SD-WAN appliance is also a router, one that chooses between several circuits. See our small business firewall guide for sizing one.
Router vs switch at a glance
| Switch | Router | |
|---|---|---|
| Main job | Connects devices within one network | Connects networks to each other and to the internet |
| Forwards by | MAC (hardware) address | IP address |
| OSI layer | Layer 2 (Layer 3 switches also route) | Layer 3 |
| Typical port count | 8 to 48 ports, often with PoE | A few, with one or more WAN ports |
| Hands out IP addresses | Usually no | Usually yes, through DHCP |
| NAT, VPN, firewall rules | No | Yes, on most business models |
| Connects to the carrier | No | Yes, through its WAN port |
| Where it sits | Network closets, sometimes under desks | At the edge, beside the carrier's equipment |
Following one web request through the office
A worked walk-through shows how the two divide the work. A staff member on Wi-Fi opens a website.
- The laptop sends the request over Wi-Fi to the nearest access point, which passes it onto the wired network.
- The switch the access point plugs into sees the request is addressed to the router's hardware address and forwards it out of the single port that leads toward the firewall.
- The firewall checks its rules, swaps the laptop's private address for the office's public address, and sends the packet out of its WAN port.
- The carrier's device, such as an ONT or a carrier router, carries it onto the carrier's network and out to the internet.
- The reply comes back to the firewall, which remembers the conversation, restores the laptop's private address and hands the reply to the switch, which delivers it to the right port.
If the same laptop prints to a printer on the same network, the switch handles the whole exchange and the router never sees it. If the printer is on a different VLAN, the traffic goes up to the router and back, and the router's rules decide whether it is allowed. The split between those two kinds of traffic is the same line explained on our LAN vs WAN page.
The home router is several devices in one
The box most people call a router at home combines a router, a small switch with four or so ports, a Wi-Fi access point, a basic firewall and a DHCP server. For a household that works well.
Businesses usually split those roles into separate devices because each one runs out of room at a different point. Four ports are not enough for a floor of desks. A single built-in radio cannot cover an office, so Wi-Fi moves to ceiling access points. Desk phones and cameras need PoE that consumer boxes do not supply. And security, VPNs and a backup circuit need a proper firewall. Separate devices can each be sized, replaced and managed on their own.
The same thinking applies to the carrier's equipment. A cable gateway that also routes can clash with a firewall placed behind it, so two devices are translating addresses. Our guide to carrier equipment vs your own router explains bridge mode and the other fixes.
What a Layer 3 switch is
A Layer 3 switch is a switch that can also route between VLANs inside the building, doing that work in hardware at full port speed. Larger networks use one at the core so traffic between departments does not have to travel to the firewall and back.
A Layer 3 switch typically does not replace the firewall. It usually lacks NAT for internet access, stateful firewall inspection, VPNs and the WAN features you need at the edge, and its access rules are simpler. Most small and mid-sized businesses route between VLANs at the firewall instead, where the rules are easier to read and log. Our guide to VLANs and network segmentation shows a typical layout.
How to tell which box is which in your closet
- The carrier device is the one the outside line enters: a fiber cable into an ONT, a coax cable into a modem, or a copper or fiber handoff from a network interface device. It usually carries the carrier's logo.
- The router or firewall plugs into the carrier device. It has a port labeled WAN or Internet, only a handful of other ports, and an admin login your IT provider should know.
- The switch is the box with a long row of numbered ports, often 24 or 48, with patch cables running to the patch panel. A PoE switch may be marked PoE and run warm, with fans.
- Access points are on the ceiling or walls, each fed by one cable from a switch.
- Anything else, such as a small desktop switch under a desk, should go on the network diagram too. Unmanaged switches in odd places are a common cause of loops and VLAN trouble.
What to check when you buy either one
- Router or firewall throughput. Check its rated speed with security features turned on, against your circuit speed. A firewall slower than the circuit caps what you can use.
- WAN ports. Two or more if you plan a backup circuit.
- Switch ports and power. Enough ports for today plus growth, a PoE budget that covers every powered device, and uplinks fast enough to connect switches to each other and to the firewall.
- Management. Decide who updates the firmware, keeps the configuration backed up and answers when something fails. A managed network service can take on all of it.
How FiberX helps
FiberX gets internet quotes from several carriers for your address and checks the details that meet your router: the handoff type and port speed, how static IPs are delivered, and whether a second circuit for failover or managed SD-WAN fits. The carrier pays us, so there is no markup. Request a quote, or call or text 478-758-8091.