Compare WSN routes before and after relay loss
Compare delivery and parent-path length in compact and spread layouts under the same router-removal test.

Packet Pete — I trace the measured path and keep application claims separate.
Predict the reading, then compare it with the measurement.
Contiki-NG Cooja
Third party ToolDownload the complete lab packet and follow README.md to run it in the free simulator.
Download the setup and run guideGet the lab files
Download the complete packet for the simulation and its firmware, or download individual files for inspection. README.md gives the setup and run commands.
Steps
Step 1
- Do
- Open cooja-wsn-routing-compare-compact.csc from the packet and let it finish at 180 seconds. Trace the remaining Network arrows.
- You will see
- Run: headless cooja-wsn-routing-compare-compact.csc; use the step input or filter.
Serial:
FAULT router=3 switched_off_us=90065000Expected: compact layout survives router 3 removal at 90.065 s. - Why it matters
- Meaning: A deliberately changed topology is the independent variable. Firmware, seed, traffic and fault timing are matched. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.

Step 1 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 2
- Do
- In Cooja's Mote output window, filter ^--|Received ping reply. Read mote 5’s route status and its root ping; inspect the PATH rows in expected-compact.txt.
- You will see
- Run: headless cooja-wsn-routing-compare-compact.csc; use the step input or filter.
Serial:
155092408 ID:5 Received ping reply from fd00::201:1:1:1, len 4, ttl 64, delay 27 msExpected: compact source 5 has one-hop, 27 ms root ping. - Why it matters
- Meaning: Parent-chain length describes route state; the ping independently tests that this destination replies. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.

Step 2 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 3
- Do
- Bring Radio messages to the front. Compare From and To columns with compact application counts in expected-compact.txt.
- You will see
- Run: headless cooja-wsn-routing-compare-compact.csc; use the step input or filter.
Serial:
PATH source=5 hops=1 chain=5->1 at_us=173846000Expected: compact source 5 reaches root directly; packet table is GUI-only. - Why it matters
- Meaning: Do not use frame count as a substitute for useful sample count. Record both layers and their denominators. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.

Step 3 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 4
- Do
- From Cooja's File menu, open cooja-wsn-routing-compare.csc, the spread layout, and let it finish. Trace 5 → 2 → 1; inspect the missing route at source 6.
- You will see
- Run: headless cooja-wsn-routing-compare-spread.csc; use the step input or filter.
Serial:
FAULT router=3 switched_off_us=90065000Expected: spread layout loses router 3; source 5 changes via relay 2. - Why it matters
- Meaning: An alternate path for one source is not whole-mesh recovery. Inspect the weakest region before accepting the mean. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.

Step 4 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 5
- Do
- In Cooja's Mote output window, filter ^--|Received ping reply and compare with the compact run. Use the last valid PATH snapshot for source 5.
- You will see
- Run: headless cooja-wsn-routing-compare-spread.csc; use the step input or filter.
Serial:
155184952 ID:5 Received ping reply from fd00::201:1:1:1, len 4, ttl 63, delay 119 msExpected: spread source 5 has two-hop, 119 ms root ping. - Why it matters
- Meaning: This seed and layout support a bounded comparison, not a universal protocol ranking. A stale pre-fault PATH entry for source 6 is not evidence that it is reachable now. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.

Step 5 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 6
- Do
- In Cooja's Mote output window, filter Received request|Received response|Not reachable yet. Complete the README’s per-source fault table and write a deployment decision.
- You will see
- Run: headless cooja-wsn-routing-compare-spread.csc; use the step input or filter.
Serial:
174584000 ID:6 [INFO: App ] Not reachable yetExpected: source 6 has no reliable surviving route after the fault. - Why it matters
- Meaning: The 86.2% post-fault ratio also hides later unattempted samples. Hold coverage for source 6 and add an alternate relay before field testing. Boundary: The compact and spread outcomes are separate fixed-seed Cooja runs.

Step 6 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
Chapter checks
These questions refer to the chapter’s examples. Use the return links to review their answers.
A WSN review says Trickle is working because most nodes stayed silent during a stable period. What evidence is still needed before accepting that claim?
Return to the chapter’s knowledge checkA node hears metadata that conflicts with its current route-maintenance state and resets to a short interval. Why is this not enough evidence that the repair succeeded?
Return to the chapter’s knowledge check