How Everyday Technology Works

How the Internet Works

A plain guide to the cables, routers, addresses and rules that move data between devices, from a tap on your screen to a server and back again.

On this page
  1. A network of networks
  2. The physical layer: cables, towers and satellites
  3. Addresses: how devices find each other
  4. Packets: data in small pieces
  5. Routers and the path between networks
  6. Servers, requests and a page loading
  7. Why speed and reliability vary
  8. Where the internet came from, and what it does not guarantee
  9. The short version

A network of networks

The internet is not one machine or one company. It is a very large collection of separate networks, run by internet service providers, universities, companies, governments and others, that agree to pass data to each other using shared rules. Your home network is one small piece. Your phone company’s network is another. A company that hosts websites runs yet another. The internet is what you get when all of them are connected.

The web is a different thing. The web is a service that runs on top of the internet, made of pages and links that your browser fetches. Email, video calls and online games also run on the internet, and none of them are the web.

The physical layer: cables, towers and satellites

Underneath everything is hardware. Your device connects to a router, usually by Wi-Fi or a cable. The router connects to your provider, through fiber-optic lines, copper phone or cable-television lines, or a mobile or satellite link. Fiber carries data as pulses of light through thin strands of glass and is the main choice for long distances because it can carry a great deal of data with little loss.

From your provider, traffic joins larger regional and national links. Between continents, most data travels through fiber-optic cables laid along the seafloor, with repeaters along the way that boost the signal. Satellites also carry some traffic, which matters most in remote places and on ships and aircraft. The topic of satellite communication is a field of its own, but the basic idea is the same: the data still has to reach a ground station that connects to the wider network.

Addresses: how devices find each other

Every device that takes part in the internet needs an address so that data knows where to go. This is an IP address. The older format, IPv4, uses four numbers such as 203.0.113.7 (an example address set aside for documentation). The address space of IPv4 is limited, so a newer format, IPv6, uses much longer addresses and provides far more of them. Both are in use today.

Many devices at home share one public address. Your router keeps track of which device asked for what and hands the replies to the right one. This is why your laptop and your phone can both browse at once even though the outside world sees only one address for your home.

People rarely type addresses. They type names like example.com. The Domain Name System, or DNS, works like a distributed phone book: when you enter a name, your device asks a DNS server to look up the matching address. Only then can it contact the right server.

Packets: data in small pieces

Data does not travel as one long stream. It is broken into small chunks called packets. Each packet carries a piece of the content plus a header with the sending and receiving addresses and some bookkeeping. Packets from one page or video may take different routes and arrive out of order. The receiving device puts them back in sequence.

This design has a practical benefit. If one link is busy or fails, packets can be sent another way, and many different conversations can share the same cables at once.

The rules that govern this are called protocols. The Internet Protocol handles addressing and delivery of packets. A companion protocol, TCP, adds checking: it numbers packets, notices when some are missing and asks for them again, so that a file arrives complete. Some applications, such as live calls, use a lighter protocol that does not resend lost packets, because a late piece is often no use.

Routers and the path between networks

A router reads each packet’s destination and decides which neighbor to pass it to next. No single router knows the whole path. Each makes a local choice based on tables that describe which direction leads toward which part of the network. A packet may pass through many routers on its way, and tools such as traceroute can show a rough picture of that journey.

Large networks announce to each other which addresses they can reach, using a protocol called BGP. Providers then decide, under their own agreements, which routes to prefer. Mistakes or failures in these announcements have occasionally caused outages for parts of the network, which shows how much of the internet depends on cooperation. Networks also meet at shared facilities called internet exchange points, where they can pass traffic directly to each other.

Servers, requests and a page loading

Put the pieces together for a simple example. You type a web address and press Enter.

  1. Your browser asks DNS for the address that matches the name.
  2. Your device opens a connection to that address, usually using an encrypted protocol so others on the path cannot easily read the content. The basics of this are covered in encryption basics.
  3. Your browser sends a request for the page.
  4. The server sends back the page’s text and instructions, often followed by images, scripts and styles.
  5. Your browser assembles these into what you see.

All of this commonly takes a fraction of a second, though it varies with distance, congestion and how busy the server is. Many sites also keep copies of their content on servers closer to users, called content delivery networks, to shorten the trip.

Why speed and reliability vary

Two ideas are often confused. Bandwidth is how much data a connection can carry per second. Latency is how long a single piece of data takes to make the trip. A connection can have high bandwidth and still feel sluggish if latency is high, which matters more for video calls and games than for downloading a large file.

Slowness can come from many places: weak Wi-Fi, a busy local network, congestion at your provider, a distant or overloaded server, or an old device. Finding which one is the cause usually takes some trial, such as testing on a cable or from another device.

Where the internet came from, and what it does not guarantee

The design grew out of research networks that wanted a way to connect different computers and survive the failure of individual links. The history of internet networking and the early web are told elsewhere; the point here is that the system was built to be open and flexible, not to be secure by default. That is why protections such as encryption, careful passwords and other cybersecurity basics matter, and why the data you send can reveal more than you expect, a theme covered under online privacy.

The short version

Your request is split into packets, addressed using IP, steered by routers across many cooperating networks and carried over fiber, radio and copper. Names are turned into addresses by DNS, and protocols make sure the pieces arrive in order. No one owns the whole thing, which is both its main strength and the reason its weaknesses are hard to fix.

Keep exploring

Guides from other topics

All topics →