← Teacher guide

Packets

A full 5E lesson (AC9TDI8K02 node 2). Students write what they think will go wrong, watch a message go to pieces on the board (no fixes, nothing named), invent their own fix with two plain switches (Numbers, Ask again) and find a second fix by avoiding busy router C. Only then do they explain it in their own words and meet the names: packet, router, acknowledgement, TCP. Elaborate takes the idea to broken links and live video.

Networks · Moving data · about 45 minutes · Open the student lesson

Classroom resources

Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Engage 5 min · Explore 15 min · Explain 12 min · Elaborate 8 min · Evaluate 5 min

Before class

This is inquiry first (5E): students explore and invent before anything is explained. The words packet, acknowledgement and TCP appear only in Explain, after students have written their own explanation. If you usually teach explicitly, this is the lesson to try the difference.

Try both Explore boards yourself. The first has no fix: Ali always gets a jumbled message with a gap. The second has two switches, Numbers and Ask again (TCP, not yet named); the goals can be met two ways (both switches with every link working, or no switches with C cut off).

Engage works well unplugged first: cut MEET AT NOON into four strips with no numbers, hand them out across the room, have students pass them to an "Ali" by different paths, and keep one strip "lost". Ask Ali to read out what arrived. Then have students write their guesses.

Explain: let students write first, then share two or three explanations before anyone opens Give it names. Then name each part of what they did on the projector, and reveal the worked lines. The "Explain it to me" drawer opens once Engage is answered and uses the names, so ask students to leave it until after Explain.

Simplifications: real packets carry about 1500 bytes, and real TCP uses acknowledgement numbers and timers; the board waits until everything else has arrived before asking again. Without numbers the board's Ask again gives up, since TCP needs sequence numbers to know what is missing. Router C is set to be busy (slow, and it loses the second packet).

Review: open the next lesson with a quick question on this one, and this one with one on Wired or wireless (which link loses the most packets?).

Links: Secret messages' checksum lesson is how a receiver tells a packet was damaged.

Running the lesson

  1. Engage: read a few guesses aloud without judging. Note who pictures one pipe.
  2. Explore, first board: ask what they saw, not why. Push on the sort: did they see the routers sort anything?
  3. Explore, invent a fix: ask what Ali's computer would need on each piece. When Numbers shows a gap, ask how it could get the missing piece.
  4. Explore, switches off: if nobody thinks of breaking links, ask where the trouble starts.
  5. Explain: students write before the names. Share two explanations, then name each part.
  6. Two fixes: ask whether you would always know which router is busy.
  7. Elaborate: ask why a network has spare links, and who would rather have a glitch than a freeze.
  8. Evaluate: have students reread their Engage guess and say one thing they would change.

The hard part (on purpose)

Students expect the network to be one pipe, and want to be told the fix. Let Explore stay open: the first board has no fix on it, and the second asks them to invent one. Hold back the words packet and TCP until Explain; the names stick when they label something students already did.

When students get stuck

What you will seeA question to askThe fix
A student says the whole message is resent (Sam's mistake).Which pieces did Ali's computer confirm?Only the unconfirmed one is sent again.
A student thinks the routers reorder packets.On the first board, did anything on the way sort the pieces?Nothing on the way does. The receiver does, using the numbers.
A student switches on Ask again first and it doesn't help.How would Ali's computer know which piece to ask for?It can't without numbers. Switch Numbers on too.
A student is stuck on the switches-off fix.Where does the trouble start? Can you stop pieces going there?Break the link from C to E.

Answers to the checks

  1. Engage: one message, many pieces: The internet never sends a message in one piece. MEET AT NOON is chopped into 4 pieces, and each piece finds its own way to Ali through routers, some of them busy. What could go wrong on the way? Write your best guess.
    The pieces took different routes, so they arrived in a different order, and one was lost at busy router C. With nothing but letters on them, Ali's computer just joined them in the order they came.
  2. Watch the pieces: Send the message at least three times. Follow the pieces: which way does each one go, and what does Ali get?

    The same thing happens every time: the pieces split up at the first routers, one goes missing at C, and the rest arrive in a different order from how they left.
  3. What did you see?: Sort what you saw on the board.
    The pieces took different routes to Ali → I saw this; A piece went missing at router C → I saw this; The pieces arrived in a different order from how they left → I saw this; The routers put the pieces back in order → I didn't see this; Ali's computer showed where a piece was missing → I didn't see this; The missing piece was sent again → I didn't see this
    Pieces go their own ways, can be lost, and arrive in any order. Nothing on the way fixes that, and Ali's computer has nothing to fix it with.
  4. Try your own changes: Try your own changes: a different piece size, or click a link to break it. Send after each change. What makes things better, and what makes them worse?

    Smaller pieces just make more pieces to jumble. Breaking links changes the routes: if no piece can reach busy C, the message gets through. Keep that in mind for the next board.
  5. Keep every link: Get MEET AT NOON to Ali exactly, with every link working and router C still busy. Use the switches however you like.

    Numbers let Ali's computer put the pieces in order and see that number 2 was missing. Ask again had it confirm each piece it got, so the one never confirmed was sent again.
  6. Switches off: Now find a different way, with both switches off.

    With C cut off, every piece took the same route through D, so they arrived in order and none was lost.
  7. Explain it yourself: In your own words: how did your first fix get the whole message to Ali, in order, with every link working? Say what each piece carried and what Ali's computer did.
    Each piece carried a number as well as its letters. (so Ali's computer knows where each piece goes); Ali's computer put the pieces in order by their numbers. (they took different routes, so they arrived in a different order); It confirmed each piece it got, and saw that number 2 was missing. (a gap in the numbers shows what was lost); Only piece 2 was sent again. (it was the only piece never confirmed)
    Numbers put the pieces in order and show the gap; confirming each piece means only the one never confirmed is sent again.
  8. Give it names: Match each name to what you did on the board.
    Packet → A. A piece of the message, with its number and where it is going; Router → B. A computer on the way that passes each piece on; Acknowledgement → C. Ali's computer confirming a piece arrived; TCP → D. The rules your Ask again switch followed: confirm each piece, send again any that isn't confirmed
    Your Numbers and Ask again switches are how TCP works: numbered packets, acknowledged by the receiver, with unacknowledged ones sent again.
  9. Two fixes: Your second fix, cutting off router C, also worked, with no numbers at all. Why does the internet use numbers and resending instead?
    Nobody knows ahead of time which router will be busy or which link will break, so every message needs a way to recover
    You could avoid C because you could see it was busy. Real networks change all the time, so the receiver needs a way to fix whatever happens: numbers and acknowledgements.
  10. Find the mistake: Sam explains what happens to a lost packet. Click the line where it first goes wrong.
    line 3
    Line 3: with TCP, the receiver confirms each packet it gets. Only the packet that was never confirmed is sent again, not the whole message.
  11. Roadworks: Roadworks cut the cable from D to E. Click that link to break it, then send. Now every packet has to go through busy C. Does Ali still get the message?

    Every packet went through C, and packet 2 was lost there, but TCP had it sent again. Spare routes and resending together keep the network working.
  12. Cut off: How much can break before Ali is cut off? Break links until nothing can reach Ali, then try to send.

    With every route broken, nothing gets through, however good TCP is. That is why networks are built with spare links.
  13. Video calls: A live video call doesn't wait for lost packets: it doesn't use TCP. A packet goes missing during a call. What do you notice?
    A small glitch, and the call carries on
    On a live call a late packet is useless, so it is skipped and you see a glitch. For a file or a message, TCP waits for the missing packet, because every piece matters.
  14. Downloads: A download sits at 99% for a few seconds, then finishes. What was probably happening?
    A few packets were lost, and the computer was waiting for them to be sent again
    TCP waits until every packet has been acknowledged. A few lost near the end means a short wait while they are sent again.

Solutions

One possible solution for each task. Other correct programs are fine.

Elaborate: when the network breaks › Roadworks

Open task: any program that does what the step asks.

Elaborate: when the network breaks › Cut off

Open task: any program that does what the step asks.

Elaborate: when the network breaks › Video calls

Open task: any program that does what the step asks.

Stretch and support

Stretch: Video calls often use UDP, which never resends lost packets. Why is that better for a live call than waiting for a resend, and worse for downloading a file?

Support: Give the five words with a picture each: packet, number, router, route, acknowledgement.

Exit ticket

A message is split into 5 packets and packet 3 is lost. What does TCP do, and how does the message end up in order?

The receiver never confirms packet 3, so the sender sends it again. The receiver puts the packets in order by their numbers.

What each step is for

Where it leads

Next: Who can see your data? (packets pass through routers you don't control).

Code links: micro:bit radio sends short packets; Secret messages adds checksums to them.