Please enable JavaScript to use CodeHS

Networking and IT

Wi-Fi and hardware

Networks are not just invisible signals. They are built from physical and wireless hardware. Understanding routers, switches, modems, and Wi-Fi helps you troubleshoot your own connection and appreciate how data really moves.

Hardware ~10 min Middle / High School
The Big Idea

Modem, router, switch

Three common pieces of networking hardware are the modem, router, and switch.

  • Modem: connects your home or school to the internet service provider, or ISP. It modulates and demodulates signals so they can travel over phone, cable, or fiber lines.
  • Router: directs traffic between your local network and the internet. It also assigns local IP addresses and often provides Wi-Fi.
  • Switch: connects many wired devices on the same local network so they can talk to each other quickly.

Many home devices combine the modem and router into one box. Large networks use separate, more powerful equipment.


How It Works

How Wi-Fi works

Wi-Fi lets devices connect to a network using radio waves instead of cables. A wireless access point, often built into a router, broadcasts a signal. Devices tune into that signal and exchange data.

Wi-Fi uses different frequency bands, mainly 2.4 GHz and 5 GHz. The 2.4 GHz band travels farther and through walls better, but it is slower and more crowded. The 5 GHz band is faster but has a shorter range. Newer Wi-Fi standards add faster speeds and better handling of many devices.

Tip: if your Wi-Fi is slow, try moving closer to the router, reducing the number of connected devices, or switching to a less crowded channel.


Vocabulary

Bandwidth and latency

Two important network measurements are bandwidth and latency.

  • Bandwidth is how much data can travel at once, like the width of a highway. It is measured in bits per second, often megabits per second (Mbps).
  • Latency is how long a single packet takes to travel, like the time for one car to make the trip. It is measured in milliseconds (ms).

A video call needs low latency so the conversation feels natural. Downloading a large file needs high bandwidth so it finishes quickly.


Interactive

Speed simulator

Click the buttons to simulate different network conditions. Notice how bandwidth and latency affect the experience.

Bandwidth
50 Mbps
Latency
20 ms

Choose a network to see how it feels.


Code

Network layers in code

Networks send data in layers, with each layer adding a header. This Python example wraps and unwraps a message the same way.


Your Turn

Check yourself

Your online game is lagging. Is that more likely a bandwidth problem or a latency problem? Explain.

Your answer:

Sample answer: Lag is usually a latency problem. Latency is the delay before data arrives. High latency makes real-time games feel unresponsive even if the bandwidth is high.


Check Yourself

Quick quiz

1. What does a router do?

2. What does latency measure?

3. Which band usually travels farther through walls?

Keep learning

You know the hardware. Next, learn how IT professionals troubleshoot network problems.

Part of the Networking and IT series.