Byte by Byte › Book 5: Games, Spreadsheets and Networks › Chapter 10: How the Internet Really Works
Chapter 10: How the Internet Really Works
You will learn: LANs and WANs, wired and wireless connections, what IP addresses are, how data travels in packets, what routers do, what protocols are (IP, TCP, UDP, HTTP, HTTPS, DNS), how DNS turns names into addresses, and the difference between bandwidth and latency.
🌟 The Adventure
The Light Bridges were Memunic's internet. Golden lines of light linked every village through stations, just as Memoon had learned two years ago. Messages travelled along them in the blink of an eye.
But not tonight.
In Bleep's control room, the screens were full of warnings. Snowpeak's race results were arriving in a jumble: the third result before the first, half of one result missing completely. A message from Riverbend had not arrived at all.
"How are the villages sending their results?" asked Memoon.
Bleep showed her. Snowpeak had packed every result of the day into one enormous glowing wagon and pushed it onto the Light Bridge. It was so big that nothing else could get past it. Then the bridge station at Pebble Hollow had flickered and gone dark, and the giant wagon had stopped dead. Everything behind it was stuck.
Simbha frowned. "The Grand Final is tomorrow. If the results don't arrive, we can't say who qualified."
Memoon pulled on her roller skates and tightened the straps. "I'm going to travel the bridges myself," she said, "and see how messages should move."
💡 Learn With Memoon
Networks, big and small. In Book 3 you learned that a network is a group of connected devices, and that the internet is a network of networks that covers the world. Networks come in different sizes:
| Type | Stands for | Covers | Example |
|---|---|---|---|
| LAN | Local Area Network | One building or home | The devices on your home Wi-Fi |
| WAN | Wide Area Network | Cities, countries, the world | A bank linking all its branches; the internet itself is the biggest WAN |
Devices join a network in two main ways. Wired connections use an Ethernet cable: usually faster and more reliable. Wireless connections use Wi-Fi (radio waves) or mobile data (from mobile towers): more convenient, but they can be slowed by walls, distance and crowding.
At home, a router joins your LAN to the internet. Your family pays an Internet Service Provider (ISP), a company that connects homes and businesses to the rest of the internet.
IP addresses. To send a letter you need an address. To send data across a network, every device needs one too. An IP address (Internet Protocol address) is a number that identifies a device on a network.
The most common kind, IPv4, is four numbers separated by dots, each from 0 to 255:
192.168.1.10
IPv4 allows about 4.3 billion addresses. That sounds like a lot, but there are now far more devices than that, so a newer kind, IPv6, uses much longer addresses written with numbers and letters, such as 2001:db8::1. IPv6 has room for more addresses than there are grains of sand on Earth.
Two useful facts:
- The devices on your home network usually have private IP addresses (they often start with 192.168). Your router shares one public IP address for all of them when talking to the internet, and keeps track of which reply belongs to which device.
- A public IP address can reveal roughly where you are, such as your city. It is one reason why websites can guess your location.
Packets: why data travels in pieces. Snowpeak's giant wagon is how data must not travel. Instead, the internet breaks every message, picture, video and game update into small pieces called packets. A typical packet holds about 1,500 bytes. A single photo may be split into hundreds of packets.
Each packet has two parts:
| Part | Contains |
|---|---|
| Header | The source IP address (who sent it), the destination IP address (where it is going), a sequence number (its place in the message, such as 3 of 50), and other details |
| Payload | The actual piece of data |
The header is like the outside of an envelope; the payload is the letter inside.
Packet switching. Packets travel independently. Each one may take a different route and they can arrive out of order. At the destination, the sequence numbers are used to put them back together. This method is called packet switching, and it has big advantages:
- Sharing. Many people's packets can share the same cables at once, taking turns, like many skaters on one road. One giant message no longer blocks everyone.
- Getting around problems. If one route breaks, packets simply take another.
- Fixing losses cheaply. If one packet is lost, only that packet is sent again, not the whole message.
Routers: the junctions of the internet. A router is a device that receives packets and sends each one on towards its destination. It reads the destination address in the header, checks its routing table (its list of which direction leads where), and forwards the packet to the next router. Each step from one router to the next is called a hop. A packet crossing the world may make 15 or more hops in less than a second. Routers constantly share information, so when one goes down, others route packets around it.
Protocols: the rules of the road. For computers made by different companies, in different countries, to understand each other, they must follow the same rules. A protocol is an agreed set of rules for how data is formatted and sent. The internet runs on many protocols working together:
| Protocol | Full name | Its job |
|---|---|---|
| IP | Internet Protocol | Gives devices addresses and moves packets towards the right address |
| TCP | Transmission Control Protocol | Numbers the packets, checks they all arrive, asks for missing ones to be resent, and puts them in order |
| UDP | User Datagram Protocol | Sends packets quickly without checking; used for video calls and online games, where speed matters more than every packet arriving |
| DNS | Domain Name System | Turns names like example.com into IP addresses |
| HTTP | Hypertext Transfer Protocol | How browsers ask web servers for pages, and how servers reply |
| HTTPS | HTTP Secure | HTTP with encryption, so others cannot read the data on the way (the padlock from Book 3) |
TCP and IP work so closely that they are often named together as TCP/IP.
DNS: the internet's phone book. People remember names; computers need numbers. When you type example.com, your computer does not know where that is. It asks a DNS server, "What is the IP address for example.com?" The DNS server replies with the number, and only then can your computer send packets there. This lookup takes a few thousandths of a second and happens every time you visit a new website.
The whole journey of a web page.
- You type example.com in the browser and press Enter.
- Your computer asks a DNS server for example.com's IP address and gets it back.
- Your browser sends an HTTPS request for the page to that address.
- The request is split into packets, each with headers. They leave through your Wi-Fi to your router, then to your ISP.
- Routers across the internet forward each packet, hop by hop, to the web server.
- The server sends the page back, also as packets, possibly along different routes.
- TCP on your computer checks every packet arrived, asks for any missing ones again, and puts them in order.
- Your browser reads the page and draws it on your screen.
All of this usually happens in well under a second.
How fast is a connection? Two different measurements matter:
| Measure | Meaning | Measured in | Road analogy |
|---|---|---|---|
| Bandwidth | How much data can travel per second | Megabits per second (Mbps) | How many lanes the road has |
| Latency | How long one piece of data takes to make the trip | Milliseconds (ms) | How long the journey takes |
High bandwidth makes big downloads and videos fast. Low latency makes online games and video calls feel instant. In games, high latency is what players call lag. A tool called ping measures latency by sending a tiny packet to a computer and timing the reply.
💡 Memoon’s tip: Every time you send a message, picture this: hundreds of tiny envelopes, each with an address and a number, racing along different roads, and all meeting up again at the other end.

✍️ Try It Yourself
These activities use Command Prompt, a window where you type commands. The commands below only look at your network; they don't change anything. Ask a grown-up to sit with you.
To open it: click Start, type cmd, and press Enter. Type each command exactly and press Enter.
Activity 1: Find your IP address.
- Type
ipconfigand press Enter. - Find the section for your Wi-Fi or Ethernet connection. Look for IPv4 Address. Does it start with 192.168 or 10? That means it is a private address on your LAN.
- Find the Default Gateway. That is your router's address.
- You can see the same information in Settings → Network & internet → Wi-Fi (or Ethernet) → click your network → Properties.
Activity 2: Measure latency with ping.
- Type
ping example.comand press Enter. - Look at the first line: what IP address did DNS turn example.com into?
- Each reply shows time=. That is the latency in milliseconds. Write down the four times and work out the mean.
- Now ping your router: type
pingfollowed by your Default Gateway address. Why is it so much faster?
(Some servers are set up not to answer pings. If you see Request timed out, try another well-known site.)
Activity 3: Follow the route with tracert.
- Type
tracert example.comand press Enter. Wait: it can take a minute. - Each numbered line is one hop: one router your packets passed through. How many hops were there?
- Which hop was your own router? (Hint: the first one.)
- Try
tracertto a website based in another country. Are there more hops? Is the latency higher?
Activity 4: Ask DNS yourself. Type nslookup example.com . The answer under Name and Addresses shows the IP addresses DNS found. You may see both IPv4 and IPv6 addresses.
Unplugged: The packet game. You need six or more people.
- One person (the sender) writes a twelve-word message, then splits it onto six cards, two words per card. On each card they write the destination (the receiver's name) and a sequence number: 1 of 6, 2 of 6 and so on.
- Everyone else stands around the room as routers. Each card must be passed through at least three routers to reach the receiver, and each router chooses which way to pass it. Shuffle the cards before sending so they leave out of order.
- One router "breaks" (sits down) halfway through; cards must go around them.
- The game leader secretly removes one card. The receiver must use the sequence numbers to spot what is missing and ask the sender to resend it, just as TCP does.
- The receiver puts the cards in order and reads the message aloud.
🎉 Memoon Solves It
Memoon skated the Light Bridges all night with Bleep tracking her from the tower. She learned how the bridges should work, and by sunrise she had a plan.
No more giant wagons. Every village would split its results into small parcels, each labelled with where from, where to and a number: 1 of 40, 2 of 40. The bridge stations would read each label and send the parcel along whichever path was clear. If the Pebble Hollow station went dark, parcels would simply flow around it through Moonbrook.
At the control room, Bleep would check the numbers as parcels arrived. If 17 of 40 was missing, he would ask Snowpeak to send just that one again. Then he would put them all in order.
They tried it with Snowpeak's results. Forty parcels shot out across the bridges in different directions, some arriving early, some late, one lost on the way. Bleep spotted the gap, asked for it again, and a moment later all forty were in order on his screen.
"Packets," said Memoon, yawning enormously. "With addresses. And protocols, so everyone follows the same rules."
Simbha gave a great rumbling purr of relief. Then a messenger owl landed beside him, a little out of breath. "Guardian! People across Memunic are getting messages saying they've won free tickets to the Grand Final. All they have to do is type in their secret gate passwords..."
Simbha's purr turned instantly into a growl.
❓ Check Your Knowledge
- What is the difference between a LAN and a WAN? Give an example of each.
- Give one advantage of a wired connection and one advantage of Wi-Fi.
- What is an IP address? Which of these is a valid IPv4 address: 192.168.1.300 or 10.0.0.5? Explain.
- What is a packet? Name three things found in a packet's header.
- Why can packets arrive out of order? How does the receiving computer fix this?
- Give two advantages of packet switching over sending a message as one whole piece.
- What does a router do? What is a hop?
- What is a protocol? Match each protocol to its job: TCP, IP, DNS, HTTPS.
- Why might an online game use UDP instead of TCP?
- Explain the difference between bandwidth and latency using the road analogy.
- Challenge: Put these steps in the right order: (a) routers forward packets hop by hop; (b) DNS gives back the IP address; (c) the browser draws the page; (d) you type a web address; (e) TCP puts the packets in order; (f) the server sends the page as packets.
📚 Word Bank
- LAN / WAN: a local area network (one building) / a wide area network (a large area).
- Ethernet: a standard for wired network connections using cables.
- Wi-Fi: a way of connecting devices to a network using radio waves.
- ISP (Internet Service Provider): a company that connects homes and businesses to the internet.
- IP address: a number that identifies a device on a network.
- IPv4 / IPv6: the older four-number address format / the newer, much longer format.
- Packet: a small piece of data sent across a network, with a header and a payload.
- Header: the part of a packet holding addresses and a sequence number.
- Payload: the part of a packet holding the actual data.
- Packet switching: sending data as independent packets that may take different routes.
- Router: a device that forwards packets towards their destination.
- Hop: one step of a packet's journey from one router to the next.
- Protocol: an agreed set of rules for communication.
- TCP/IP: the main protocols of the internet: IP for addressing and routing, TCP for reliable, ordered delivery.
- DNS (Domain Name System): the system that turns website names into IP addresses.
- HTTP / HTTPS: the protocols for requesting and sending web pages; HTTPS is encrypted.
- Bandwidth: how much data a connection can carry per second.
- Latency: how long data takes to travel from one place to another.
- Ping: a tool that measures latency; also the time it reports.
Keep learning with Byte by Byte
Explore Book 5: Games, Spreadsheets and Networks. Find the ebook, purchase details and teaching slides on MemuniCity.
Comments
Post a Comment