Ever wondered where the internet actually lives? It is not floating in a magical digital cloud. It is a massive, real-world web of glass cables lying on the dark ocean floor, linking millions of humming computers across the globe.
Words to own
- Network
- Two or more computers physically connected so they can share data and talk to each other.
- Packet
- A small chunk of a larger message that is sent across a network.
- IP Address
- A unique number that identifies every single device connected to the internet.
- Server
- A powerful computer that sits waiting to send website data when another computer asks for it.
- DNS (Domain Name System)
- The internet's giant phone book that turns friendly names like google.com into numerical IP addresses.
- Fibre-optic Cable
- A physical glass pipe that carries internet data as flashes of light at incredible speeds.
The Internet is Under Your Feet (and the Sea)
When you send a message, it doesn't float through the air to a cloud. It travels through physical copper wires and glass cables.
Many of these cables are as thick as garden hoses and lie on the muddy ocean floor. They connect New Zealand to Australia, America, and the rest of the world using beams of light! This physical network of connected computers is what we call the internet.
- Step 1
Step 1: The DNS Lookup
You type a website name. Your computer asks the DNS server to translate it into an IP address.
- Step 2
Step 2: Sending the Request
Your computer sends a request to that IP address, asking for the website files.
- Step 3
Step 3: Chopping into Packets
The web server splits the website files into small, numbered packets.
- Step 4
Step 4: The Sea Voyage
Packets speed through undersea fibre-optic cables, sometimes taking different routes.
- Step 5
Step 5: Reassembly
Your computer puts the packets back in order. If any are missing, it asks for them again.
- Step 6
Step 6: Rendering
Your web browser paints the reassembled packets onto your screen as a finished webpage.
Breaking Messages into Packets
A website or a video is far too big to send in one single go. If something went wrong halfway through, you would have to restart the whole download!
Instead, computers chop data into tiny pieces called packets. Each packet gets a label with its destination and where it came from.
message = "HELLO FROM NEW ZEALAND"
packets = message.split(" ")
print("Original Message:", message)
print("Chipped into packets:")
for index, packet in enumerate(packets):
print("Packet " + str(index) + " contains: " + packet)Taking Different Roads
Packets are like cars on a busy highway. They do not have to travel together in a neat line.
If one cable is congested or broken, some packets will take a completely different route around the world. Because of this, they often arrive in the wrong order! The receiving computer uses the packet numbers to slot them back into the correct places.
received_packets = {
2: "ZEALAND",
0: "HELLO",
1: "NEW"
}
print("Unsorted packets in memory:")
print(received_packets)
clean_message = []
for i in range(3):
clean_message.append(received_packets[i])
full_sentence = " ".join(clean_message)
print("\nReassembled sentence:")
print(full_sentence)IP Addresses and the DNS Phone Book
Every device connected to the internet has a unique label called an IP Address. It looks like a long string of numbers, such as 192.168.1.1 or 2404:6800:4006:802::200e.
Imagine having to type a long number every time you wanted to search Google! To save us from memorising millions of numbers, we use the Domain Name System (DNS). The DNS is like a contact list on your phone: it matches human-friendly names (like google.com) to computer-friendly numbers.
The Client and Server Dance
Your device is the 'client' because it asks for things. The computer storing the website is the 'server' because it serves the data.
When you type a web address, your browser asks a DNS server for the IP address. Then, your browser sends a request directly to that IP address, the server packages up the page, and sends it racing down the undersea cables to you.
Your turn — run real Python
Packet Reorder Challenge
The packets of our message have arrived out of order! Write code to print them in the correct sequence to reveal the secret sentence.
Bug hunt
What is wrong with this code?
# We want to combine these packets into a web address part1 = "www." part2 = "google" part3 = ".com" # Something is wrong with this print line! print(part1 + Part2 + part3)
Myth-busting corner
MythThe internet works entirely through satellites in space.
TruthWhile satellites handle a tiny bit of remote data, over 95% of international internet traffic travels through physical glass cables laid deep along the ocean floor.
MythA website is sent from a server as one big, single file.
TruthWebsites are chopped into hundreds of tiny numbered packets. They travel independently, sometimes taking different routes, and are rebuilt by your computer.
Exam answer that scores full marks
Explain what happens between typing a web address and the page appearing on your screen.
When you type a web address, your browser asks a DNS server to translate the name into an IP address. Your device then sends a request across the network to the server at that IP address. The server chops the web page files into small, numbered packets and sends them back. These packets travel across physical network cables and may take different routes, sometimes arriving out of order. Your device reassembles the packets using their numbers, requests any that were lost, and your browser draws the finished page.
Why it scores
- Clearly explains the role of DNS in translating names to IP addresses.
- Mentions packets travelling independently across a physical network (not just 'the cloud').
- Details how the receiving computer handles out-of-order and missing packets to complete the page.