Wi-Fi & home network

Hub vs Switch vs Router: What Each One Does and When to Use It

Hubs, switches and routers look similar, but they do very different jobs. Here is how each one works, when to use it, and what to buy for a home or small office.

Cysoro Security TeamPublished · 9 min read
SWITCHPCPCTVNAS WI-FI & HOME NETWORK Hub vs switch Pick the right box for your network.
Quick answer

A hub copies every packet it receives to every connected device, a switch learns which device is on each port and sends each packet only to that device, and a router moves traffic between networks, such as between your home network and the internet, while handing out local IP addresses and providing a firewall.

Key takeaways

  • A hub repeats traffic to every port, which is slow and insecure, so modern networks no longer use hubs.
  • A switch connects devices inside one local network and sends each packet only to its destination.
  • A router connects your local network to the internet, assigns IP addresses, and is the device that needs the strongest security.

If you have ever looked behind a desk and seen a small box with blinking lights and a row of Ethernet ports, you have probably seen a hub, a switch or a router. They look alike, but they do very different jobs, and buying the wrong one leaves you with slow speeds, no internet, or a network that is easy to snoop on.

What is the difference between a hub, a switch and a router?

A hub copies every packet to every device, a switch sends each packet only to the device it is addressed to, and a router moves traffic between different networks, such as your home network and the internet. That one sentence covers the core difference, and the rest of this guide fills in when each device matters.

Think of a hub as a person shouting a message in a crowded room, a switch as a receptionist who hands a letter to the right office, and a router as the post office that decides which town a letter should go to. Each step is smarter than the last, and each one works at a different layer of the network.

What each device does1Hubcopies every packetto every port2Switchsends each packetonly to its port3Routermoves traffic betweennetworks, e.g. to the internetIllustration by Cysoro.
Hub, switch and router at a glance: who gets the packet, and where it goes next. Illustration by Cysoro.

What is a hub?

A hub is the simplest network device. When a packet arrives on one port, the hub copies it out of every other port, so every connected device receives it, even if the packet was meant for only one of them. Hubs work at the physical layer and do not read addresses.

That simplicity causes three problems. First, only one device can talk at a time without collisions, so the network slows down as you add devices. Second, every device sees traffic meant for others, which is a privacy and security problem. Third, a hub cannot learn or filter anything, so it wastes bandwidth on every port.

Hubs were common in the 1990s, when Ethernet networks were small and switches were expensive. Today they are almost never sold for home or office use. Networking Signal's comparison describes switches as the standard way to connect devices in a local network.

A cheap unmanaged switch costs about the same and does the job far better. If you find a hub in a cupboard, treat it as a piece of history, not as a part of your network.

What is a switch?

A switch connects devices inside one local network, such as the PCs, printers, game consoles and smart TVs in your home or office. It learns the MAC address of the device on each port and builds a table, so it can forward each packet only to the port where its destination lives.

Because traffic goes only where it is needed, many devices can talk at once without colliding. A switch also gives each port its own full bandwidth, so a gigabit switch can carry a gigabit to several ports at the same time, up to its total switching capacity. That is why a switch feels fast even with many wired devices.

Switches come in two main kinds. An unmanaged switch is plug-and-play: you connect the cables and it works, with no settings to change. A managed switch lets you create VLANs, set port speeds, prioritise traffic and monitor the network, which matters in offices and larger homes. For most homes, an unmanaged gigabit switch is enough.

You can learn more about keeping the wireless side of your network safe in our guide to how to secure your Wi-Fi.

What is a router?

A router connects two or more networks together. In a home, it connects your local network to your internet provider, and it decides where each packet should go next. It reads IP addresses, not just MAC addresses, and it keeps a routing table of the networks it can reach.

Your router also does several jobs a switch cannot. It uses NAT, network address translation, so many devices can share one public IP address. Pearson's networking guide explains how a router directs traffic between networks using IP addresses.

It runs a DHCP server, which hands out private IP addresses to your devices. It usually provides Wi-Fi, and it acts as a basic firewall, blocking unsolicited traffic from the internet.

That makes the router the most important device to secure. Change the default admin password, keep its firmware updated, and use a strong Wi-Fi password. If an attacker controls your router, they can redirect your traffic, see which sites you visit, and push fake updates to your devices.

Hub vs switch: what is the real difference?

The real difference is intelligence. A hub repeats everything to everyone, while a switch learns addresses and forwards each packet only to its destination. Both connect devices in one local network, but a switch does it faster, more privately and with far less wasted bandwidth.

Here is the comparison in one place:

FeatureHubSwitchRouter
Main jobRepeat traffic to all portsForward traffic to the right portMove traffic between networks
Address usedNoneMAC addressIP address
Traffic seen byEvery deviceOnly the destinationOnly the next network
SpeedShared, slow with many devicesFull speed per portDepends on WAN and CPU
SecurityPoor: all traffic is visibleBetter: traffic is directedFirewall, NAT and Wi-Fi security
Creates Wi-FiNoNoUsually yes
Assigns IP addressesNoNoYes, with DHCP
Still worth buyingNoYes, to add portsYes, every network needs one

If you are choosing between a hub and a switch, the answer is always the switch. There is no modern home or office job where a hub beats a switch on speed, security or price.

Switch vs router: which one do you need?

You need a router first, and a switch only when you need more wired ports. The router connects you to the internet, gives your devices IP addresses, and protects the network. The switch simply gives you more places to plug in cables inside that network.

A typical home router has four wired LAN ports. If you want to wire a PC, a printer, a game console, a TV and a network drive, you are already short of ports. Plug an 8-port switch into one router port, then plug the extra devices into the switch. That is the standard setup, and it works with any brand.

A switch cannot replace a router, and a router cannot easily replace a large switch. Some routers have eight ports, but a dedicated switch is cheaper per port and often faster. If you run a small business, the same rule applies, and you should also look at a business router with VPN for remote access.

How do a hub, a switch and a router work together?

In a modern network, the router sits at the edge, the switch sits in the middle, and the hub does not sit anywhere. The internet cable goes into the modem, the modem connects to the router, the router connects to the switch, and the switch connects to your wired devices. Wi-Fi devices connect straight to the router.

When your laptop asks for a website, the packet goes to the switch, which forwards it to the router, which sends it out to the internet. The reply comes back to the router, which uses NAT to work out which device asked for it, and the switch delivers it to that device only. Each box does one job, and the packet passes through them in order.

That chain also explains why the router is a single point of failure. If the router goes down, the whole network loses internet, even though devices can still talk to each other through the switch. Keep a spare router or a note of your provider settings if your business depends on staying online.

Which one should you buy for your home or small office?

Buy a router first, then add a switch if you need more ports. Choose a router with the Wi-Fi standard your devices support, enough wired ports for your main devices, and a maker that still releases firmware updates. A router that no longer gets updates is a security risk, however fast it once was.

When you buy a switch, match its speed to your needs. A gigabit switch suits most homes. If you move large files to a NAS or edit video over the network, consider a switch with one or two 2.5 gigabit ports for the PC and the NAS. Check that the switch is fanless if it will sit in a living room, since some larger switches are noisy.

Quick check before you buy a network box✓Count your wired devicesAdd one port for each PC, console, TV and printer, plus two spare ports.✓Check the speed you needA gigabit switch suits most homes; a 2.5 gigabit port helps a fast NAS or PC.✓Decide where Wi-Fi comes fromA router usually provides Wi-Fi; a switch and a hub do not create a wireless network.✓Keep the router as the gatewayOnly the router should hand out addresses and connect your home to the internet.
Four checks before you buy a hub, switch or router. Illustration by Cysoro.

Do not buy a hub. If a listing calls a device a hub, check what it really is: many sellers use the word loosely for a USB hub or a smart-home hub, which are different products. A network hub, in the Ethernet sense, has no place in a new setup.

What mistakes do people make with hubs, switches and routers?

The most common mistake is plugging the internet cable into a switch instead of the router. The switch has no way to share one public IP address, so only one device gets online, or none does. Always connect the modem to the router first, then the switch to the router.

Another mistake is using a very old router as a switch. It can work if you turn off its DHCP server and use only its LAN ports, but it is easy to get wrong, and an old router may still broadcast an open Wi-Fi network. A new unmanaged switch is cheaper than the time you will spend fixing a misconfigured old router.

People also forget that a switch does not add security. It directs traffic, but it does not block attacks from the internet or inspect what your devices send. That protection comes from the router firewall, from keeping firmware updated, and from the security settings on each device. For a broader starting point, see our small business cybersecurity checklist.

How do you secure a hub, a switch and a router?

Secure the router first, because it is the gateway to the internet. Change the admin password from the default, turn on automatic firmware updates if your router offers them, and set a strong, unique Wi-Fi password with WPA3 or WPA2. Turn off remote management unless you really need it.

For a managed switch, change its default password too, and turn off any unused ports in an office. An unused live port in a reception area is an open door: anyone can plug in a laptop and join the network. In a home, that matters less, but it is still good practice to know which ports are in use.

Finally, check what your network actually exposes. You can see your public address with our free what is my IP tool.

Check your DNS settings with the DNS lookup tool. If you find a service you do not recognise, turn it off at the router.

The bottom line

A hub repeats, a switch directs, and a router connects networks. For almost everyone, the right setup is a good router plus a switch when you need more wired ports, and no hub at all.

Start with the router, keep its firmware updated, and add a gigabit switch when you run out of ports. You can check your connection and DNS in seconds with the free what is my IP tool.

Frequently asked questions

What is the difference between a hub and a switch?

A hub sends every packet it receives out of every port, so every device sees traffic meant for others. A switch learns the MAC address on each port and forwards each packet only to the port of its destination device, which is faster and more private.

Do I need a hub, a switch, or a router at home?

Most homes need a router, which connects you to the internet and creates your Wi-Fi network. Add a switch only when you run out of wired ports on the router. You almost never need a hub in a modern home.

Can a switch replace a router?

No. A switch connects devices inside one local network, but it does not connect that network to the internet, assign IP addresses, or provide NAT and firewall protection. A router does all of those jobs.

Is a hub still used anywhere?

Hubs are rarely sold or used today because switches cost about the same and perform far better. You may still see a hub in a lab or a museum of old equipment, or used briefly to capture network traffic for testing.

What is the difference between a modem and a router?

A modem converts the signal from your internet provider, such as cable or fibre, into a signal your network can use. A router then shares that connection with your devices, wired and wireless. Many providers now supply a combined modem-router unit.

Does a switch improve Wi-Fi speed?

No. A switch only affects wired connections. If your Wi-Fi is slow, the problem is usually the router position, interference, the Wi-Fi standard, or your internet plan, not a lack of a switch.

How many ports should a home switch have?

Count every device you want to wire up, then add two spare ports. A 5-port switch suits a small setup, while an 8-port switch is a safer choice for a home office with a PC, printer, console and TV.

Which device should I secure first?

Secure the router first. Change its admin password, update its firmware, and use a strong Wi-Fi password with WPA3 or WPA2. Anyone who controls the router can see and redirect traffic for the whole network.

Sources

  1. Networking Signal — Hub vs Switch vs Router: Key Differences Explained
  2. Pearson — Network Devices, Components, and Applications (CCENT)
  3. Classic DBA — Hub, Bridge, Switch and Router: What Each Device Does
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against Networking Signal's hub, switch and router comparison and Pearson's CCENT networking guide; definitions match the standard OSI-layer descriptions.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free