How the Internet Works
Learn how packets, IP addresses, routing and protocols such as TCP, IP, HTTP and DNS deliver data, and why redundancy makes the internet fault tolerant.
Welcome back!
Step 1 of 10Learn
A network of networks
A computing device is a machine that can run a program: a laptop, a phone, a game console, a smart thermostat. When devices are connected so they can send and receive data, they form a network. The internet is a network of networks: millions of home, school, business and mobile networks linked together worldwide.
The internet works because every connected device follows the same protocols: agreed rules about how data is formatted and sent. Protocols are open, meaning anyone can read them and build devices that follow them. That openness is a big reason the internet grew so fast: any company or person could make hardware or software that joins in, without asking permission from a central owner.
Every device on the internet has an IP address (Internet Protocol address), a number that identifies where data should be delivered, like a postal address. The older IPv4 system uses 32-bit addresses, which allows about 4.3 billion, and that turned out to be too few for a world of phones and smart devices. The newer IPv6 uses 128-bit addresses, which provides an almost unimaginable number: 2128.
Remember the bits lesson: going from 32 to 128 bits doesn't multiply the number of addresses by four. Each extra bit doubles it, so 96 extra bits multiply it by 296.
Step 2 of 10Practice · True or false
Switching from 32-bit to 128-bit IP addresses multiplies the number of possible addresses by 4.
Step 3 of 10Learn
Packets and routing
When you send a photo to a friend, it doesn't travel as one big piece. It's broken into many small packets. Each packet carries a chunk of the data plus metadata: where it's going (the destination IP address), where it came from and its position in the sequence.
Packets travel through devices called routers, which read the destination address and forward each packet toward it, one hop at a time. Here's the surprising part: packets from the same photo may take different paths. If one route is congested or broken, routers send packets another way. Packets can also arrive out of order, and occasionally some are lost.
That's where TCP (Transmission Control Protocol) comes in. TCP numbers the packets, so the receiving device can put them back in the right order, and it requests any missing packets to be sent again. Working with IP, which handles addressing and routing, TCP makes delivery reliable. Some applications, such as live video calls, use a lighter protocol called UDP, which skips the resending; a few lost packets cause a brief glitch, but waiting for resends would cause worse delays.
Breaking data into packets lets many conversations share the same wires at once and keeps the network flexible. No single path has to be reserved for your photo from start to finish.
Step 4 of 10Practice · Put in order
Put these steps of sending a photo across the internet in order.
Drag the items, or use the arrow buttons, to put them in order.
- The photo is broken into numbered packets with addresses
- Packets arrive at the receiving device, some out of order
- Routers forward each packet toward the destination, possibly by different paths
- The receiving device reassembles the complete photo
- TCP reorders the packets and requests any that are missing
Step 5 of 10Learn
The protocol layers you use every day
The internet's protocols are organized in layers, each relying on the one below and hiding its details from the one above. That's abstraction again.
- IP gets packets from one address to another across networks.
- TCP (or UDP) makes the stream of packets reliable and ordered between two programs.
- HTTP and HTTPS carry web pages between browsers and servers. HTTPS adds encryption.
- DNS (Domain Name System) translates names like
example.orginto IP addresses, so humans don't have to memorize numbers.
When you open a website, all of these work together: DNS finds the address, TCP and IP carry the packets, and HTTPS delivers the page securely.
It helps to keep two terms apart. The internet is the network itself: the devices, cables, routers and protocols. The World Wide Web is one service that runs on top of the internet: a system of linked pages accessed with HTTP. Email, video calls and online games also use the internet without being the Web.
Network performance has its own vocabulary. Bandwidth is the maximum amount of data that can be sent in a fixed time, measured in bits per second, such as 100 megabits per second. Latency is the time it takes data to travel from sender to receiver. Bandwidth is the width of the pipe; latency is how long the trip takes.
Step 6 of 10Practice · Match the pairs
Match each protocol or term to its job.
Tap an answer, then tap the place where it belongs (or drag it there).
- IP
- TCP
- DNS
- HTTPS
- Bandwidth
Step 7 of 10Learn
Redundancy and fault tolerance
The internet has no single central computer, and that's by design. Its early versions were built to keep working even if parts of the network were damaged.
The key idea is redundancy: having more than one path between devices. In a network diagram, if device A connects to device D through both B and C, then even if B fails, data can still flow through C. A system that keeps working when some parts fail is fault tolerant.
Redundancy has costs: more cables, more routers, more money. But it's what lets the internet handle broken undersea cables, power outages and overloaded servers with users barely noticing. Routers automatically detect failed connections and send packets around them.
Exam questions often show a small network diagram and ask: "If the connection between X and Y fails, can A still reach D?" or "What is the minimum number of connections that must fail to disconnect A from D?" To answer, look for alternate paths. If every route from A to D passes through one particular device or connection, that device is a single point of failure, and the network isn't fault tolerant there.
The same principle protects data: companies store copies of files in several data centers so that one fire or flood doesn't erase anything.
Step 8 of 10Practice · What would you do?
What would you do?
A small network has connections A–B, B–D, A–C and C–D. A student says: "If the connection B–D breaks, A can no longer reach D." Is the student right?
Step 9 of 10Note
Step 10 of 10Practice · Choose one
Why might packets from the same file arrive at their destination out of order?
Lesson complete!