AiTechWorlds
AiTechWorlds
University learning companion
Computer Networks · Network Devices: Hubs, Switches, Routers Explained
A student can open some websites but cannot join a video call. Follow the request through the network layers, name the evidence you would inspect at each boundary, and avoid blaming the whole network before locating the failing step.
Use this course-level map to place “Network Devices: Hubs, Switches, Routers Explained” in the larger system. It complements—not replaces—a topic-specific worked diagram.
Think of building a computer network like designing a city's transportation infrastructure. You need roads (cables and wireless signals), intersections (hubs), smart traffic lights (switches), and GPS guided highway routing systems (routers). Each device plays a distinct role, and putting the wrong device in the wrong place causes traffic jams or worse, complete gridlock.
The city analogy breaks down if you try to use an intersection where you need a GPS. That is exactly what happens when network engineers use a hub where they need a router. Understanding what each device does and why it does it that way is the foundation of network design.
Early networks used simple shared cables. Every device listened to every message. As networks grew, this became chaotic like a party where everyone shouts at once and nobody can hear anything. Each network device was invented to solve a specific problem with this chaos:
A hub is the simplest network device. When it receives a signal on one port, it broadcasts that exact signal out of every other port. Every device on the network receives every message, whether it was intended for them or not.
[PC-A] receives ALL traffic
|
[PC-B]--[HUB]--[PC-C] receives ALL traffic
|
[PC-D] receives ALL trafficProblems with hubs:
Hubs operate at OSI Layer 1 (Physical). They have no intelligence they simply amplify and repeat electrical signals. Hubs are obsolete in modern networks. You will only find them in legacy installations or museum collections.
A switch solves the hub's problems through intelligence. When a switch receives a frame, it reads the MAC address (a hardware address burned into every network card) and only forwards the frame to the specific port connected to the destination device.
[PC-A] --------+
[PC-B] --------| SWITCH |-------- [PC-C]
[PC-D] --------+ (learns: PC-A is on port 1,
PC-B on port 2, etc.)How a switch learns MAC addresses:
Advantages over hubs:
Switches operate at OSI Layer 2 (Data Link). They use MAC addresses, not IP addresses. A switch has no concept of different networks it only knows who is on its local network.
A router connects different networks together and finds the best path between them. While a switch asks "which port on this local network?", a router asks "which network do I send this to, and what is the best path there?"
[Home Network] [Internet]
192.168.1.x Public IPs
| |
[PC/Phone]----[ROUTER]----[ISP Router]----[Google Server]
|
Routing Table:
Destination | Next Hop | Interface
0.0.0.0/0 | ISP-GW | WAN port
192.168.1.0 | local | LAN portRouters operate at OSI Layer 3 (Network). They use IP addresses, not MAC addresses. Every home broadband device called a "router" is actually a router + switch + wireless access point combined into one box.
Key router responsibilities:
A firewall inspects network traffic and allows or blocks it based on a set of rules. Think of it as a border checkpoint: some vehicles pass through, others are turned back, and suspicious ones are detained.
[Internal Network]----[FIREWALL]----[Internet]
|
Rules Engine:
ALLOW port 443 (HTTPS) inbound
ALLOW port 80 (HTTP) inbound
BLOCK port 23 (Telnet) inbound
DENY all other inbound trafficFirewalls operate at Layer 3 through Layer 7, depending on type:
A modem (modulator demodulator) converts digital signals from your computer into a format that can travel over a specific physical medium and back again.
Your home "router" is usually a modem + router combo provided by your ISP. The modem handles the ISP connection; the router handles your home network.
A wireless access point creates a Wi Fi network, allowing wireless devices to connect to a wired network. In your home, the Wi Fi built into your router is an access point.
In large buildings, multiple access points are deployed and managed centrally. When you walk from one end of an airport to the other while on Wi Fi, your phone seamlessly transitions between access points this is called roaming.
| Device | OSI Layer | Address Used | Intelligent? | Creates Collision Domains? | Primary Use Case |
|---|---|---|---|---|---|
| Hub | Layer 1 | None | No | No (all one domain) | Legacy/obsolete |
| Switch | Layer 2 | MAC Address | Yes | Yes (one per port) | LAN connectivity |
| Router | Layer 3 | IP Address | Yes | Yes | Connecting networks |
| Firewall | Layer 3–7 | IP/Port/Content | Yes | Yes | Security enforcement |
| Modem | Layer 1–2 | N/A | Minimal | N/A | ISP connection |
| Access Point | Layer 1–2 | MAC Address | Partial | No | Wireless connectivity |
This is one of the most common points of confusion:
Switch: "I know everyone at this party (local network). You want to talk to PC B? Let me walk your message directly to their table."
Router: "You want to reach someone in another city? Let me check my map (routing table) and figure out which highway (interface) gets you closest to your destination."
A switch never thinks about IP addresses. A router never stores MAC addresses in its routing table. They solve fundamentally different problems at fundamentally different layers.
When you type google.com in your browser, your request travels through a switch (to get to your router on the local network), then through multiple routers (to traverse the internet), then through switches again (inside Google's data center to reach the right server). Every hop matters.
University learning companion
Computer Networks · Network Devices: Hubs, Switches, Routers Explained
Complete the steps without looking at the answer first; record evidence rather than only a final result.
These are primary or established learning references for this subject. Check the relevant chapter or specification for the exact topic and version.
Get this course's notes on Telegram!
Free cheat sheets, summaries & practice exercises