What happens when you open a web page? Choose a view in the title bar.
Journey. Play the five stages, or click one to replay it.
- DNS lookup. Your laptop knows the domain name (www.learnitwithme.com) but needs the server's IP address. It asks a DNS resolver (at your internet service provider), which answers 203.0.113.42. The answer is cached, so the next lookup is instant.
- Connect and request. TCP sets up a connection (the three-way handshake: SYN, SYN-ACK, ACK), HTTPS sets up encryption, then the browser sends an HTTP GET request.
- Split into packets. The server's TCP splits the page into packets. Each has a header: the source and destination IP addresses, and a sequence number (1 of 6, 2 of 6…), as well as the data (the payload).
- Routing. Each router reads a packet's destination IP address and forwards it to the next hop, choosing the best route at that moment. So packets of one message can take different routes and arrive out of order. A busy router may drop one.
- Reassembly. Your laptop's TCP puts the packets back in order by sequence number. It acknowledges what arrives; a packet with no acknowledgement is resent by the server. Then the browser shows the page.
Packet switching against circuit switching (the second toggle). In circuit switching (the old telephone network) a dedicated path is set up first, all the data follows it in order, and it's released at the end: no reassembly, a steady rate for live calls, but the path is reserved even when nothing is sent, and if a link fails the circuit is lost. Packet switching (the internet) shares every link: efficient, and packets route round a broken link, but they can arrive out of order or be delayed, so they need sequence numbers.
Load time. Bandwidth is how much data can be sent each second (megabits per second, Mbps). Latency is the delay before data arrives (milliseconds): a round trip takes 2 × latency. A page needs several round trips before any of it arrives (DNS, TCP, HTTPS, the request), then its transfer time: size × 8 ÷ bandwidth. So for a small page latency matters most, and for a big download bandwidth does: compare the three pages, and the "double the bandwidth" and "halve the latency" savings under each. Packet loss adds resends, each costing another round trip. The model is simplified (real TCP starts slowly and sends many packets before waiting), but the pattern is right.
Protocols are the agreed rules for communicating. The TCP/IP model has four layers: application (HTTP, HTTPS, FTP, SMTP, IMAP, POP3, DNS), transport (TCP), internet (IP) and link (Ethernet, WiFi). Click each one for what it does.
Common exam mistakes: saying the sender chooses the packets' routes (each router does, hop by hop); saying packets arrive in order (they're reordered by sequence number); mixing up bandwidth and latency, or thinking more bandwidth always speeds up a page; confusing SMTP (sending email) with IMAP and POP3 (fetching it); saying HTTPS is faster (it's more secure); forgetting that 1 byte = 8 bits in a transfer-time calculation; saying circuit switching uses bandwidth efficiently.
Objective: Cambridge International A Level Information Technology (9626), communications technology: how data is sent across networks (packets and their headers, routing, packet switching against circuit switching), bandwidth and latency, and the protocols HTTP, HTTPS, TCP/IP, FTP, SMTP, IMAP and POP3. DNS and IP addresses are also AS Level networks.
Where this fits
- AP: AP Computer Science Principles
- AQA: AQA A Level Computer Science (7517)
- Cambridge: Cambridge IGCSE Computer Science (0478); Cambridge A Level Computer Science (9618); Cambridge AS Level Computer Science (9618); Cambridge A Level Information Technology (9626) Goes beyond Cambridge IGCSE Computer Science (0478): TCP, circuit switching, bandwidth and latency go beyond 0478.
Goes beyond Cambridge AS Level Computer Science (9618): Circuit switching and TCP are A Level (14.1-14.2), not AS.
- IB: IB Computer Science HL; IB Computer Science SL; IB Digital Society HL; IB Digital Society SL
- NCEA Level 2 Digital Technologies: 91895 Use advanced techniques to develop a network; 91895 Use advanced techniques to develop a network
- Pearson Edexcel International: Edexcel International GCSE Computer Science (4CP0); Edexcel International GCSE ICT (4IT1); Edexcel International A Level Information Technology Goes beyond Edexcel International GCSE ICT (4IT1): DNS, TCP and packet routing go beyond 4IT1; bandwidth and latency are in it.
- USDP: USDP Computer Science