Router vs Switch vs Hub: What's the Difference?

A router connects you to the internet. A switch adds more wired ports. A hub is obsolete. Here's when you need each and how they work together.

Quick comparison

DeviceMain jobWorks at layerHas internet connectionStill relevant?
RouterConnect your home network to the internet; assign private IP addresses (DHCP); act as firewallLayer 3 (IP)Yes — it's the gatewayYes — essential
Network SwitchConnect multiple wired devices together; forward traffic only to the correct portLayer 2 (MAC)No — connects to routerYes — when you need more Ethernet ports
HubConnect multiple wired devices; broadcast every packet to all portsLayer 1 (physical)NoNo — obsolete since ~2005

What a router does

A router connects two or more networks — most commonly your home network (private IPs: 192.168.x.x) and the internet (public IPs). It:

  • Gets a public IP from your ISP and shares it with all devices in your home via NAT
  • Assigns private IP addresses to your devices via DHCP
  • Acts as a firewall, blocking unsolicited inbound traffic from the internet
  • Routes traffic between devices on your network and to the internet
  • Usually includes a built-in WiFi radio and a 4-port Ethernet switch

Every home with internet access has a router (or a modem/router combo gateway from their ISP).

What a network switch does

A switch connects multiple wired (Ethernet) devices within the same network. Unlike a hub, a switch learns which device is connected to which port and sends traffic only to the correct destination — not to all ports. This makes switches far more efficient than hubs.

When do you need a switch?

  • Your router only has 4 Ethernet ports and you have more wired devices (desktop PC, NAS, smart TV, game console, etc.)
  • You want to add wired connections to a room far from the router — run a single Ethernet cable to that room and plug in a switch there
  • You're building a home office with multiple wired workstations

A typical home setup: router → 8-port switch → multiple wired devices. The switch adds ports without adding complexity.

What a hub does (and why they're obsolete)

A hub is an older device that connects multiple Ethernet devices but broadcasts every incoming packet to every port — even ports that don't need the data. Every device on a hub receives every packet and must check the destination address to decide if it applies. This wastes bandwidth and creates collisions.

Switches replaced hubs completely by the early 2000s. If someone offers you a hub for free, decline — switches are inexpensive ($15–20 for an 8-port gigabit switch) and deliver far better performance.

Do you need a separate switch?

Most home routers include a 4-port gigabit switch built in. If you have fewer than 4 wired devices, you don't need a separate switch. If you need more wired ports, an unmanaged gigabit switch ($15–40 for 8 ports) is a simple, plug-and-play addition with no configuration required.

For most home users: router only. For home offices or media rooms with multiple wired devices: router + switch.

Managed vs unmanaged switches

  • Unmanaged switch: Plug and play. No configuration. Every port runs at the same priority. Correct for home use. Cost: $15–50.
  • Managed switch: Configurable VLANs, QoS, port monitoring, SNMP. Used in businesses and advanced home labs. Unnecessary for typical home use. Cost: $60–500+.

Related Guides

More From This Section