Teachers' Portal  /  A-Level Computer Science 9618  /  Communication and internet technologies  /  The TCP/IP protocol suite
Lesson pack · A-Level Computer Science 9618 · 14.1 · A Level (A2)

The TCP/IP protocol suite

Rules in layers. Two computers made by different companies, running different operating systems, on opposite sides of the world, can still exchange a web page in a fraction of a second.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Communication and internet technologies
Syllabus reference
Cambridge International AS and A Level Computer Science 9618, 14.1
Level
A Level (A2)
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 1 of 3 in Communication and internet technologies; leads into HTTP, FTP, POP3, IMAP, SMTP and BitTorrent
Central model
Fig. 1: going down the TCP/IP stack, each layer wraps the data from the layer above in its own header
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • Why protocols?: A protocol is to computers what a shared language plus a set of manners is to people: both sides must agree on it before any communication can happen.
  • A four-layer stack: In the lab, step through a web page request: watch each layer on the sender add its header and each layer on the receiver remove it.
  • From one host to another: The syllabus asks you to apply the stack to a message sent from one host to another across the internet.
Key points to leave on the board
  • Application: the program's protocol (HTTP, FTP, SMTP, POP3, IMAP, BitTorrent).
  • Transport: segments, port numbers, sequence numbers, acknowledgements (TCP).
  • Internet: IP addresses and routing of packets between networks (IP).
  • Link: frames, MAC addresses and signals on one physical link (Ethernet, WiFi).
The core visual model

One picture every idea returns to

A protocol is a set of rules that governs communication between devices: the format of the data, how it is addressed, how errors are detected and what happens when they are. Without agreed protocols, devices from different manufacturers could not understand each other. TCP/IP is a protocol suite arranged as a stack of four layers: Application, Transport, Internet and Link. Each layer has its own job, uses the services of the layer below and provides a service to the layer above. On the way down the stack each layer adds a header (encapsulation); on the way up the receiver's layers remove them.

the TCP/IP stack: each layer adds its own header Application Transport Internet Link data (HTTP) TCP data IP TCP data frame IP TCP data sending: wrap the receiver works back up the stack, removing each header in turn
Fig. 1: going down the TCP/IP stack, each layer wraps the data from the layer above in its own header
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Rules in layers.. Two computers made by different companies, running different operating systems, on opposite sides of the world, can still exchange a web page in a fraction of a second. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: Why protocols?A protocol is to computers what a shared language plus a set of manners is to people: both sides must agree on it before any communication can happen.Whole class, then pairs
13 to 21 minTeach and check: A four-layer stackIn the lab, step through a web page request: watch each layer on the sender add its header and each layer on the receiver remove it. Project tab 7 of the lab (TCP/IP stack, step by step) and let a student drive it while the class predicts.Pairs
21 to 30 minTeach and check: From one host to anotherThe syllabus asks you to apply the stack to a message sent from one host to another across the internet. Model the worked example How many segments? on the board, one line at a time. Your turn: A router receives a packet. Up to which layer of the TCP/IP stack does it process the packet, and what does it read there?Anticipation / Reaction Guide
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 20 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in From one host to another, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Anticipation / Reaction Guide

Before the lesson, students mark five statements true or false. After the teaching they mark them again and justify any change of mind in one sentence each. The statements come from the examiner traps below.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
"A protocol lets computers communicate" is too vague for the mark.Say it is a set of rules and say why rules are needed: so that devices from different manufacturers or platforms interpret the data in the same way.
Do not mix up the addresses.Port numbers belong to the Transport layer, IP addresses to the Internet layer and MAC addresses to the Link layer.
Sequence numbers are added by the Transport layer, not by IP, and it is TCP at the receiver that reorders the data and requests lost segments.Return to From one host to another: ask a pair to state the correct version and show it on the lab before moving on.
Worksheet

The TCP/IP protocol suite: worksheet

6 questions, 20 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · explain[2 marks]

Explain why a protocol is essential for communication between two computers.

Q2 · recall[4 marks]

Name the four layers of the TCP/IP protocol suite, in order from the top.

Q3 · explain[3 marks]

Explain why the implementation of a protocol suite can be viewed as a stack.

Q4 · explain[4 marks]

Describe the function of the Transport layer when data is sent and received using TCP.

Q5 · calculate[2 marks]

A file of 10 000 bytes is sent using TCP. Each segment can carry a maximum of 1460 bytes of data. Calculate how many segments are needed and the number of data bytes in the final segment.

Q6 · apply[5 marks]

A user clicks a link in a web browser. Describe how the request is passed through the TCP/IP layers on the user's computer before it is sent.

Answer key and marking notes
Q1 · 2 marks
  • A protocol is a set of rules for transmitting data (format, addressing, error checking, timing).
  • Both devices must follow the same rules so they interpret the data in the same way, even if they are from different manufacturers or use different operating systems.
Q2 · 4 marks
  • Application
  • Transport
  • Internet
  • Link
Q3 · 3 marks
  • The protocols are arranged in layers, each with its own function.
  • Each layer only communicates with the layer directly above and below it / receives data from the layer above and passes it to the layer below.
  • So a layer can be changed or replaced without affecting the others.
Q4 · 4 marks
  • Splits the data from the Application layer into segments.
  • Adds a header with source and destination port numbers and a sequence number.
  • At the receiver, uses the sequence numbers to reassemble the segments in order.
  • Sends acknowledgements / requests retransmission of lost segments (reliable delivery).
Q5 · 2 marks
  • 10 000 / 1460 = 6.85, so 7 segments are needed.
  • 6 x 1460 = 8760; 10 000 - 8760 = 1240 bytes in the final segment.
Q6 · 5 marks
  • Application layer: the browser creates an HTTP request (GET) for the page.
  • Transport layer: TCP sets up a connection with the server and splits the request into segments.
  • Transport layer: adds port numbers and a sequence number to each segment.
  • Internet layer: IP adds the source and destination IP addresses to form packets.
  • Link layer: adds MAC addresses to form frames and transmits them as signals on the medium.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

Which list gives the four layers of the TCP/IP protocol suite in order, starting from the layer nearest the user's program?

  • AApplication, Transport, Internet, Link
  • BApplication, Internet, Transport, Link
  • CTransport, Application, Link, Internet
  • DApplication, Transport, Link, Internet
Q21 mark

A server computer runs both a web server and an email server. A segment arrives for it. Which value in the headers tells the computer which of the two server programs should receive the data?

  • AThe destination port number in the TCP header
  • BThe destination IP address in the IP header
  • CThe destination MAC address in the frame header
  • DThe sequence number in the TCP header
Q31 mark

A browser passes 7000 bytes of data to TCP. Each segment can carry at most 1460 bytes of data. How many segments are needed, and how many data bytes are in the last one?

  • A5 segments; the last one carries 1160 bytes
  • B4 segments; the last one carries 1460 bytes
  • C5 segments; the last one carries 1460 bytes
  • D4 segments; the last one carries 1160 bytes
Q41 mark

A school replaces the Ethernet cables in a classroom with WiFi. Why do the web browsers on the classroom computers not need to be changed?

  • AOnly the Link layer has changed, and each layer only deals with the layers directly above and below it
  • BThe browser works at the Internet layer, which is the only layer that WiFi does not use
  • CWiFi and Ethernet frames carry the same MAC addresses, so the browser sees no difference in the frames
  • DThe router converts the WiFi signals into HTTP requests before passing them to the browser
Q51 mark

A packet travels from a home computer to a web server through several routers. What happens to the headers at each router on the way?

  • AThe packet is put into a new frame with new MAC addresses, while its destination IP address stays the same
  • BThe destination IP address is replaced with the address of the next router, while the frame stays the same
  • CThe TCP header is replaced with a new sequence number, while the IP header stays the same
  • DEvery header is removed and the data is passed up to the router's Application layer
Q61 mark

These actions happen on the sending computer when a user requests a web page.
1: IP adds the source and destination IP addresses
2: the browser creates an HTTP GET request
3: the packet is placed in a frame with a MAC address and sent as signals
4: TCP splits the data into segments and adds port and sequence numbers
In which order do they happen?

  • A2, 4, 1, 3
  • B2, 1, 4, 3
  • C4, 2, 1, 3
  • D2, 4, 3, 1
Quiz key
Q1: A

From the top: Application (HTTP, SMTP and so on), Transport (TCP segments with port and sequence numbers), Internet (IP addresses and routing) and Link (frames, MAC addresses, signals). Swapping Transport and Internet puts IP above TCP, which is the wrong way round. Starting with Transport misses that the Application layer is on top, and putting Link above Internet would mean frames were built before the packets they carry.

Q2: A

Port numbers, added at the Transport layer, identify the application on a host (for example 80 for HTTP). The IP address and the MAC address identify the computer, which is the same for both programs. The sequence number puts the segments of one stream in order; it does not choose the program.

Q3: A

7000 / 1460 = 4.79, so four full segments (4 x 1460 = 5840 bytes) are not enough; the remaining 7000 - 5840 = 1160 bytes go in a fifth segment. Rounding 4.79 down to 4 loses data, and the last segment is only full if the total is an exact multiple of 1460.

Q4: A

Ethernet and WiFi are both Link layer protocols. Because the protocols form a stack in which each layer only interfaces with its neighbours, a layer can be replaced without changing the layers above, including the browser's HTTP. The browser works at the Application layer, not the Internet layer; the browser never sees frames at all; and a router forwards packets, it does not create HTTP requests.

Q5: A

A frame only crosses one physical link, so each router removes the old frame and builds a new one addressed to the MAC address of the next device. The destination IP address must stay the same so that every router can keep forwarding the packet towards the server. Routers do not read or change the TCP header, and they do not pass the data up to an Application layer.

Q6: A

Going down the stack: the Application layer creates the request (2), the Transport layer segments it and adds port and sequence numbers (4), the Internet layer adds the IP addresses (1) and the Link layer frames it and transmits it (3). Putting 1 before 4 puts IP above TCP; starting with 4 means TCP would have no data to split; and putting 3 before 1 would frame a packet that has no IP header yet.

Lab and demo

What to project

The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.