The shape of the lesson
By the end of the lesson, learners can
- 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.
- 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).
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.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open 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 min | Teach 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 min | Teach and check: 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. 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 min | Teach and check: 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. 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 min | Check | The 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 min | Plenary | The 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 min | Exit and homework | Set the worksheet below (6 questions, 20 marks). Learners self-assess against the objectives before they leave. | Individual |
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.
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.
What to head off, and how
| Trap learners fall into | Teaching 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. |
The TCP/IP protocol suite: worksheet
6 questions, 20 marks. Written in the style of the papers; no past paper question is reproduced.
Explain why a protocol is essential for communication between two computers.
Name the four layers of the TCP/IP protocol suite, in order from the top.
Explain why the implementation of a protocol suite can be viewed as a stack.
Describe the function of the Transport layer when data is sent and received using TCP.
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.
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
- 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.
- Application
- Transport
- Internet
- Link
- 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.
- 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).
- 10 000 / 1460 = 6.85, so 7 segments are needed.
- 6 x 1460 = 8760; 10 000 - 8760 = 1240 bytes in the final segment.
- 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.
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.
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
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
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
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
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
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
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.
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.
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.
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.
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.
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.
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 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.