Lesson 4: Postcards on the Wire — Packet Switching, Routing, and Throughput Rates

Time: 50 minutes

Unit: Binary, Pixels, Logic Gates, and Packet Switching | Previous: Lesson 3 | Next: Lesson 5

Goal

Simulate splitting a message into numbered packets, route packets around a failed network link, reassemble out-of-order packets using header sequence numbers, and calculate network unit rates (packets per second and bits per second).

Materials

Steps

1. Opening (5 min): One Giant Scroll vs. Numbered Postcards

Ask the class: - "Suppose you want to mail a 300-page book to a friend, but the postal tube can only hold 1 page at a time, and 20 other classmates are also sharing the same highway. What happens if one person reserves the entire highway for 10 minutes to send their whole book in one piece?" - Contrast circuit reservation (everyone else waits in line; if a tree falls across the road halfway through, the whole book fails) with packet switching (chopping the data into small numbered blocks called packets that take turns sharing the links and can detour around a broken road).

2. Main Activity (20 min): The 6-Node Classroom Router Mesh

Arrange 6 desks (A, B, C, D, E, F) with yarn links matching this network map:

    [Node B] -------- [Node D]
    /      \          /      \
[Node A]   (link)  (link)   [Node F]
    \      /          \      /
    [Node C] -------- [Node E]

Links available: - A–B, A–C - B–C, B–D - C–D, C–E - D–F, E–F

Step-by-Step Simulation

  1. Sender (Node A) wants to send the 16-character message "FUNGI GROW FAST!" to Receiver (Node F), but each packet payload can hold at most 4 characters (32 bits).
  2. Node A splits the message into 4 packets and fills out a Header on each card:
  3. Packet 1: From: A | To: F | Packet: 1 of 4 | Payload: "FUNG"
  4. Packet 2: From: A | To: F | Packet: 2 of 4 | Payload: "I GR"
  5. Packet 3: From: A | To: F | Packet: 3 of 4 | Payload: "OW F"
  6. Packet 4: From: A | To: F | Packet: 4 of 4 | Payload: "AST!"
  7. Round 1 (Normal Routing — 1 Hop per Step): Assume a synchronized step-by-step scenario where each link hop takes 1 step (1 second) and Node F logs simultaneous arrivals from Node D before Node E. Node A sends Packet 1 along A -> B -> D -> F (3 steps) and Packet 2 along A -> C -> E -> F (3 steps), so Packets 1 and 2 arrive at Node F first (logged as Packet 1, Packet 2).
  8. Round 2 (Sending Packets 3 & 4 + Link Failure!): Next, Node A sends Packet 3 to Node B and Packet 4 directly to Node C. Just as Packet 3 arrives at Node B, place the red "LINK DOWN" card on link B–D!
  9. Does Node B throw Packet 3 away? No! Node B inspects its remaining working links, sees B–C is still up, and reroutes Packet 3 along B -> C -> E -> F (4 hops total from A). Meanwhile, Packet 4 travels directly along A -> C -> E -> F (3 hops total, with no queue delay at C or E because it is 1 step ahead of rerouted Packet 3).
  10. Out-of-Order Arrival at Node F (in This 1-Second-per-Hop Scenario): In this scenario where every hop takes 1 second, Packet 4 completes its 3-hop path (A -> C -> E -> F) one step before rerouted Packet 3 completes its 4-hop detour (A -> B -> C -> E -> F). (Note: On real networks, arrival order depends on link delays, bandwidth, and router queues—not hop count alone!) Thus Node F receives the cards in the order: Packet 1, Packet 2, Packet 4, Packet 3 ("FUNGI GRAST!OW F" if read blindly!).
  11. Node F uses the Packet # of 4 header field to sort them back into 1, 2, 3, 4 → "FUNGI GROW FAST!".

3. Connecting to Grade 6 Ratios & Unit Rates: Network Throughput (10 min)

Work through a concrete rate calculation on the board: - Suppose each packet carries 32 bits of header + 32 bits of payload = 64 bits per packet. - If a router link transmits 300 packets in 6 seconds: 1. Packet rate (unit rate): 300 packets ÷ 6 seconds = 50 packets per second. 2. Bit rate (throughput): 50 packets/second × 64 bits/packet = 3,200 bits per second. 3. Header overhead ratio: In every 64-bit packet, 32 bits are header and 32 bits are payload (32 : 64 = 1 : 2, or 50% header overhead). If we increase the payload to 192 bits while keeping the same 32-bit header (224 bits total), the header overhead drops to 32 : 224 = 1 : 7!

4. Student Practice & Closing Check (15 min)

Practice Tasks (4.1 – 4.8)

  1. Task 4.1: A 20-character message ("MEET AT THE LIBRARY!") is split into packets that hold at most 4 characters per payload. How many packets are needed, and what is the exact 4-character payload of Packet 3 of 5? (Count spaces as characters!)
  2. Task 4.2: Receiver Node F receives five packets in the arrival order:
  3. Packet 4 of 5: "RKS!"
  4. Packet 2 of 5: "ING "
  5. Packet 5 of 5: " :)"
  6. Packet 1 of 5: "ROUT"
  7. Packet 3 of 5: "WO" Reassemble the original message in order.
  8. Task 4.3: What would happen at Node F if Packet 3 of 5 was accidentally dropped on the floor and never arrived? How does the header "Packet # of 5" help Node F know specifically which piece to request again?
  9. Task 4.4 (Hop Count on the Network Map): Using the 6-node map (A–B, A–C, B–C, B–D, C–D, C–E, D–F, E–F), what is the minimum number of link hops from A to F when all links are working? List all 3-hop paths from A to F.
  10. Task 4.5 (Rerouting Around Failure): If both link B–D and link C–E fail at the same time on the 6-node map, is there still a working path from A to F? If so, write the exact node sequence and count its hops.
  11. Task 4.6 (Unit Rate — Packets per Second): A classroom switch forwards 420 packets in 14 seconds. What is its unit rate in packets per second? At that same rate, how many packets will it forward in 25 seconds?
  12. Task 4.7 (Unit Rate — Bits per Second): Each packet on a sensor network is 80 bits long (16 header bits + 64 payload bits). If the sensor transmits 40 packets per second, what is the total transmission rate in bits per second? How many of those bits per second are actual sensor payload?
  13. Task 4.8 (Header-to-Total Ratio): In Task 4.7 (16 header bits and 64 payload bits, 80 bits total per packet), write the ratio of payload bits to total bits in simplest whole-number form.

Complete Answer Key (Tasks 4.1 – 4.8)

Vocabulary

Differentiation

Safety

Ensure yarn links are taped across desk tops rather than stretched across floor walkways where students could trip.

Teacher notes