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 ToolCompare delivery and parent-path length in compact and spread layouts under the same router-removal test.
Download 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
- All remaining clients attach directly to root 1; router 3 has been removed at 90.065 s.
- Why it matters
- A deliberately changed topology is the independent variable. Firmware, seed, traffic and fault timing are matched.

Step 1 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 2
- Do
- 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
- The compact layout gives source 5 a one-hop path. Its root ping returns TTL 64 in 27 ms.
- Why it matters
- Parent-chain length describes route state; the ping independently tests that this destination replies.

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
- Radio frames include control and acknowledgement traffic. The application log separately records 73/73 deliveries overall, 36/36 after the fault.
- Why it matters
- Do not use frame count as a substitute for useful sample count. Record both layers and their denominators.

Step 3 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 4
- Do
- 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
- Source 5 finds relay 2 after router 3 disappears. Source 6 has no surviving route to the sink.
- Why it matters
- An alternate path for one source is not whole-mesh recovery. Inspect the weakest region before accepting the mean.

Step 4 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 5
- Do
- Filter ^--|Received ping reply and compare with the compact run. Use the last valid PATH snapshot for source 5.
- You will see
- Source 5’s route is two hops and the ping returns TTL 63 in 119 ms. Compact was one hop and 27 ms.
- Why it matters
- 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.

Step 5 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 6
- Do
- Filter Received request|Received response|Not reachable yet. Complete the README’s per-source fault table and write a deployment decision.
- You will see
- The spread run delivers 55/59 overall and 25/29 after failure. Post-fault sources 2 and 4 each deliver 9/9, source 5 delivers 7/9, and source 6 delivers 0/2 before it stops attempting.
- Why it matters
- The 86.2% post-fault ratio also hides later unattempted samples. Hold coverage for source 6 and add an alternate relay before field testing.

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