Network devices: The Hardware Behind Internet Connectivity
Neha Chopra | Finance Writer → Full-Stack Developer in Progress I write finance case studies and analytical articles, and I’m currently transitioning into web development. Passionate about building clean, functional web experiences while bringing an analytical mindset from finance into tech.
What is modem and how does it connect our network to internet?
A modem (short for modulator & demodulator) is our gateway to the internet. It is the device that bridges our home or office network and our Internet Service Providers(ISP). Modem acts as a translator. Our computers communicate in binaries sent as electrical signals. But the connection from our ISP might be cable TV line, telephone line or fiber optic cable, each using different types of signals. The modem modulates (converts) our digital data into appropriate signal type for transmission using ISP infrastructure and demodulates (converts) incoming signal back into digital data our devices can understand. Without modem, our local networks would have no way to communicate with the outside world. Its worth noting that the modem is assigned a public IP address by our ISP. This is the network’s address on the internet, visible to outside world.
What is a router?
The router is the traffic police of our local network. A router’s primary job is to route the data packets between different networks. Our ISPs typically give us 1 public IP address through our modem but we probably have multiple devices (laptops, phones, smart TVs) that all need internet access simultaneously! The router solves the problem through a process called “Network Address Translation”(NAT). It creates a private local network with its own set of private IP addresses for all of our devices. When our laptop requests a website, the router remembers that request, forwards it to internet using the single public IP address, and when response comes back, routes it specifically to our laptop!
Routers also make routing decisions based on routing tables. They determine the best path for data to travel. In a home setting, this is relatively simple—most data either goes to a local device or out to the internet. But in larger networks, routers make intelligent decisions about which path data should take to reach its destination most efficiently.
Modern routers often include built-in wireless access points (Wi-Fi), DHCP servers that automatically assign IP addresses to our devices, and basic firewall functionality. Many consumer devices labeled as "modems" are actually combined modem-router units, handling both translation and traffic direction in one box.
Switch vs Hub: How Local Networks Actually Work
Both switches and hubs connect multiple devices within a local network, but they work in fundamentally different ways.
A hub is the simpler, older technology. It operates as a basic repeater at the physical layer of networking. When a hub receives data from one connected device, it broadcasts that data out to every single port, meaning every connected device receives it. Imagine a meeting room where anyone who speaks must shout so everyone can hear, even if they're only talking to one person. This creates several problems: it wastes bandwidth since devices receive data not meant for them, creates security concerns since all devices can see all traffic, and leads to collisions when multiple devices try to transmit simultaneously. Hubs don't understand MAC addresses or make any intelligent decisions—they just repeat everything everywhere.
A switch, by contrast, is intelligent. It operates at the data link layer and learns which devices are connected to which ports by building a MAC address table. When a device sends data, the switch looks at the destination MAC address and forwards that data only to the specific port where the destination device is connected. Using our meeting room analogy, a switch is like passing notes directly to specific people rather than shouting to the entire room.
This targeted delivery means switches provide several critical advantages: much better performance since devices only receive relevant data, improved security since devices can't easily snoop on traffic meant for others, no collision issues in modern switched networks using full-duplex communication, and efficient use of bandwidth. A 24-port switch can have 24 simultaneous conversations happening at full speed, whereas a hub would bottleneck all traffic.
In modern networks, switches are the standard for connecting devices within a local area network (LAN). We'll find switches in offices connecting computers, printers, and servers, in data centers connecting servers together, and even in smart homes connecting multiple wired devices.
What is a Firewall and Why Does Security Live Here?
A firewall is our network's security guard, sitting at the boundary between our trusted internal network and the untrusted outside world (usually the internet). Its fundamental job is to monitor and control incoming and outgoing network traffic based on predetermined security rules.
Firewalls work by examining data packets and making allow/deny decisions based on several criteria: source and destination IP addresses, port numbers (which indicate what type of service is being accessed), protocols (TCP, UDP, ICMP, etc.), and in more advanced firewalls, the actual content of the traffic (deep packet inspection) and the state of the connection (stateful inspection).
Think of a firewall as a bouncer at a club with a strict guest list and rules. The bouncer checks everyone trying to enter or leave, verifying they meet the criteria for passage. A basic firewall rule might say "block all incoming connections to port 22 (SSH) except from IP address 203.0.113.5" or "allow all outgoing HTTP and HTTPS traffic but block everything else going out on non-standard ports."
Firewalls can be hardware devices, software running on a computer, or a combination of both. Home routers typically include basic firewall functionality. Enterprise environments use dedicated hardware firewalls from vendors like Cisco, Palo Alto Networks, or Fortinet. Modern servers also run software firewalls (like iptables on Linux or Windows Firewall) as an additional security layer.
There are several types of firewalls with increasing sophistication. Packet-filtering firewalls examine individual packets in isolation based on basic criteria. Stateful firewalls track the state of network connections and understand whether a packet is starting a new connection, part of an existing connection, or suspicious. Next-generation firewalls (NGFW) add deep packet inspection, intrusion prevention systems, and application awareness—they can distinguish between legitimate web traffic and malicious activity even on the same port.
Security lives at the firewall because it's the chokepoint where all traffic must pass. Rather than trying to secure hundreds or thousands of individual devices, organizations can enforce security policy at the firewall, creating a hardened perimeter. The firewall can block known malicious IP addresses, prevent unauthorized access to internal services, stop certain types of attacks, and log all traffic for security analysis.
What is a Load Balancer and Why Do Scalable Systems Need It?
A load balancer is a device (or software) that distributes incoming network traffic across multiple servers. Instead of all traffic hitting a single server, the load balancer acts as a traffic cop, spreading requests across a pool of servers to ensure no single server becomes overwhelmed.
Imagine a grocery store with ten checkout lanes but only one open—there would be a long line and frustrated customers. Now imagine a smart system that opens more lanes as more customers arrive and directs each customer to the shortest line. That's essentially what a load balancer does for web traffic.
Load balancers solve several critical problems for scalable systems.
They prevent overload by distributing traffic across multiple servers, preventing any single server from becoming a bottleneck. A popular website might receive millions of requests per day—one server simply cannot handle that load, but ten servers working together can.
They provide high availability and fault tolerance. If one server crashes or needs maintenance, the load balancer detects this and stops sending traffic to that server, routing everything to the healthy servers instead. Users never notice the problem.
They enable horizontal scaling. When traffic increases, we can simply add more servers to the pool, and the load balancer automatically starts using them. This is much easier than vertical scaling (buying a bigger, more expensive server).
Load balancers use various algorithms to decide which server should handle each request. Round-robin sends requests to servers in rotation (server 1, then 2, then 3, then back to 1). Least connections sends traffic to whichever server currently has the fewest active connections. IP hash uses the client's IP address to determine which server to use, ensuring the same user consistently reaches the same server (useful for maintaining session data). Weighted distribution allows us to send more traffic to more powerful servers.
Companies like Netflix, Amazon, and Google couldn't exist without load balancers. When we watch a video on Netflix, we're likely hitting a load balancer that distributes our request across thousands of servers. Cloud platforms like AWS offer load balancing services (Elastic Load Balancer), and software solutions like NGINX and HAProxy provide load balancing capabilities that can run on regular servers.
How All These Devices Work Together in a Real-World Setup
To understand how these devices collaborate, let's trace what happens when we visit a website from our laptop in a corporate office, and examine how the same infrastructure supports that website serving millions of users.
Our request leaving our network:
We type "www.example.com" into our browser. Our laptop sends the request to our router's IP address (perhaps 192.168.1.1 on our local network). The router receives this packet and checks its firewall rules—is this type of traffic allowed? The rules permit outbound HTTPS traffic, so it continues. Using NAT, the router translates our laptop's private IP address (192.168.1.45) to the public IP address assigned to our modem, keeping track of this translation. The router forwards the packet to the modem, which converts the digital signal into the appropriate format for our ISP's cable line and sends it out to the internet.
Inside the data center hosting example.com:
Our request travels through our ISP's network and across the internet, eventually reaching example.com's data center. The first device it encounters is the data center's firewall—a heavy-duty hardware appliance examining millions of packets per second. The firewall checks: Is this traffic coming from a known malicious IP? Is it a suspicious pattern that might indicate an attack? Our legitimate HTTPS request passes these checks.
Next, the traffic hits a load balancer. The website runs on 20 web servers because one server couldn't handle the traffic volume. The load balancer examines current server loads and determines server number 7 has the fewest active connections, so it forwards our request there. The load balancer also handles SSL/TLS termination—decrypting our HTTPS request so the web servers don't have to, improving their performance.
Our request now needs to reach server 7. All 20 web servers are connected to a switch (actually several switches in a redundant configuration). The switch has learned that server 7 is connected to port 15, so it forwards our packet directly there and nowhere else. Server 7 processes our request, generates the webpage, and sends the response back through the same path.
The return journey:
The response goes from server 7 through the switch to the load balancer. The load balancer re-encrypts the traffic (HTTPS) and sends it back through the firewall, which allows outbound responses to legitimate requests. The response travels back across the internet to our ISP. Our modem receives the signal, demodulates it back to digital format, and passes it to our router. The router checks its NAT table—"ah yes, this is a response to that request from laptop 192.168.1.45"—and forwards it to our laptop. Finally, our browser receives the webpage and displays it.
The bigger picture:
In this journey, each device played its specific role. The modem bridged the gap between our local network and the internet's infrastructure. The router managed our local network, assigned private IPs, and translated between private and public addressing. The switch efficiently connected devices within local networks without wasting bandwidth. The firewall protected both our network and the data center from malicious traffic. The load balancer ensured the website could handle massive traffic by distributing load across many servers.
This orchestration happens billions of times per day across the internet. These five fundamental device types form the backbone of nearly every network, from small home setups to massive cloud infrastructure.




