Skip to content

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., your practice guide

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 Tool

Compare delivery and parent-path length in compact and spread layouts under the same router-removal test.

Tier 2 · Free simulator · install required · No account

Version tested: Contiki-NG release/v4.9 c20b12cd, Cooja 4.8 (2022071901), Temurin 17.0.20.1, image sha256:b14d5afb0a2a852d9e72bbed607ead03f6ccc5f4d4dee44f0799110be2f4b609. Date: 2026-09-10.

Download the complete lab packet and follow README.md to run it in the free simulator.

Download the setup and run guide

Get 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.

  • cooja-wsn-routing-compare.csc
  • README.md
  • expected-output.txt
  • lab-files.tar.gz

Steps

Screens captured against Contiki-NG Cooja Contiki-NG release/v4.9 c20b12cd, Cooja 4.8 (2022071901), Temurin 17.0.20.1, image sha256:b14d5afb0a2a852d9e72bbed607ead03f6ccc5f4d4dee44f0799110be2f4b609 on 2026-09-10; the tool may have moved on — the text steps are the contract.

  1. 1 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: Compact topology with real one-hop parent arrows after the fault. The orange ring marks the evidence; the numbered badge is outside it.
    Step 1 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  2. 2 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: Route-status rows and the actual 27 ms ping result. The orange ring marks the evidence; the numbered badge is outside it.
    Step 2 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  3. 3 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: The real compact-run radio transmission rows. The orange ring marks the evidence; the numbered badge is outside it.
    Step 3 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  4. 4 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: Spread layout with source 5’s recovered path and source 6’s disconnected corner. The orange ring marks the evidence; the numbered badge is outside it.
    Step 4 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  5. 5 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: The measured spread-layout route status and 119 ms reply. The orange ring marks the evidence; the numbered badge is outside it.
    Step 5 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab)
  6. 6 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: At least six real application and unreachable-state rows from the spread run. The orange ring marks the evidence; the numbered badge is outside it.
    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.

  1. 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 check
  2. A 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

Caution

This is Contiki-NG IPv6/6LoWPAN/RPL over simulated IEEE 802.15.4, not Zigbee profiles, OpenThread or Matter. Parent snapshots can become stale; count missing and unattempted samples. RPL is not running the worksheet’s query or aggregation algorithms, and one seed does not establish a universal routing winner.

Return to WSN Trickle Dissemination · Browse Labs