Networks - Lesson 4
Lesson 4 of 6 Networks Series

The Internet & How Data Travels

Understand IP addresses, MAC addresses, DNS and packet switching. Walk through the complete journey of data from your browser to a web server and back - step by step.

GCSE and A-Level 6 sections Packet journey simulator + quiz

The Internet - A Network of Networks

Every time you visit a website, your device performs at least a dozen distinct operations before a single pixel appears on your screen. It translates a name into a number, splits your request into dozens of fragments, sends each fragment by a different route across multiple countries, and reassembles them in order at the destination - all in under 100 milliseconds.

Think about it: Your browser knows that "www.bbc.co.uk" is a website - but computers work with numbers, not names. How does your device find out which server to connect to, and how does it get there?

The internet is not a single network. It is a network of networks - millions of individual LANs, WANs, ISP networks and data centres connected together by a shared set of protocols. What makes the internet work is that every device agrees on the same rules for addressing, splitting and routing data.

IP address
A numerical label assigned to every device on a network, used to identify and locate it for data delivery.
MAC address
A unique hardware identifier built into every NIC at manufacture. Used to deliver data within a LAN (not across the internet).
DNS
Domain Name System - translates human-readable domain names into IP addresses.
Packet switching
Breaking data into small units (packets) that are sent independently across the network and reassembled at the destination.
Router
A device that forwards packets between networks, deciding the best route based on IP addresses and routing tables.
DHCP
Dynamic Host Configuration Protocol - automatically assigns IP addresses to devices when they join a network.

IP Addresses - The Internet's Addressing System

Every device on the internet needs a unique address so data can be delivered to the right place. An IP address serves this purpose - it is the internet equivalent of a postal address.

IPv4 address breakdown
192.168.1.254
192Octet 1
168Octet 2
1Octet 3
254Octet 4

An IPv4 address consists of 4 octets (8-bit groups), each ranging from 0 to 255, separated by dots. This gives approximately 4.3 billion possible addresses. A value of 256 or above in any octet is invalid.

IPv4
192.168.1.1
32-bit address (4 groups of 8 bits)
~4.3 billion unique addresses
Written as four decimal numbers (0-255) separated by dots
Running out of addresses - most public IPv4 addresses are now allocated
IPv6
2001:0db8:85a3::8a2e:0370:7334
128-bit address (8 groups of 16 bits)
~340 undecillion addresses (effectively limitless)
Written as eight groups of four hexadecimal digits
Designed to replace IPv4 as IoT devices consume more addresses

There are two types of IP address: public and private. Your router has a public IP address (assigned by your ISP) visible to the internet. Your devices at home each have a private IP address (e.g. 192.168.x.x), visible only within your LAN. The router uses NAT (Network Address Translation) to map between them.

A MAC address differs from an IP address in an important way. The MAC address is permanently assigned to the hardware (NIC) at manufacture - it never changes. The IP address is assigned by the network and can change. MAC addresses are used within a LAN (by switches) to deliver frames to the right device. IP addresses are used across networks (by routers) to route packets to the right destination.

IP vs MAC - a common exam question

IP address: Logical address assigned by the network. Can change. 32-bit (IPv4). Used by routers to route between networks.
MAC address: Physical address assigned at manufacture. Never changes. 48-bit. Written as 6 pairs of hex digits (e.g. 00:1A:2B:3C:4D:5E). Used by switches within a LAN.

DNS - The Internet's Phone Book

Humans remember names; computers work with numbers. DNS (Domain Name System) is the system that translates domain names like www.bbc.co.uk into IP addresses like 212.58.244.18 so your computer knows where to connect.

Think of DNS as a giant, distributed phone book for the internet. When you type a URL, your device asks a DNS server to look up the corresponding IP address. This happens automatically and takes only milliseconds.

1
Check local cache
Your browser checks if it already has the IP address stored from a previous visit. If found, the lookup ends here (very fast - no external request needed).
2
Query the recursive resolver
If not cached, your device asks your ISP's DNS resolver. The resolver acts on your behalf, querying the DNS hierarchy.
3
Root name server
The resolver contacts a root server, which directs it to the right Top-Level Domain (TLD) server for ".uk" domains.
4
TLD name server
The TLD server (for .uk, .com etc.) directs the resolver to the authoritative name server for "bbc.co.uk".
5
Authoritative name server responds
The authoritative server holds the actual DNS records for bbc.co.uk and returns the IP address: 212.58.244.18.
6
Connection established
The IP address is returned to your device. Your browser now connects directly to 212.58.244.18 and requests the webpage. The result is cached locally for next time.

Packet Switching

Sending a large file across the internet as one continuous stream would be inefficient and unreliable. Instead, the internet uses packet switching: data is broken into small units called packets, each sent independently across the network.

Each packet contains the actual data (the payload) plus a header containing routing information. Routers read the header to decide where to forward each packet. Different packets from the same message may take completely different routes, all arriving at the destination where they are reassembled in order.

Anatomy of a data packet

Sequence number The order this packet appears in the full message. Used for reassembly.
Source IP IP address of the sending device. Needed for the response.
Destination IP IP address of the receiving device. Routers use this to forward the packet.
TTL Time to Live - decremented at each router. Prevents packets looping forever.
Payload (data) The actual chunk of data being carried - typically 1500 bytes maximum per packet.
Advantages of packet switching
  • Efficient - network resources are shared, not dedicated to one connection
  • Fault tolerant - if one route fails, packets automatically re-route
  • Scales well - millions of simultaneous communications share the same infrastructure
  • Error detection - corrupted packets can be re-requested individually
Challenges of packet switching
  • Packets may arrive out of order and must be reassembled
  • Header overhead - each packet carries extra routing data
  • Variable delay (latency) - different routes have different speeds

The Complete Journey - What Happens When You Visit a Website?

Every web page load involves a specific sequence of events. Understanding this end-to-end flow is a common extended-answer exam question. Step through the complete journey below.

Website Request Journey Simulator
Step through what happens when you type a URL and press Enter.
https://www.bbc.co.uk
Order the Events
Drag each term to the correct category: IP address, MAC address, DNS, or Packet.
Assigned by the network
Translates domain names to IP addresses
Permanently set at manufacture
Contains a sequence number for reassembly
Used by routers to forward data between networks
Written as 6 pairs of hexadecimal digits
Uses a hierarchy of name servers
Different ones can take different routes across the internet
IP Address
MAC Address
DNS
Data Packet
Interactive Tool

IP Address Binary Converter

Type any valid IPv4 address and see each octet converted to its 8-bit binary representation in real time. The bit-weight row shows you exactly how binary place values work.

Try:
Interactive Tool

Packet Routing Simulator

Choose a source and destination node, then watch a packet travel the optimal route. Break a link to see the packet automatically rerouted. This demonstrates how the internet handles fault tolerance through dynamic routing.

Click a link (edge) to break it • Click again to restore
Routing log will appear here...

Putting It All Together

The internet's operation combines all the concepts from this lesson into one seamless system. A key exam skill is being able to explain any one part of this system clearly, with accurate terminology and the right level of detail.

The Internet in one paragraph

When you visit a website, your device first checks its DNS cache or queries a DNS resolver to translate the domain name into an IP address. Your device then creates a request, which is split into data packets by TCP. Each packet is given a header containing source/destination IP addresses, a sequence number and a TTL. Routers across the internet read each packet's destination IP and forward it toward its destination, each packet potentially taking a different route. At the destination server, TCP uses the sequence numbers to reassemble the packets in the correct order, and the server sends back the requested data in the same packet-switched way.

Common 4-6 mark question: "Describe how packet switching works"

Structure your answer in three parts: (1) Breaking up: Data is divided into packets; each packet contains header information (source IP, destination IP, sequence number, TTL) plus the payload. (2) Routing: Each packet is sent independently; routers read the destination IP and forward each packet toward the destination; different packets may take different routes. (3) Reassembly: At the destination, sequence numbers are used to reassemble packets in the correct order; if a packet is missing, it can be re-requested.

Lesson Quiz - 5 questions
Based on real exam question styles. Choose your answer to reveal instant feedback.
Question 1 of 5
What is the purpose of DNS?
Question 2 of 5
How does an IPv4 address differ from an IPv6 address?
Question 3 of 5
Why might two data packets from the same file take different routes across the internet?
Question 4 of 5
What is the purpose of the TTL (Time to Live) field in a data packet?
Question 5 of 5
A device on a LAN has the IP address 192.168.1.45. What type of IP address is this, and can it be directly accessed from the internet?
0
/5
Extended thinking

1. Explain the role of DNS in accessing a website, stating what would happen if DNS servers were all unavailable.

Role of DNS: DNS (Domain Name System) translates human-readable domain names (e.g. www.google.com) into IP addresses (e.g. 142.250.187.36) that computers use to locate servers. Without DNS, users would need to type the IP address directly into their browser to visit any website.

The resolution process: When you type a URL, your device first checks its local DNS cache. If not found, it queries a recursive resolver (usually your ISP's DNS server), which queries root servers, then TLD servers, then the authoritative name server for that domain, and returns the IP address.

If DNS servers were unavailable: All domain name lookups would fail. Browsers would be unable to resolve domain names to IP addresses. Websites would become inaccessible by name - users could only visit sites if they knew and typed the exact IP address. In practice, this would make the internet unusable for most people, since virtually no one memorises IP addresses for websites they visit.

Note: DNS caching at browser and OS level means some sites would remain accessible briefly from cached records, but these expire (TTL) and would eventually fail.
Extended thinking

2. Describe the difference between a MAC address and an IP address. Explain why both are needed in a network.

MAC address: A 48-bit physical identifier permanently assigned to a NIC at manufacture. Written as 6 pairs of hexadecimal digits (e.g. 00:1A:2B:3C:4D:5E). Cannot normally be changed. Used by switches to deliver data to the correct device within a LAN.

IP address: A logical address assigned by the network (by a router/DHCP server). Can change. IPv4 is 32-bit, written as four decimal octets (0-255). IPv6 is 128-bit. Used by routers to route data between networks across the internet.

Why both are needed:
The internet uses two levels of addressing. Within your LAN, switches use MAC addresses to deliver data to the right physical device - they do not use IP addresses at this level. Between networks (across the internet), routers use IP addresses because MAC addresses are not globally unique beyond a single LAN and are not routable.

Analogy: IP address = city and street name (gets the data to the right building/network). MAC address = the specific room number (gets the data to the right device within that building/LAN).
Printable Worksheets

Practice what you've learned

Three levels covering IP addresses, DNS, and packet switching.

Recall
Addresses and Protocols
IP address anatomy, IPv4 vs IPv6, MAC address identification, DNS definition exercises.
Download
Apply
Packet Switching Tasks
Diagram packet headers, describe routing scenarios, trace DNS lookups, and explain what happens at each hop.
Download
Exam Style
Extended Explanation
6-mark questions on DNS, packet switching and IP vs MAC differences. Mirrors real exam question demands.
Download
Networks Flashcards
Review all Networks terms including IP, DNS, and packet switching with spaced-repetition flashcards.
Open Flashcards
Networks Lesson 4 - Teacher Resources
IP Addressing & Packets
Teacher mode (all pages)
Shows examiner notes on exam practice pages
Suggested starter (5 min)
Write "www.bbc.co.uk" on the board. Ask: "What does this actually mean to a computer?" Give students 60 seconds to discuss. Take a few ideas - students usually suggest it's the "address" of the website. Then reveal: "A computer has no idea what bbc.co.uk means. It only understands numbers. So who translates the name into a number, and what does that number look like?" This immediately motivates the need for both IP addresses and DNS, the two core concepts of this lesson.
Lesson objectives
1Explain the structure of an IPv4 address and state the valid range of each octet (0-255).
2Compare IPv4 and IPv6, explaining why IPv6 was introduced.
3Distinguish between a MAC address and an IP address, explaining the purpose of each.
4Describe the DNS lookup process including the role of name servers.
5Explain how packet switching works, including the purpose of headers and sequence numbers.
6Describe the complete journey of a web request from typing a URL to receiving the page.
Key vocabulary (board-ready)
IP address
A unique numerical label assigned to every device on a network, used to identify it and route data packets to it. IPv4 uses 32 bits; IPv6 uses 128 bits.
IPv4
The original IP addressing system. 32 bits written as four decimal octets (0-255) separated by dots. Provides approximately 4.3 billion addresses - now exhausted.
IPv6
The successor to IPv4. 128 bits written in hexadecimal. Provides 340 undecillion addresses. Introduced to solve IPv4 exhaustion.
MAC address
A permanent hardware address assigned to a NIC at manufacture. 48 bits written in hexadecimal. Used by switches within a LAN to direct frames. Unlike IP addresses, MAC addresses do not change.
DNS (Domain Name System)
Translates human-readable domain names (e.g. bbc.co.uk) into IP addresses that computers use to locate servers. Acts as the internet's phone book.
Packet
A small unit of data transmitted over a network. Contains a header (source IP, destination IP, sequence number, checksum) and a payload (the actual data).
Packet switching
A method of data transmission where messages are broken into packets that may take different routes across the network and are reassembled at the destination.
TCP vs UDP
TCP: reliable, ordered, error-checked delivery. Used for web, email, file transfer. UDP: faster, no delivery guarantee. Used for live video/audio streaming and gaming.
Suggested lesson plan (60 min)
0-5 min: Starter: "www.bbc.co.uk - what does this mean to a computer?" Reveal that computers only understand numbers, which motivates IP addresses and DNS. Define IP address and show the IPv4 format.
5-15 min: IP addresses - IPv4 structure, octet ranges, why IPv4 ran out, IPv6 as the solution. Students write out the IPv4 address of the school network (or a fictional one) and convert one octet to binary as a warm-up for Lesson 4's maths.
15-25 min: MAC vs IP addresses. Use the analogy: MAC is your name (fixed), IP is your postal address (can change when you move). Switches use MAC within the LAN; routers use IP to route between networks.
25-40 min: DNS - work through the lookup steps. Students sketch the DNS resolution process: browser cache, OS cache, DNS resolver, root server, TLD server, authoritative server. Then the Packet Journey Simulator: work through steps 1-8 as a class.
40-52 min: Packet switching and the TCP vs UDP comparison. Students complete the TCP/UDP comparison table in their notes. Then the interactive quiz and one think-deeper question under timed conditions.
52-60 min: Exit ticket. Address the most common wrong answer. Students write the three most important things to remember about packet switching on a sticky note.
Discussion prompts
Your phone has an IP address at home and a completely different one when you connect to school Wi-Fi. But your MAC address never changes. Explain why this is, and describe exactly what role each address plays when you load a web page from your phone at school.
DNS has many layers of caching (browser, OS, resolver). This means that if a website changes its IP address, some users may still be directed to the old address for hours or days. What are the implications of this for website migrations and security? How is this problem managed in practice?
A 4K video file is 20 GB. If it is sent as a single continuous stream instead of packets, what problems could occur if one section of the transmission fails? How does packet switching solve this, and why does TCP matter more than UDP for file delivery?
In a video call, using TCP would cause the call to pause and wait every time a packet is lost. UDP just drops lost packets. From a user experience perspective, which is better for a call: a brief silence (packet dropped by UDP) or a call that pauses and jumps (TCP retransmission)? Justify your answer.
Common misconceptions
X"IP and MAC addresses do the same thing" - MAC addresses identify hardware within a LAN (used by switches at layer 2). IP addresses identify network location across the internet (used by routers at layer 3). They operate at different layers and serve completely different purposes. They are not interchangeable.
X"DNS finds the actual content of a website" - DNS only translates the domain name to an IP address. The actual webpage content is then fetched separately via HTTP/HTTPS using that IP address. DNS is a directory service, not a content delivery service.
X"All packets from a file take the same route" - packet switching explicitly allows different packets to take different routes. This is a key feature and an advantage, enabling resilience. Students must not describe it as a problem or flaw.
X"An IPv4 octet can be any number" - each octet must be 0-255. An address with 256 in any position (e.g. 192.256.1.1) is invalid. This is because each octet is exactly 8 bits, and the maximum 8-bit value is 11111111 = 255.
Exit ticket questions
State the number of bits in an IPv4 address and give one example of a valid IPv4 address.
[2 marks - 32 bits; any address where each octet is 0-255, e.g. 192.168.1.1]
Explain why sequence numbers are included in data packets.
[2 marks - packets may arrive out of order as different packets can take different routes; sequence numbers allow the receiving device to reassemble them in the correct order]
Describe two differences between a MAC address and an IP address.
[4 marks - MAC: permanent/set at manufacture, 48-bit written in hex, used within LAN by switches. IP: assigned by network/can change, 32-bit (IPv4) written in decimal, used between networks by routers. 1 mark per valid difference up to 4]
Explain why UDP is preferred over TCP for live video streaming.
[2 marks - UDP does not wait for lost packets to be retransmitted, so the stream continues with minimal delay; in live video, a brief drop in quality is preferable to the stream pausing to recover a lost packet]
Homework idea
Students trace a complete web request in writing: "You type 'codebash.co.uk' into your browser and press Enter. Describe every step that occurs from that moment until the web page appears on your screen, in as much detail as you can. Include DNS, IP addressing, packet switching, TCP/IP, and routing." Students bring their written trace to the next lesson. Pairs compare traces and identify any steps the other person missed. The class produces a master trace on the board. Award 1 mark per accurate, specific step up to 12.
Classroom tips
The Packet Journey Simulator is most effective when students are asked to predict what will happen at each step before clicking. Pause after step 3 (DNS lookup) and ask: "Why does this step have to happen before anything else?" The dependency chain is the key insight.
The MAC vs IP distinction is best taught with a physical analogy: MAC is like your national insurance number (permanent, identifies the person/device), IP is like your home address (changes when you move, identifies the location). Routers care about location (IP); switches care about identity within the room (MAC).
IPv4 exhaustion is a good real-world hook. Ask: "How many devices do you own that connect to the internet?" Count through phones, tablets, laptops, smart speakers, TVs, games consoles. With 8 billion people on the planet, the 4.3 billion address limit becomes viscerally obvious.
When teaching TCP vs UDP, avoid saying "TCP is better". The correct framing is "each protocol is better for a different purpose." Students should always justify the choice in context: "TCP is better for file transfer because lost packets corrupt the file; UDP is better for live streaming because the delay from retransmission is worse than a dropped frame."