Networks and Chips

How the Internet Actually Works

A first-principles look at the internet: how data is split into packets, how routers pass them along, and how cables and agreed rules tie networks together.

On this page
  1. A network of networks
  2. The physical layer: wires, fiber and radio
  3. Breaking data into packets
  4. Addresses and the Internet Protocol
  5. Routers: the sorting offices
  6. Getting it all there reliably
  7. Where the data lives
  8. Getting your connection to the network
  9. Security and privacy on an open network
  10. A simple summary of one web page load

A network of networks

The internet is not a single machine or a single company’s network. It is a very large number of separate networks, run by internet service providers, universities, companies, governments and others, that agree to exchange data using shared rules. No one party owns the whole thing. What makes it “the internet” is that these networks all follow the same agreed set of rules, called protocols, so that a device on one network can reach a device on almost any other.

It helps to separate three layers of the story: the physical links that carry signals, the rules that decide how data is packaged and addressed, and the applications, such as web browsers and email, that people actually use.

The physical layer: wires, fiber and radio

Every bit of data has to travel over something physical. At the edges, that is often a radio link, as with home wireless networking or a mobile phone connection, or a copper or fiber line into a building. Deeper in the network, the main carrier is optical fiber: thin strands of glass that carry pulses of light. A single fiber can carry a very large amount of data, and many fibers are bundled together in cables that run under streets, across countries and beneath the sea.

Light in fiber travels at roughly two thirds of its speed in a vacuum, so distance matters. Even on a perfect network, a signal crossing an ocean takes a noticeable fraction of a second for a round trip. That delay is called latency, and it is one reason the physical route data takes is more than a technical detail.

Breaking data into packets

Suppose you request a photo from a distant server. The server does not send the photo as one continuous stream down a dedicated line. Instead, the data is split into many small chunks called packets. Each packet carries a piece of the content plus a header, a small label with information such as where it came from, where it is going, and where it sits in the sequence.

Sending packets rather than holding a line open has a practical benefit: many conversations can share the same links at the same time. Packets from your video call, your neighbor’s download and a stranger’s email can all travel along the same cable, interleaved, and be sorted out at the other end. If a link is damaged or congested, packets can often be sent around it.

Addresses and the Internet Protocol

For packets to reach the right place, every device needs an address. The Internet Protocol, usually shortened to IP, defines how those addresses work and how a packet’s header names its destination. You can think of it as a postal system: the address on the envelope tells each sorting office where to send it next, without needing to know the whole route. Why the addressing scheme has been extended over the years is a story of its own, tied to the idea of internet addresses running short.

Humans rarely type those numeric addresses. The Domain Name System works like a phone book, translating a name such as a website’s domain into the numeric address a computer needs. When you type a name into a browser, your device usually first asks a name server for the matching address, then sends its request there.

Routers: the sorting offices

A router is a device that connects networks together and decides where each packet goes next. It reads the destination in the packet’s header, consults a table describing which neighboring network is a good way to reach that destination, and forwards the packet. The next router does the same. A packet may pass through a dozen or more routers on the way, and each makes only a local decision.

Routers learn about the wider network by exchanging information with each other. Large networks use a routing protocol for this, in which they announce which destinations they can reach. This is largely based on cooperation and trust between operators, which is why mistaken or misconfigured announcements can occasionally send traffic the wrong way and cause outages.

Getting it all there reliably

Packets can be lost, delayed or arrive out of order. Another layer of rules, most commonly the Transmission Control Protocol, handles this for applications that need accuracy. The sender numbers its packets, the receiver confirms what arrived, and anything missing is sent again. The receiver puts the pieces back in order before handing the result to your browser. Some applications, such as live calls, may prefer a lighter approach that accepts a little loss in exchange for lower delay.

The same layering idea applies throughout. Each layer does one job and relies on the layer below, which is part of why the internet has been able to carry new kinds of applications without being rebuilt from scratch.

Where the data lives

When you open a website, the content usually comes from a server in a building full of computers. These facilities, often called data centers, host much of what people use online. Many services also copy popular content to servers closer to users to cut delay, an idea related to edge computing, and businesses commonly rent computing resources rather than owning them, which is the heart of cloud computing.

Getting your connection to the network

Your home or phone connects to the wider internet through an internet service provider. Your home router handles traffic inside the house and passes everything else on to the provider, whose own network then connects to other providers. Traffic between these large networks is exchanged at agreed meeting points, and across oceans most of it travels through submarine fiber cables. Alternatives exist for hard-to-reach places, including satellite internet, though most data volume still moves over fiber.

Security and privacy on an open network

The original design focused on connecting networks, not on keeping information secret. Data passing through intermediate networks can in principle be observed unless it is protected. This is why message encryption matters: it scrambles content so that machines along the route can pass it on without being able to read it. Encryption does not hide everything, though. Metadata, such as which addresses are communicating and when, may still be visible to the networks that carry it.

A simple summary of one web page load

In rough order: your device finds the address for the site name; it opens a connection; it sends a request split into packets; routers forward those packets across several networks to a server; the server replies with its own stream of packets; and your device reassembles them into the page. All of this commonly takes a fraction of a second, which is why it feels instant even though many separate systems cooperated.

Keep exploring

Guides from other topics

All topics →