Networking Devices

Hubs, Switches, Routers, Modems, and Firewalls

Understanding basic networking hardware can help you connect devices, share information, and keep your data secure. This section introduces the essential components you are most likely to encounter at home, in a campus lab, or in an office setting. Each device plays a different role in how networks operate and how they protect your information.

DeviceDescription
HubConnects computers and devices; broadcasts data to all ports.
SwitchLike a hub but smarter; sends data only to intended recipients.
RouterConnects different networks (e.g., LAN to Internet) using routing tables.
FirewallControls traffic based on security rules. Can be hardware or software.
Common network hardware devices
Router with ADSL line and Ethernet connections
Router showing ADSL and Ethernet connections


Hub vs. Switch

Ethernet started as a broadcast-only network. Each node on the network could see messages sent by all other nodes, either by being on a common wire or a network hub, a simple repeater that took every packet it received and rebroadcast it to all the outputs. Modern Ethernet uses switches rather than hubs.1

Hubs broadcast data to all connected devices. This is inefficient and insecure (every device sees every packet). They’re rarely used today.

Switches are smarter: More advanced than hubs, switches direct data only to the intended recipient device, reducing unnecessary data exposure. Modern networks primarily use switches due to their efficiency and security benefits.

Figure 1: Hub vs. Switch

Router

A router connects one network to another, like your home network to the Internet. It decides the best path for data to travel between networks, following a routing configuration table. This table keeps track of all connections to the router and all possible paths that exist between networks. This allows the router to choose the quickest/best path for data.

Most home routers include a built-in switch and wireless access point, and often have firewall features too.

Figure 2: Data packet being sent to NAT router.
Figure 3: NAT router translating/forwarding data packet.

Internet Connection Sharing

  • Home broadband routers
  • Office network routers
  • Enterprise or backbone routers (used by ISPs)

Modems

A modem (MOdulator-DEModulator)2 translates digital signals from your network into analog signals that can travel over telephone or cable lines. It also translates analog signals back to digital. Your ISP provides one for Internet access, for example using a digital subscriber line (DSL) technology.

Firewall

A firewall filters network traffic based on rules. It blocks unauthorized connections and allows trusted ones from entering or exiting the network. Firewalls can be physical devices (hardware built into routers) or software running on a computer.

Figure 4: Data packets sent to node with firewall.
Figure 5: Firewall allows or blocks packets based on rules.

How does networking affect me?

Knowing what hubs, switches, routers, and modems do can be helpful if you notice any issues while browsing the Internet, especially if you want to stream movies or play games online. Streaming means that your computer is constantly sending and receiving tiny pieces of data known as packets. Packet loss happens when some of those packets get delayed, dropped, or corrupted somewhere along the path.

This can be caused by:

  • Weak Wi-Fi signals or interference (e.g., walls, microwaves, other networks)
  • Congested networks, especially during peak hours
  • Old or overloaded routers or switches
  • Poor routing paths between your ISP and the game server
  • ISP issues or throttling

In a video game, if you are experiencing packet loss:

  • Your actions might appear delayed (lag)
  • Characters might teleport (rubber-banding)

The screenshot below is a bit blurry, but the ping is evident for each of these players in Rocket League. Note the red ones are numbers like 224, but the yellow one is 96. If you have better internet, you might see a 24 that’s in green (which is usually what your lucky author sees!).

Hints to help you with packet loss: use a wired connection (Ethernet) when possible, restart your router, or test your connection with tools like ping or traceroute to see where packet loss might be happening.

There are all sorts of connections issues you might have in Rocket League (and other games):

Exercises

  • Your home router likely has a firewall with basic security rules.
    • Access your router settings (via IP address) and identify firewall settings. Document what you find.
  • Other than computer networks, where have you heard terms like hub or switch, and do they work analogously? For example, a bicycle has a hub and spokes, and airlines have a hub. Railways have switches. Any other examples you can think of, or can you expand on the ones given here?
  • Explore: are hubs used anywhere anymore in networking, or are they totally obsolete nowadays?
  • We didn’t talk about it much, but TCP and UDP are different protocols for sending data. UDP is better for streaming video compared to TCP based on things like how it handles packet loss. What might you prefer to use TCP for, then?
  • Do you play any games online, such as Rocket League or Minecraft, and if so, what connection issues have you had with them? Do you stream movies online?
  1. Reference: CS 161 ↩︎
  2. Reference: CS402 Saylor ↩︎