Sample course · Beginner · 9 lessons

How the internet works, end to end

Follow one click from a laptop in Leeds to a server across the Atlantic and back.

Follow a single web page request from a home laptop to a server across the ocean and back: packets, IP addresses, routers, DNS, TCP, HTTPS, undersea cables, data centres, CDNs and Wi-Fi. Afterwards you can explain what really happens when you open a web page, read the clues in common error messages, and fix everyday connection problems with understanding rather than guesswork.

What you'll learn

  • Explain how data is split into packets and passed between networks by routers and internet providers
  • Describe what IP addresses are, including the private addresses and address sharing used at home
  • Trace how DNS turns a website's name into an IP address and why its answers are cached
  • Explain how ports, TCP and UDP get data to the right program, reliably when it needs to be
  • Describe what HTTPS protects, how certificates prove a site's identity, and what the padlock does not promise
  • Explain why distance adds delay and how undersea cables, data centres and CDNs shape how fast a page loads
  • Diagnose common connection problems by matching the symptom to the step of the journey that failed

Who it's for

  • Everyday internet users with no technical background who want to know what happens behind the screen
  • Students starting computing or networking who want the whole picture before the details
  • People who want to troubleshoot their home internet with understanding rather than guesswork

Syllabus

  1. 1.From the laptop to the wider internet

    How data is cut into packets, how devices get addresses, and how routers and providers pass packets from network to network.

    1. Networks, packets and the journey of one click
    2. IP addresses: giving every connection a return address· checkpoint
    3. Routers and internet providers: passing packets along
  2. 2.Finding the server and talking safely

    How a website's name becomes an address, how a reliable connection is set up, and how HTTPS keeps the conversation private.

    1. DNS: turning a website's name into an address· checkpoint
    2. TCP, UDP and ports: getting data to the right program intact
    3. HTTP, HTTPS and TLS: asking for the page securely· checkpoint
  3. 3.The physical internet and when it breaks

    The cables, buildings and caches that carry pages and make them fast, the last hop over Wi-Fi or mobile, and how to work out which step failed.

    1. Undersea cables and data centres: where the internet physically lives
    2. CDNs and caching: why popular pages load so fast· checkpoint
    3. Wi-Fi, mobile data and what can go wrong

Lesson 1

Networks, packets and the journey of one click

What you'll learn: what a network is, why everything online travels in small packets, and the route one web page takes from a server to your screen.

One click, a lot of work

Amara is on the sofa in her flat in Leeds with her laptop on her knees. She wants to bake a lemon drizzle cake, so she types the address of her favourite recipe site, Breadbox, into her browser and presses Enter. About half a second later the page is there: a photo of the cake, a list of ingredients, the method.

In that half second her laptop has talked to her Wi-Fi router, her broadband provider, a directory service that turns names into numbers, a server in a data centre, and quite possibly a cable lying on the floor of the Atlantic. This course follows that one request, step by step, until you could explain the whole trip to a friend.

A note on the name: we will call the site breadbox.example. Names ending in .example are reserved for teaching, so no real site uses it, which makes it perfect for a running example.

What a network is

A network is simply two or more devices that can send data to each other. Amara's laptop, her phone, her smart speaker and her router form a small network at home. Her broadband provider runs a much bigger one.

The internet is a network of networks. Nobody owns it as a whole. Tens of thousands of separate networks, run by companies, universities and governments, have agreed to pass data to each other using shared rules. Those shared rules are called protocols, and most of this course is about a handful of them.

Why data travels in packets

The Breadbox page is not small. With its photos, fonts and scripts it might add up to about 2 megabytes, which is 2 million bytes. That never travels as one lump. It is chopped into packets, small pieces that usually carry at most about 1,500 bytes of data each on a typical home or office network. Two million divided by 1,500 is roughly 1,300, so a single recipe page arrives as well over a thousand packets.

Here is the everyday picture. Imagine you had to post a whole book to a friend, but the post office only accepted postcards. You would copy the book onto numbered postcards, write your friend's address and your own on every one, and drop them in the box. Some might take different routes through different sorting offices. Some might arrive out of order, and one or two might get lost. Because they are numbered, your friend can put them back in order and ask you to resend any that never arrived.

That is almost exactly how the internet moves data. Chopping data into packets has three big advantages:

  • Sharing the road. Millions of people's packets can be mixed together on the same cables, taking turns, instead of one person hogging a line for the whole conversation.
  • Getting around problems. If one route breaks, later packets can go another way.
  • Cheap repairs. If one packet is damaged, only that small piece needs sending again, not the whole page.

The old telephone network instead reserved a whole circuit for each call. The internet's approach, called packet switching, is why the same cables can carry video calls, emails and recipe pages for millions of people at once.

What a packet carries

Every packet is like a postcard: a small amount of message plus the information needed to deliver it. That delivery information sits at the front, in the header.

Part of the packetWhat it holdsPostcard equivalent
Source addressWhere it came fromYour return address
Destination addressWhere it is goingYour friend's address
Sequence informationWhich piece of the whole this isThe number on the card
Hop limitHow many more stops it may make before being discardedA "throw away if undelivered" date
PayloadThe actual data, a slice of the recipe pageThe writing on the card

We will meet the addresses in the next lesson and the sequence numbers in lesson 5.

Jobs in layers

One more idea makes the rest of the course easier. The internet splits the work of delivery into layers, each doing one job and trusting the layers around it to do theirs.

  • The link layer gets data across one hop, such as the radio link from Amara's laptop to her router.
  • The internet layer gets packets from one address to another across many networks.
  • The transport layer makes sure the right program gets the data, and, when needed, that nothing is missing.
  • The application layer is the conversation that means something to people, such as "please send me the lemon drizzle page".

Because of layering, Amara's laptop could switch from Wi-Fi to a cable, or to her phone's mobile data, and the browser would neither know nor care.

The route map for this course

Here is the journey of Amara's one click, in the order we will follow it:

  1. Her laptop needs an address of its own and learns how to reach the wider world (lessons 2 and 3).
  2. It looks up which numeric address belongs to the name breadbox.example (lesson 4).
  3. It opens a reliable connection to that address (lesson 5).
  4. It asks for the page securely, so nobody along the way can read or alter it (lesson 6).
  5. The packets cross real cables, possibly under the sea, to a data centre (lesson 7).
  6. A nearby copy of the page may answer instead, which is why it was so fast (lesson 8).
  7. The packets make the final hop over Wi-Fi, and we look at what happens when any step fails (lesson 9).

Recap

  • A network is devices that can send each other data; the internet is a network of networks with no single owner.
  • Protocols are the shared rules that let all those separate networks cooperate.
  • Data travels as packets of up to about 1,500 bytes, so one web page can be over a thousand of them.
  • Each packet has a header with source and destination addresses and a payload with the data, like a numbered postcard.
  • The work is split into layers (link, internet, transport, application), so each part can change without breaking the others.

Lesson 2

IP addresses: giving every connection a return address

What you'll learn: what an IP address is, how Amara's laptop gets one, and why her whole household shares a single public address.

Every packet needs a return address

In the last lesson, Amara's click on the Breadbox recipe page became over a thousand packets, each with a destination address and a source address in its header. Those addresses are IP addresses, after the Internet Protocol, the rule book for getting packets from one place to another across many networks.

An IP address is a number that identifies a device's connection to a network. Without one, Amara's laptop could not send a single packet, and the Breadbox server would have no idea where to send the page back.

Two versions: IPv4 and IPv6

There are two kinds of IP address in use today, and most devices handle both.

IPv4IPv6
Size32 bits128 bits
How it looks203.0.113.452001:db8:4a::17
How many possibleAbout 4.3 billionAbout 340 undecillion (a 39-digit number)
StatusRan out of fresh addresses years agoWidely used and growing; adoption varies a lot by country and provider

IPv4 addresses are four numbers from 0 to 255 separated by dots. In the 1980s, 4.3 billion seemed like plenty. Today there are far more phones, laptops, televisions and doorbells than that, so IPv4 addresses are scarce and are bought and sold. IPv6 fixes the shortage with an address space so large it will not run out, written as groups of hexadecimal digits separated by colons.

Whether Amara's connection uses IPv6 depends on her broadband provider. Many providers now give customers both, and when both work, devices generally prefer IPv6. To keep our examples readable, we will mostly use IPv4. The addresses in this course come from ranges reserved for documentation, so they will never point at anyone's real machine.

How the laptop gets its address

When Amara opened her laptop and it joined her home Wi-Fi, it did not have an address yet. It shouted a request to the whole home network, and the router answered, using a protocol called DHCP (Dynamic Host Configuration Protocol). The answer gave the laptop four things:

  1. Its own address on the home network: 192.168.1.23.
  2. The size of the local network, so it knows which addresses are "at home" and which are "outside".
  3. The address of the default gateway, the router itself, at 192.168.1.1, where anything going outside should be sent.
  4. The address of a DNS server, which we will need in lesson 4.

This address is a lease, not a permanent gift. It lasts for a set time, often a day, and the laptop renews it quietly. Tomorrow it might get 192.168.1.30 instead, and nothing would notice.

Private and public addresses

Here is the twist. 192.168.1.23 is a private address. Certain ranges are set aside for use inside homes and offices: addresses starting 192.168., those starting 10., and those from 172.16. to 172.31.. Millions of households use 192.168.1.23 for some device right now. These addresses are never used out on the public internet; routers there will not deliver packets addressed to them.

Amara's router, however, has a second address on the side facing her broadband provider: a public address, say 203.0.113.45, assigned by the provider. That one is unique on the internet (at least for now; providers can change it).

So how do packets from a private address reach the Breadbox server? The router performs network address translation, or NAT. Think of a large block of flats with a single street address and a concierge at the front desk. Letters going out leave with the building's street address on them. When replies come back, the concierge checks a notebook to see which flat number asked, and carries each letter upstairs to the right door. Outsiders only ever see the building's address.

Amara's router is that concierge. When her laptop sends a packet to the Breadbox server, the router swaps the source 192.168.1.23 for its public 203.0.113.45, notes the swap in a table, and sends it on. When the reply arrives, it looks up the table and forwards the reply to the laptop. Her phone, her flatmate's tablet and the smart speaker all share that same public address in the same way. With IPv6 there are enough addresses for every device to have its own, so NAT is usually unnecessary, though the router still blocks unrequested traffic from outside.

Finding the Breadbox server's address

The other end needs an address too. The Breadbox server, in a data centre far away, has a public address such as 198.51.100.7. Amara never typed that number; she typed a name. Turning breadbox.example into 198.51.100.7 is the job of DNS, which has a lesson of its own.

For now, the important point is that each packet Amara's laptop sends will carry:

  • Destination: 198.51.100.7, the server.
  • Source: 192.168.1.23 inside the flat, rewritten to 203.0.113.45 by the router on its way out.

Some things IP addresses do and do not tell people

An IP address roughly reveals which provider you use and often the region you are in, which is why websites can guess your country. It does not reveal your name or street address to an ordinary website; only the provider knows which customer had which address at a given time, and in many countries it can be required to tell authorities. Shared addresses, mobile networks and VPNs (services that route your traffic through their own servers) all blur the picture further.

Recap

  • An IP address identifies a device's connection so packets can be delivered and replies can find their way back.
  • IPv4 (like 203.0.113.45) has about 4.3 billion addresses and has run short; IPv6 (like 2001:db8:4a::17) has effectively unlimited addresses and is spreading.
  • On joining a network, a device gets a leased private address, a gateway and a DNS server from the router using DHCP.
  • Private ranges (192.168., 10., 172.16. to 172.31.) only work inside a home or office.
  • NAT lets a whole household share one public address, like flats sharing one street address with a concierge sorting the post.

This lesson ends with a 3-question checkpoint, graded in the app.

7 more lessons in this course

Start it in Akadyo to read on, take the checkpoints and keep your place, with a tutor beside every lesson.