Networking Devices: From Hubs and Switches to Routers and Modems
A network is built from a small number of device types, and once you know what each does, diagrams and product names stop being confusing. The catch is that the box on your shelf at home is several of them in one: your “router” is really a router, a switch, a wireless access point, a firewall and a DHCP server in a single case. This guide explains each device, at which layer it works, and how they fit together, from the old hub to the modern switch and router.
The devices at a glance
| Device | Works with | What it does |
|---|---|---|
| Hub | Bits (layer 1) | Repeats every signal to all its ports |
| Switch | MAC addresses (layer 2) | Forwards frames to the port of the destination device, once it has learned where it is |
| Router | IP addresses (layer 3) | Connects different networks and forwards packets between them |
| Modem | Signals on the line | Terminates a cable or DSL line (fibre uses an ONT instead) |
| Wireless access point | Wi-Fi and Ethernet (layer 2) | Connects wireless devices to the wired network |
| Repeater / extender | Signals (layer 1; extenders also layer 2) | Rebroadcasts a signal to extend its range |
| Bridge | MAC addresses (layer 2) | Joins two network segments |
| Firewall | Traffic rules (layers 3 to 7) | Allows or blocks traffic according to policy |
| Network interface card (NIC) | Signals and MAC addresses (layers 1 and 2) | Connects a computer to the network |
The “layers” refer to the OSI model, explained in OSI and TCP/IP: a beginner’s guide.
Hub
A hub is the simplest device: whatever arrives on one port is copied out of all the others. Every connected device sees every frame, which wastes bandwidth and causes collisions when two devices talk at once, and it is a security weakness because anyone on the hub can listen in. Hubs have been replaced by switches and you are unlikely to buy one today.
Switch
A switch does what a hub does but intelligently. It learns which MAC address is on which port and builds a table, then forwards frames for known destinations only to the port where the destination lives (broadcasts and frames for not-yet-learned destinations are still sent out of all ports in the same VLAN). That cuts collisions, gives each port its own bandwidth and improves privacy. Switches are the core of almost every wired local network. Some, called layer 3 switches, can also route between VLANs and subnets. Managed switches add features such as VLANs, port security and monitoring.
Router
A router connects separate networks and decides where each packet goes next, based on its destination IP address and a routing table. Your home router connects your local network (private addresses) to your provider’s network (a public address), and, on IPv4, performs NAT so that all your devices share that single public address (IPv6 normally uses routed addresses without NAT). In larger networks routers use protocols such as OSPF and BGP to learn routes automatically; see what is a core router. Routers commonly include firewall features and run a DHCP server that assigns addresses.
Modem
A modem (modulator-demodulator) translates between the signals on your provider’s line and the digital data your router understands. For cable broadband it uses the DOCSIS standard, for DSL it works over telephone wires. Fibre connections usually terminate on a different box called an ONT (optical network terminal) rather than a modem, although people often still call it one. Many providers supply a combined modem and router in one unit, which is why the two are often confused.
Wireless access point
An access point (AP) links Wi-Fi devices to a wired network. Your home router has one built in. In an office, several access points spread through the building, connected by cable to switches, give better coverage than one powerful router, and devices roam between them.
Repeater or extender
A repeater receives a signal and retransmits it to extend its range. Wireless extenders are convenient but often halve the available speed because they use the same radio to talk to both your device and the router. Where you can, a cabled access point or a mesh system with a dedicated link back to the router performs much better.
Bridge
A bridge joins two network segments at layer 2 and forwards frames between them based on MAC addresses. A modern switch is essentially a bridge with many ports, so standalone bridges are rare. The term still appears in wireless bridging and in virtual machine networking.
Gateway and firewall
“Gateway” is a general word for a device that connects networks, often ones that use different protocols. The default gateway in your network settings is the router that leads out of your local network. A firewall inspects traffic and allows or blocks it according to rules, and may be a dedicated appliance, part of a router, or software on the machine. It is a separate idea from routing, though the two often share a box.
Network interface card (NIC)
The NIC is the hardware in a computer, phone or server that connects it to the network, either an Ethernet port or a Wi-Fi adapter. Physical adapters normally have a MAC address assigned by the manufacturer, which some systems can override or randomise. On a virtual machine, the NIC is a virtual one presented by the hypervisor.
How they fit together at home
A typical home has a line from the provider into a modem or ONT, then a router with a built-in switch and access point. Wired devices plug into the router’s ports, phones and laptops join its Wi-Fi, and larger homes add a mesh node or a cabled access point. In a business, the same pieces are separate: a firewall or router at the edge, switches for the wired network, and access points for Wi-Fi. If you are building a lab, setting up a Linux lab is a good way to try these ideas with virtual networks.
Common questions
What is the difference between a switch and a router?
A switch connects devices within one network using MAC addresses. A router connects different networks using IP addresses. A home “router” contains both.
Do I need a modem if I have a router?
It depends on the service. Cable and DSL need a modem, fibre uses an ONT, and if your provider hands you an Ethernet cable you can plug a router straight in. Many provider boxes already include this. The modem or ONT connects to the provider’s line; the router builds your local network.
Are hubs still used?
Almost never. Switches replaced them because they are faster, more private and usually cost about the same.
