Ch 2 · 14 Communication and Internet Technologies · AS & A Level Computer Science 9618
Topic 2 of 2 in Data Representation and Communication — AS & A Level Computer Science 9618 — 79 lessons.
Introduction
When two computers communicate across the internet, they must agree exactly how data is formatted, addressed and checked. This lesson covers protocols and the TCP/IP stack, the main application protocols, and the two ways of carrying data across a network: circuit switching and packet switching. (Syllabus topic 14: sections 14.1–14.2.)
Key ideas — 14.1 (a) Why protocols are essential
A protocol is a set of rules that governs how data is transmitted between devices: the format of the data, how it is addressed, its timing and speed, error checking and correction, and how devices start and end a communication.
🧑🏫 Teacher's explanation
Imagine you are at an international airport. If one person speaks only Japanese, another only Swahili, and a third only French, they cannot coordinate a flight schedule. They need a 'protocol'—a shared set of rules, such as speaking English or using standardized hand signals—to ensure everyone understands the same information. In computing, if a MacBook sends data using one set of rules and a Windows PC uses another, the data becomes gibberish.
📖 Definitions
🔍 Worked example — Easy
Identify the layer in the TCP/IP suite responsible for end-to-end error checking and ensuring data reaches the correct application (e.g., via port numbers).
🔍 Worked example — Standard
A user wants to download a file from a remote server using a standard protocol. Which protocol should be used if the goal is specifically 'File Transfer'?
🔍 Worked example — Exam-style
A message is being sent from Host A to Host B. List the four layers of the TCP/IP suite in the order they are processed when the message is being *sent* (encapsulated).
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Identify the type of protocol being used. [1] (b) Explain one advantage of using this protocol compared to a traditional client-server model. [2] [3 marks]
Key ideas — 14.1 (b) Protocol stacks
Communication is split into layers, which together form a protocol stack. Each layer:
🧑🏫 Teacher's explanation
Imagine you are sending a physical gift to a friend in another country. First, you wrap the gift (Application layer: deciding what the gift is). Then, you put it in a box with a shipping label (Transport layer: deciding how to package it). Next, you hand it to a courier who decides which truck or plane to use (Internet layer: deciding the route). Finally, the truck driver follows the physical roads to the destination (Link layer: the actual movement).
📖 Definitions
🔍 Worked example — Easy
A message is being sent from Host A to Host B. At the Application layer, the data is 'Hello'. At the Transport layer, a header containing the port number is added. At the Internet layer, a header containing the IP address is added. At the Link layer, a header containing the MAC address is added. Describe the structure of the final data unit as it leaves the Link layer.
🔍 Worked example — Standard
Match the following protocols to their specific purpose: (1) SMTP, (2) FTP, (3) HTTP, (4) BitTorrent.
🔍 Worked example — Exam-style
Compare Circuit Switching and Packet Switching in terms of resource allocation. If a single continuous stream of data is being sent over a dedicated physical path, which switching method is being used?
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Explain the function of a router in a packet-switched network. [2] (b) Describe one advantage and one disadvantage of packet switching compared to circuit switching. [2] [4 marks]
Key ideas — 14.1 (c) The TCP/IP protocol suite
🧑🏫 Teacher's explanation
Imagine you are sending a long, complex LEGO castle to a friend via mail. You don't send the whole castle in one giant box; instead, you break it down into smaller bricks, put each brick in its own small envelope, and write the destination address on every single one.
📖 Definitions
🔍 Worked example — Easy
A user wants to download a large file from a remote server using a peer-to-peer protocol. Identify the specific application layer protocol used for this purpose and explain its fundamental characteristic.
🔍 Worked example — Standard
Compare circuit switching and packet switching in terms of efficiency and application. Which is better for a continuous voice call, and which is better for web browsing?
🔍 Worked example — Exam-style
Trace the journey of a data segment through the TCP/IP stack from sender to receiver. List the four layers in order and state the primary function of the Transport layer during reassembly.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Explain one advantage of packet switching over circuit switching for data-intensive applications. [2] (b) Describe the role of a router in a packet-switched network. [3] [5 marks]
Key ideas — 14.1 (d) Application protocols
BitTorrent spreads the load across many computers, so popular files download quickly without one central server being overloaded.
🧑🏫 Teacher's explanation
Imagine you are sending a physical gift to a friend in another country. You don't just throw the gift into the ocean. You follow a set of rules: you put it in a box (packaging), write the address on it (addressing), hand it to a courier (transport), and the courier uses roads or planes (routing). If everyone followed different rules—some writing addresses on the left, some on the right—the gift would never arrive. In computing, these 'rules' are protocols.
📖 Definitions
🔍 Worked example — Easy
Identify the most appropriate protocol for the following scenario: A user wants to download an email to their laptop and ensure that the email is removed from the mail server so it does not take up space.
🔍 Worked example — Standard
A user is using BitTorrent to download a large file. Describe the role of a 'tracker' and a 'seed' in this process.
🔍 Worked example — Exam-style
A message is being sent from Host A to Host B. Map the message through the 4 layers of the TCP/IP stack in the correct order of encapsulation.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
Key ideas — 14.2 (a) Circuit switching
In circuit switching, a dedicated path (circuit) between the sender and receiver is set up before communication starts, and is reserved for the whole communication. All data follows the same route, then the circuit is released.
🧑🏫 Teacher's explanation
Imagine you are booking a table at a busy restaurant for a private dinner. Once the reservation is made, that specific table is yours and yours alone for the entire evening. Even if you spend twenty minutes talking and not eating, no one else can sit there. This is exactly how circuit switching works: a physical or logical 'path' is reserved exclusively for your conversation.
📖 Definitions
🔍 Worked example — Easy
A circuit switching connection provides a constant bandwidth of 64 kbps. If a voice call lasts for 120 seconds, calculate the total amount of data that can be transmitted over this dedicated circuit.
🔍 Worked example — Standard
Compare the efficiency of a circuit switching connection versus a packet switching connection in a scenario where a user sends a 1 MB file over a 10 Mbps link, but only transmits for 1 second of a 10-second session.
🔍 Worked example — Exam-style
A network engineer is designing a system for real-time high-definition video streaming. They must choose between circuit switching and packet switching. Evaluate the choice of circuit switching for this specific requirement.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
Key ideas — 14.2 (b) Packet switching
In packet switching, the message is split into packets. Each packet has a header with the source and destination addresses, its sequence number, and error-checking data, and a payload (part of the message). Each packet is sent independently and may take a different route; at the destination, the packets are reassembled in order using the sequence numbers.
🧑🏫 Teacher's explanation
Imagine you want to send a massive 1,000-page book to a friend via the postal service, but you cannot fit the whole book in one box. Instead, you tear out every page, put each page in its own small envelope, and write the page number on the front. You drop them all in the mailbox. Some envelopes might go via a plane, others via a truck. They might arrive at your friend's house in a messy pile (page 5, then page 2, then page 1). Your friend looks at the page numbers, puts them in the correct order, and reconstructs the book. This is packet switching.
📖 Definitions
🔍 Worked example — Easy
A file is split into 5 packets. Each packet has a header of 40 bytes. The total size of the original file is 500 bytes. Calculate the total amount of data transmitted across the network.
🔍 Worked example — Standard
A message is sent via packet switching. The packets arrive at the destination in the following sequence: Packet 3, Packet 1, Packet 4, Packet 2. If the sequence numbers are n=1, 2, 3, 4, determine the order in which the payload must be reassembled.
🔍 Worked example — Exam-style
Compare Circuit Switching and Packet Switching for a high-bandwidth video streaming service. Which is more appropriate and why?
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Explain why the image file is divided into packets rather than being sent as a single continuous stream. [2] (b) Describe the role of a router in this process. [2] [4 marks]
Key ideas — 14.2 (c) Routers in packet switching
A router connects networks and forwards packets. For each packet, it:
🧑🏫 Teacher's explanation
Imagine you are sending a long, multi-page letter to a friend in another country, but instead of one big envelope, you tear each page out and put them in separate small envelopes. You write the destination address on every single envelope. You don't give them to one mailman; instead, you drop them in different postboxes. Each post office (a router) looks at the address, checks its local map (routing table) to see which road is currently least congested, and sends it to the next post office.
📖 Definitions
🔍 Worked example — Easy
A packet is sent from Host A to Host B. The packet header contains a Time to Live (TTL) value of 5. The packet passes through 3 routers before reaching the destination. What is the TTL value of the packet when it reaches the destination?
🔍 Worked example — Standard
A router receives a packet with a destination IP address of 192.168.1.50. The router's routing table contains the following entries:
🔍 Worked example — Exam-style
Compare Circuit Switching and Packet Switching in terms of efficiency and resource allocation. Which method is more suitable for modern internet traffic (bursty data) and why?
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
Worked example
Explain how an email is sent from a user's computer to a recipient on the other side of the world, using packet switching.
🔍 Worked example — Easy
Identify the correct protocol for the following scenarios: (a) Sending an email from a client to a server, (b) Retrieving an email from a server to a client, (c) Transferring a large file between two computers.
🔍 Worked example — Standard
A message is split into 4 packets. The sequence numbers are 1, 2, 3, and 4. If packet 3 is lost during transmission, describe the role of the Transport Layer (TCP) in ensuring data integrity.
🔍 Worked example — Exam-style
Compare Circuit Switching and Packet Switching in terms of efficiency for bursty data traffic (data that comes in irregular bursts).
⚠️ Common errors
Common mistakes
Practice
Answers: (1) They set the rules for data format, addressing, timing and error checking, so that different devices and software can communicate reliably. (2) Any two: layers can be changed independently; complex communication is divided into manageable parts; manufacturers can produce compatible products for each layer. (3) It splits the data into packets with sequence and port numbers, sets up the end-to-end connection, and at the receiver reassembles the packets in order, checks for errors and requests lost packets. (4) IMAP: emails stay on the server and are synchronised, so all three devices show the same messages. (5) The file is split into pieces; a tracker tells the peer which other peers have pieces; it downloads different pieces from many peers at the same time and uploads its pieces to others. (6) Benefit: e.g. data arrives in order with a constant rate; drawback: e.g. bandwidth is wasted when idle / the circuit must be set up first; used for traditional telephone calls. (7) It reads each packet's destination IP address, checks its routing table for the best route, and forwards the packet to the next router (hop) towards the destination.