Chapters

17 Packet Journey Game: Forwarding Decisions

networking-core
fund
game

17.1 Start With the Decision

Treat each game move as a real deployment question. Which address is used here?

17.2 Route Overview

This is part 1 of 2. Continue with Packet Journey Game: Diagnostic Traces.

17.3 Part Objectives

  • Test packet journey adventure with a concrete scenario and pass criteria.
  • Trace packet journey path proof across its components and failure boundaries.

17.4 Start With the Packet as the Player

The packet journey game works because it turns hidden forwarding decisions into visible choices. A sensor message has to leave its local link, cross devices that make forwarding decisions, and arrive with enough context for the application to understand it.

Treat each game move as a real deployment question. Which address is used here? Which device decides the next hop? What delay or loss did the packet collect? That habit makes the game a rehearsal for debugging.

Chapter Roadmap
  • Start With the Packet as the Player
  • Key Concepts
  • In 60 Seconds
  • Phoebe’s Field Notes: Why the “Shorter” Mesh Hop Can Be the Worse Hop
  • Quick Check: Packet Forwarding Choice
  • For Beginners: The Packet Journey Game
  • Become a Packet!
  • Packet Journey Adventure
  • Learn Networking by Adventure
  • Putting Numbers to It
  • Try It: End-to-End Delay Calculator
  • Quick Check: Layer 2 Forwarding
  • Checkpoint: Three-Level Route
  • Learning Objectives Covered in This Game
  • Quick Check: Leaving a 6LoWPAN Mesh
  • Packet Delay Budget Analysis
  • Checkpoint: Delay Budget
  • Match: Game Concept to OSI Layer
  • Order Sensor-to-Cloud Packets
  • Common Pitfalls
  • Review Wrong Game Answers
  • 2. Treating a High Game Score as Mastery
  • Treat the Game as Required
  • Label the Diagram
  • Code Challenge
  • Knowledge Check
  • Packet Journey Path Proof
  • Checkpoint: Path Proof

Follow the packet journey from play to proof:

  1. First use the game to separate LAN switching, WAN policy, and IoT mesh choices.
  2. Then read the delay examples as evidence that each hop and retry changes the final mission result.
  3. Next turn the score into a path proof with labels, trace fields, and owner decisions.
  4. Finally connect the same reasoning to troubleshooting, summary review, and the chapters that follow.

Checkpoints recap the route; collapsed sections and the embedded game carry the extra detail.

Key Concepts
  • Gamification: Applying game design elements (scoring, challenges, feedback) to educational content to increase engagement and retention
  • Knowledge Check Game: An interactive exercise where correct answers to networking questions unlock subsequent levels or earn points
  • Immediate Feedback: Providing the correct answer and explanation right after a wrong response, accelerating learning compared to end-of-module feedback
  • Spaced Repetition: Presenting concepts at increasing intervals to strengthen long-term memory; implemented in some game-based learning tools
  • Scenario Simulation: A game format that presents a realistic IoT deployment problem and scores the player’s design or troubleshooting decisions
  • Difficulty Progression: Starting with simple recall questions and advancing to complex scenario analysis as the player demonstrates mastery
  • Leaderboard: A competitive element showing relative scores among classmates; motivates engagement but should be used carefully to avoid discouraging struggling students

17.5 In 60 Seconds

Guide a data packet from source to destination in this interactive game, making routing decisions across three network environments. Apply OSI layer knowledge, select correct protocols, and overcome real-world challenges like congestion, node failures, and firewalls while learning packet encapsulation and forwarding mechanics.

The mathematical gist. For the same 20 m, 2.45 GHz mesh hop, a lightly obstructed exponent of 2.2 predicts 68.8 dB path loss and 36.2 dB margin. A cluttered near-ground exponent of 3.6 predicts 87.1 dB and 17.9 dB margin: 18.2 dB disappears even though hop count and distance do not change.

Math Bridge · guided foundationsWhy can two equal-length mesh hops differ by 18 dB?Let Pete unpack the exponent behind RPL's apparently longer but safer route.
Quick Check: Packet Forwarding Choice

17.6 Learning Objectives

By the end of this chapter, you will be able to:

  • Apply networking concepts in an interactive game environment by guiding a packet through LAN, WAN, and IoT mesh levels
  • Analyze packet routing decisions across different network types including switched LANs, routed WANs, and 6LoWPAN mesh networks
  • Select correct protocols at each OSI layer based on reliability, latency, and energy constraints in real-time scenarios
  • Differentiate between Layer 2 and Layer 3 forwarding by explaining when switches use MAC addresses versus when routers use IP addresses
  • Evaluate the impact of protocol choices on end-to-end latency by calculating delay budgets across multi-hop paths
  • Construct an understanding of packet encapsulation by tracing how headers are added, compressed, and removed at each network boundary

This interactive game lets you experience networking by playing the role of a data packet traveling through a network. You will make decisions about routing, deal with congestion, and learn how real networks work---all through a fun, game-based experience that requires no prior technical knowledge.

“This is so cool---you get to BE a data packet!” exclaimed Temperature Terry. “You travel through the network, hopping from router to router, making decisions at every stop!”

“At each hop, you have to choose the right path,” explained the microcontroller. “Take the wrong route and you might hit congestion, a firewall, or a failed node. It is like a maze where you need to apply everything you know about network layers and routing.”

the LED was already playing. “I just learned that picking UDP instead of TCP at the transport layer makes my packet faster but riskier---no retransmission if I get lost! And at each router, I need to check the routing table to find the best next hop.”

“The game has three levels that get harder,” said the battery. “Level 1 is a simple home network, Level 2 is a campus with multiple subnets, and Level 3 is a full internet journey with firewalls and NAT. See how many packets you can deliver without losing any lives!”

The setup has named the player and the three levels. The next question is what the game asks the packet to prove at each boundary.

17.7 Packet Journey Adventure

Time: ~20 min | Difficulty: Intermediate | Unit: P07.C15.U10

Learn Networking by Adventure

Guide a data packet from source to destination across three increasingly complex network environments. Make correct routing decisions, apply the right protocols at each layer, and overcome network challenges like congestion, failures, and firewalls.

Every routing choice in the game changes end-to-end delay.

Tend-to-end=i=1hti+Nretry×tretryT_{end\text{-}to\text{-}end} = \sum_{i=1}^{h} t_i + N_{retry}\times t_{retry}

Worked example: Suppose a packet crosses 5 hops with per-hop delays of [1,3,5,2,4][1,3,5,2,4] ms and one retry penalty of 33 ms:

T=(1+3+5+2+4)+1×3=18 msT = (1+3+5+2+4) + 1\times 3 = 18\text{ ms}

If a congested route causes three retries instead, delay becomes:

T=15+3×3=24 msT = 15 + 3\times 3 = 24\text{ ms}

That 6 ms increase is a 33% latency jump, which is why low-loss paths usually beat “short-looking” but unstable routes.

Try It: End-to-End Delay Calculator

Quick Check: Layer 2 Forwarding

Question: In Level 1 of the Packet Journey game, a switch must forward a frame to a device on the same LAN. Which address does the switch use?

Answer: The switch uses the destination MAC address, because switches forward at OSI Layer 2. IP addresses are used by routers at Layer 3, and port numbers belong to Layer 4.

Packet Journey Adventure

Guide one sensor packet through LAN, WAN, and IoT mesh decisions.

LevelReady
Score0
Latency0 ms
Retries3

Packet PeteCheckpoint: Three-Level Route

You now know:

  • Level 1 asks whether local forwarding uses MAC addresses, routes, and NAT correctly.
  • Level 2 adds transport choice, QoS priority, and firewall order.
  • Level 3 adds 6LoWPAN compression, RPL energy choice, repair, and border-router decompression.

The game has made the route visible. The next question is whether the route still meets a time budget when hops, queues, and retries are counted.

The Packet Journey game reinforces these key networking concepts:

Level 1 - LAN Routing:

  • MAC vs IP Addressing: Switches use MAC addresses (Layer 2), routers use IP addresses (Layer 3)
  • NAT Traversal: How private IPs are translated to public IPs for internet communication
  • Routing Tables: How routers determine next hop based on destination IP

Level 2 - WAN Routing:

  • TCP vs UDP: When to use reliable (TCP) vs low-latency (UDP) transport
  • QoS Prioritization: How critical traffic gets priority during congestion
  • Firewall Rules: How stateful firewalls inspect and filter packets

Level 3 - IoT Mesh Routing:

  • 6LoWPAN: Header compression for constrained IPv6 networks
  • RPL Routing: Energy-aware routing protocol for IoT mesh networks
  • Failure Recovery: How mesh networks reroute around failed nodes
  • Header Encapsulation/Decapsulation: Protocol processing at border routers

Quick Check: Leaving a 6LoWPAN Mesh

Question: When a packet leaves a 6LoWPAN mesh through a border router, compressed headers are restored to full IPv6 format. What is this process called?

Answer: This is header decompression. 6LoWPAN compresses IPv6 headers inside the constrained mesh, and the border router expands them back to standard IPv6 format for external networks.

Scenario: You’re designing a smart traffic light system. When a pedestrian presses the crosswalk button, the traffic controller must receive the signal within 500 ms to meet safety standards.

Network Path (similar to Game Level 2):

StepNetwork pointRole in the journey
1Sensor buttonCreates the safety message.
2Edge routerForwards the packet out of the local network.
3ISP coreCarries the packet across the provider network.
4Peering pointHands traffic between networks; congestion often appears here.
5Cloud firewallChecks whether the packet is allowed.
6Traffic controllerReceives the message and changes the crossing state.

Delay Components from Packet Journey Game:

Hop 1: Sensor to Edge Router (LAN)

  • Physical propagation: ~0 ms (100 m at ~2×10^8 m/s in copper ≈ 0.0005 ms, negligible)
  • MAC layer (CSMA/CA): 5 ms average (Wi-Fi contention + backoff)
  • Processing delay: 2 ms (edge router forwarding + queuing)
  • Hop 1 Total: 7 ms

Hop 2: Edge Router to ISP Core

  • Propagation: 10 ms (fiber link to ISP, 2,000 km at 2×10^8 m/s)
  • Transmission delay: 0.12 ms (1,500 byte packet at 100 Mbps = 12,000 bits ÷ 10^8 bps)
  • Queueing delay: 14.88 ms (router processing typical load)
  • Hop 2 Total: 25 ms

Hop 3: ISP Core to Peering Point

  • Propagation: 20 ms (cross-country fiber)
  • QoS decision: 5 ms (Level 2 challenge - classify as “critical alarm”)
  • Queueing: 30 ms (congested peering point during evening peak)
  • Hop 3 Total: 55 ms

Hop 4: Peering Point to Cloud Firewall

  • Propagation: 15 ms
  • Firewall inspection: 2 ms (Level 2 challenge - rule matching)
  • Hop 4 Total: 17 ms

Hop 5: Cloud Firewall to Traffic Controller

  • Propagation: 5 ms (local data center)
  • Application processing: 10 ms (TLS decryption + application logic)
  • Hop 5 Total: 15 ms

Total End-to-End Delay and Safety Margin:

CheckCalculationResult
Total path delay7 + 25 + 55 + 17 + 15119 ms
Safety budgetSystem requirement500 ms
Remaining margin500 - 119381 ms of headroom
Design status119 ms < 500 msWithin the safety budget

What If We Made Wrong Protocol Choices?

Bad Decision 1: Skip QoS (treat as best-effort traffic)

  • Peering point queueing increases from 30 ms to 200 ms during congestion
  • New total: 119 - 30 + 200 = 289 ms (still OK, but margin reduced to 42%)

Bad Decision 2: Use UDP instead of TCP (Game Level 2 choice)

  • 5% packet loss requires retransmission
  • Retransmit timeout: 200 ms (RTT × 2)
  • Expected delay: 119 ms × 0.95 + (119 + 200) × 0.05 = 129 ms average
  • But worst-case (packet lost): 319 ms (still within 500 ms)

Bad Decision 3: Firewall rule misconfiguration (Game Level 2)

  • Packet blocked by default deny rule
  • Sensor timeout + retransmit: 1,000 ms (exceeds safety budget)
  • System failure: Pedestrian button press not detected

Real-World Lesson from Game Mechanics:

The Packet Journey Game teaches that delay is cumulative and unpredictable:

  • Each hop adds latency (sum of all hops)
  • Wrong protocol choices (UDP without retries, best-effort QoS) add risk
  • Firewall errors cause complete failure, not just delay

Design Rule: Budget for worst-case, not average:

  • Average path: 119 ms
  • Worst-case (congestion + 1 retransmit): ~500 ms
  • Design with 2x safety margin: 500 ms requirement means a 250 ms target latency

Optimizations Applied:

From Game Level 2 Decisions:

  1. Use TCP (Level 2 choice) - reliability over speed
  2. Apply QoS Expedited Forwarding (Level 2 challenge) - priority during congestion
  3. Configure firewall allow rule (Level 2 challenge) - avoid blocks

From Game Level 3 (6LoWPAN mesh):

  • If using wireless sensors, avoid multi-hop mesh (each hop adds 10-50 ms)
  • Game shows RPL mesh with 4 hops = 50+ ms total just for mesh routing
  • Better: Direct Wi-Fi to edge router (single hop = 7 ms)

Final System Design:

SegmentDesign choiceTypical delay
Sensor to edge routerDirect Wi-Fi, single hop7 ms
Edge router to ISP coreQoS enabled25 ms
ISP core to cloudExpedited Forwarding35 ms
Cloud to controllerFirewall pre-configured32 ms
TotalTypical pathAbout 99 ms
Safety requirementWorst-case design targetAbout 350 ms worst-case, still below 500 ms

Key Insight from Game: Protocol decisions at each layer (MAC, transport, network, application) compound across the entire path. The game’s level structure mirrors real network hops, teaching that every decision matters for end-to-end latency.

Packet PeteCheckpoint: Delay Budget

You now know:

  • The worked path totals 119 ms, leaving 381 ms inside a 500 ms safety budget.
  • Skipping QoS, losing a packet, or blocking at the firewall changes the mission differently.
  • A direct Wi-Fi hop can keep the sensor-to-edge segment near 7 ms.

The timing story is now concrete. The next task is to label the packet journey so each decision has a visible place in the trace.

Match: Game Concept to OSI Layer

Order Sensor-to-Cloud Packets

Common Pitfalls

Replaying a game to improve the score without reading the explanations for wrong answers reinforces incorrect mental models. Fix: read every explanation carefully before attempting the next question, even when the answer was correct.

Game scores measure performance on a specific question set, not broad mastery. Fix: supplement game exercises with worked examples, labs, and scenario problems to confirm genuine understanding.

Interactive games in this module are designed to reveal common misconceptions that text alone may not expose. Fix: attempt every game exercise and use wrong answers as diagnostic information about which concepts need more study.

Label the Diagram

Code Challenge

17.8 Knowledge Check

17.9 Packet Journey Path Proof

The packet journey game is more than a score. Each choice asks the learner to prove that a packet can move through one boundary without losing the meaning of the previous boundary. A switch proves local delivery with MAC forwarding, a router proves network delivery with IP next-hop choice, and the end system proves that the application result still arrived.

Use Figure 17.1 to prepare the decision in packet journey path proof. The diagram names Packet Journey Game Map and Follow one packet from sensor to cloud, the two anchors needed to assess packet journey game map from sensor message through switch, router and nat, firewall, cloud, transport choice, and mesh routing decisions.

Packet journey game map from sensor message through switch, router and NAT, firewall, cloud, transport choice, and mesh routing decisions.
Figure 17.1: Packet journey game map from sensor message through switch, router and NAT, firewall, cloud, transport choice, and mesh routing decisions.

Begin Figure 17.1 with Packet Journey Game Map, then distinguish Follow one packet from sensor to cloud and Sensor. The diagram separates Packet Journey Game Map from Follow one packet from sensor to cloud within packet journey game map from sensor message through switch, router and nat, firewall, cloud, transport choice, and mesh routing decisions. Keep both distinctions explicit in packet journey path proof.

The useful score is not just delivery. It is the evidence trail from payload creation through forwarding, policy, transport choice, and final receiver behavior.

That is the same habit used in real IoT troubleshooting: trace the packet from source intent to link behavior, network route, transport trade-off, security check, and receiver outcome. The game makes the boundary visible because every level asks a different kind of question. A local LAN question asks whether a frame reached the right neighbor. A WAN question asks whether a route, NAT mapping, or firewall rule allowed the flow. A mesh question asks whether the path still works when a low-power node changes parent or needs a repair path.

The important review move is to separate arrival from proof. A packet that eventually reaches the cloud may still be a bad design if it spent too much time in link retries, crossed a fragile NAT state, relied on a firewall exception that is not documented, or consumed a battery-heavy mesh repair. The path proof says what each layer contributed and where the next real test belongs.

When a learner can explain the game route this way, the lesson transfers to commissioning work. The operator does not say only “the packet failed.” The operator asks which boundary was last proven: payload creation, neighbor delivery, routed next hop, transport recovery, security policy, or application processing.

That boundary question keeps the game from becoming memorization; every successful move must leave a clue that would still help during a field failure.

Packet PeteCheckpoint: Path Proof

You now know:

  • Arrival is not enough; each boundary needs evidence.
  • LAN, WAN, and mesh questions prove different parts of the packet journey.
  • A useful score leaves clues about retries, NAT state, firewall policy, and receiver behavior.

The proof explains what happened. The trace record turns that explanation into a short artifact another operator can replay.

17.10 Continue to the Next Part

Carry this evidence into Packet Journey Game: Diagnostic Traces, which begins with Packet Trace Record.