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
- 6 index cards ("Packet Postcards") per group of 6 students.
- Yarn or string pieces connecting 6 student desks as a 6-node router mesh (
Node A through Node F).
- Scissors or a red
"LINK DOWN" card to simulate a cut fiber-optic cable during the activity.
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
- 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).
Node A splits the message into 4 packets and fills out a Header on each card:
- Packet 1:
From: A | To: F | Packet: 1 of 4 | Payload: "FUNG"
- Packet 2:
From: A | To: F | Packet: 2 of 4 | Payload: "I GR"
- Packet 3:
From: A | To: F | Packet: 3 of 4 | Payload: "OW F"
- Packet 4:
From: A | To: F | Packet: 4 of 4 | Payload: "AST!"
- 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).
- 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!
- 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).
- 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!).
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)
- 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!)
- Task 4.2: Receiver
Node F receives five packets in the arrival order:
Packet 4 of 5: "RKS!"
Packet 2 of 5: "ING "
Packet 5 of 5: " :)"
Packet 1 of 5: "ROUT"
Packet 3 of 5: "WO"
Reassemble the original message in order.
- 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?
- 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.
- 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.
- 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?
- 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?
- 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)
- Answer 4.1:
20 characters ÷ 4 characters/packet = 5 packets. Splitting into 4-character blocks: Packet 1 = "MEET", Packet 2 = " AT ", Packet 3 = "THE ", Packet 4 = "LIBR", Packet 5 = "ARY!".
- Answer 4.2: Sorting by sequence number
1, 2, 3, 4, 5: "ROUT" + "ING " + "WO" + "RKS!" + " :)" = "ROUTING WORKS! :)".
- Answer 4.3: Because
Node F sees packets 1, 2, 4, 5 of 5, it immediately detects that Packet 3 is missing and only needs to ask Node A to re-send Packet 3, rather than re-sending the entire message.
- Answer 4.4: The minimum hop count is
3 hops. There are three 3-hop paths from A to F:
A -> B -> D -> F
A -> C -> D -> F
A -> C -> E -> F
- Answer 4.5: Yes! Even with both
B–D and C–E broken, Node C connects to Node D via C–D. So a packet can travel A -> C -> D -> F (3 hops) or A -> B -> C -> D -> F (4 hops).
- Answer 4.6: Unit rate:
420 ÷ 14 = 30 packets per second. In 25 seconds: 30 × 25 = 750 packets.
- Answer 4.7: Total rate:
40 packets/sec × 80 bits/packet = 3,200 bits per second. Actual payload rate: 40 packets/sec × 64 payload bits/packet = 2,560 payload bits per second.
- Answer 4.8: Payload to total is
64 : 80. Dividing both by 16 gives 4 : 5 (4 out of every 5 bits sent are payload).
Vocabulary
- packet: A small, fixed-limit chunk of data paired with a header so it can travel independently across a shared network.
- header: Metadata attached to the front of a packet listing its sender address, destination address, and sequence number (
Packet k of N).
- payload: The actual slice of user data (text, image bits, sensor reading) carried inside a packet.
- router: A network node that inspects a packet's destination address and forwards it along a working link toward its destination.
- throughput (bit rate): The unit rate measuring how many bits pass through a network link per second (
bits per second).
Differentiation
- Extra support: Give each student desk a printed sign (
Node A through Node F) and have students slide the index cards along the yarn strings—or trace the routes on a shared tabletop map/diagram by pointing or dictating moves so standing, walking, or handling yarn is optional.
- Extra challenge: Assign different link delays to each yarn piece (for example,
C–D takes 1 second, while B–D takes 4 seconds) and ask students to find the path with the lowest total travel time even when that path has more hops!
Safety
Ensure yarn links are taped across desk tops rather than stretched across floor walkways where students could trip.
Teacher notes
- Scope note on TCP/IP: Explain briefly that on the real Internet, IP (Internet Protocol) handles addressing and hop-by-hop routing (like the
From and To fields on our cards), while TCP (Transmission Control Protocol) handles the sequence numbering (Packet k of N) and requesting re-transmission when a packet is lost.