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.
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.
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 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.
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.
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 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.
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
- 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
- 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.
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.
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.
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.
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.
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.
1. Explain the role of DNS in accessing a website, stating what would happen if DNS servers were all unavailable.
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.
2. Describe the difference between a MAC address and an IP address. Explain why both are needed in a network.
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).
Practice what you've learned
Three levels covering IP addresses, DNS, and packet switching.