Skip to main content

Command Palette

Search for a command to run...

Exploring How the Internet Works

A plain explanation of data travel and the tech that makes it happen

Updated
7 min read
Exploring How the Internet Works
S

Frontend Developer 💻 | Fueled by curiosity and Tea ☕ | Always learning and exploring new technologies.

Network

Before we dive into the technical details, let's look at what the word "Network" actually means.

If you Google it (or ask ChatGPT), it will tell you that a Network is simply a group of entities connected by some kind of relationship. A perfect example is your Twitter or LinkedIn network, where people are connected to other people.

As computer science engineers, we love to use fancy terminology. So, we define a Network as a group of Nodes (devices) connected to each other through a Link (wire or wireless signal) to share resources.

  • Node: A mobile device, computer, television, car infotainment system, or an IoT device.

  • Link: The medium connecting them (cables, fiber, or wireless radio signals).

Now, a network can be categorized by scale:

  • Small Scale: Your laptop and Android phone connected to your home Wi-Fi. This is generally a LAN (Local Area Network).

  • Medium scale: Your college or campus network, where you can access library resources or printers, but only while you are physically on campus.

Now, imagine connecting all these small networks together. The "Network of Networks," or the "Big Boss" of all networks, is the Internet.

Internet

The Origin

Once upon a time, if Person A wanted to send a message to Person B, they had to send a physical letter. It was slow, and if someone stole the mail, the message was lost forever.

During the Cold War, the US Government became concerned about their rivals (the Soviet Union). They worried that a targeted attack could destroy their central communication hubs. In response, they created an agency called ARPA (Advanced Research Projects Agency). Their mission was to build a communication system that had no central "boss", so if one part was destroyed, the rest would survive.

After years of evolution, this military project (ARPANET) grew into what we now call the Internet.

Physical Reality

You are reading this article right now, but how did it get to your screen? Many people think the internet comes from space or satellites. It doesn't.

There is a huge amount of physical infrastructure involved. The world is literally wrapped in fiber-optic cables that act as the highway for data. These cables run underground and, more importantly, under the ocean.

Fun Fact: Sharks were actually biting these underwater cables! They were attracted by vibrations and electrical signals in early unshielded cables emitted by the lines. Engineers had to start guarding the cables by wrapping them in special steel armor to protect the internet from shark attacks.

How Data Travels

Here is the basic top-level journey:

  1. You request a video from YouTube.

  2. The data leaves the YouTube server.

  3. It is broken into small pieces called packets and travels through fiber-optic cables and multiple routers across the Internet.

  4. It reaches your ISP (Internet Service Provider).

  5. Finally, it travels the last mile to your home and reaches your device.

The Hardware Lineup

To make this journey possible, we need specific hardware network devices. You have probably heard terms like Modem, Router, Switch, Hub, Firewall, WAN and Load Balancer. Let's break down the most common ones.

1. Modem (Modulator-Demodulator)

You might ask, "Bro, what does that even mean?" It sounds like a robot car from Transformers. But it is actually just a Translator.

Story Time: I am working with a client who only speaks Native German. I strictly understand English. I get on a call, and the client starts shouting instructions in German. I go blank. I have no idea what is happening. The connection is there, but the communication is failing.

So, I hire a translator friend to sit in the middle.

  • Incoming: When the client speaks German, my friend listens and translates it into English for me.

  • Outgoing: When I reply in English, my friend translates it back to German for the client.

In the world of the Internet:

  • My Computer (Me): Only understands Digital Language (0s and 1s).

  • The ISP (The Wire outside my house): The ISP usually sends data in a format that your computer cannot directly understand, which the modem converts.

My computer cannot understand the Analog waves coming from the wire. So, the Modem is that translator friend.

  • Demodulation: It takes the signals from the wire and turns them into Digital 0s and 1s for your computer.

  • Modulation: When you send an email, it takes your Digital 0s and 1s and turns them back into Analog waves to travel down the wire.

2. Router

The Router is a device used to manage traffic and route data to connected nodes. It acts as the traffic police for our network.

The Twist in the Story: Let's add a twist to our story. My team has 3 members, and we all want to speak to the client. However, we have only a single translator (Modem) who works for one connection.

So, we decide to hire a Manager.

  1. The Client talks to the Translator.

  2. The Translator talks to the Manager.

  3. The Manager decides which team member needs the information.

In this scenario, the Manager is the Router.

So, router directs traffic by reading the destination address of data packets and sending them to the correct device or network.

Difference Between Modem and Router

FeatureModem (The Translator)Router (The Manager)
Story AnalogyTranslates German (Analog) to English (Digital).Takes the translated letter and decides if it goes to You, your Sister, or your Brother.
Primary JobConverts the signal from the ISP into a language your computer understands.Sorts the traffic. Ensures Netflix data goes to the TV and emails go to the Laptop.
ConnectionConnects your house to the Internet Service Provider (ISP).Connects your devices to each other and to the Modem.
The LanguageConverts Analog Signals (Waves) → Digital Signals (0s & 1s).Deals purely in Digital Packets (Data).
IP AddressGets the Public IP address from the ISP (The address of your house).Assigns Local IP addresses to your devices (e.g., 192.168.1.5 for your phone).
SecurityMinimal. It just passes the data through.High. It often include firewall features, blocking unwanted requests from outside.
Can it work alone?Yes, but only for one device connected directly via wire. Nowadays fiber connections, modem may be built into ONT(Optical Network Terminal).No, it needs a Modem to actually get internet access. But it can work without modem in internal networks.

Now as the data reached your local network and is having numerous computers connected. But now it needs to find the specific computer where it belongs.

Without a central connecting device, you would need a physical cable connecting every single computer to every other computer to share data. That would be a messy, tangled nightmare.

Hubs and Switches solve this by acting as a central meeting point. However, they handle the traffic in very different ways.

HUB

Think of a Hub as a dumb connection point. When it receives data it just broadcast the data to all connected nodes. It simply broadcasts the data to all connected nodes.

SWITCH

A Switch is an intelligent connection point. It respects privacy and only sends data to the intended device. It saves bandwidth.

Difference Between Hub and Switch

FeatureHubSwitch
IntelligenceDumb (No logic)Intelligent (Learns addresses)
Traffic FlowBroadcasts to everyoneUnicasts to specific destination
BandwidthShared (Slows down with more users)Dedicated (High speed per port)
SecurityLow (Data is visible to all)High (Data is isolated)

WAP

A Wireless Access Point (WAP) is a device that allows wired network devices to connect wirelessly.

Previously computers used to connect via Ethernet wired cable. Nowadays, in the mobile era, people prefer working wirelessly. A WAP allows devices to connect to a wired network without cables.

The Gateway

If you are having a Wi-fi connection at home you have seen a single plastic box. It contains all in one solution. It combines a modem, router, switch, and wireless access point into a single, convenient device.

Firewall

Controls and filters incoming/outgoing network traffic based on rules. It acts as a gatekeeper, allowing safe traffic in and keeping malicious traffic out.

Firewalls can be hardware-based, software-based, or a combination, and they often include features like intrusion detection, VPN support, and content filtering.

Load Balancer

Distributes incoming network or application traffic across multiple servers to improve performance, reliability, and redundancy. It works as receptionist deciding which available employee will handle each visitor.

Connecting It All

In the digital world, networks connect us all, turning isolated devices into a seamless web of communication.

“A network is only as strong as the connections it makes.”
— Anonymous

Want to Learn More?

This article is part of my series on “The Internet”, where I break down complex concepts into easy stories.

Check out the full series: The Internet

The Internet

Part 10 of 10

From typing a URL to a fully loaded webpage, data travels through a global network of fiber cables, routers, and servers. This series covers core concepts every CS engineer should know to understand how the modern web works.

Start from the beginning

A Simple Guide to Exploring Browser Internals

Understanding How Browsers Work Behind the Scenes