Measure a parent-switch recovery window
Remove the selected RPL relay, measure target-node packet loss and recovery, then restore the link and test the return path again.

Packet Pete — I check the next hop and the reply before trusting a route.
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
- From Cooja's File menu, open the CSC. The GUI pauses at about 89 s. Trace target mote 5’s current arrows toward root 1.
- You will see
- Run: headless cooja-rpl-parent-switch.csc; use the step input or filter.
Serial:
85065000 ID:5 -- Preferred parent: fe80::203:3:3:3 (last DTSN: 240)Expected: target 5 initially routes via relay 3 to root 1. - Why it matters
- Meaning: Keep a before-state record; a final successful path alone cannot establish what changed or how long recovery took. Boundary: A parent change and successful ping bound this fault run; they do not prove every mesh node recovered.

Step 1 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 2
- Do
- At the first pause, filter Mote output for ^-- Preferred parent|^-- Rank:. Record the baseline snapshot.
- You will see
- Run: headless cooja-rpl-parent-switch.csc; use the step input or filter.
Serial:
85065000 ID:5 -- Rank: 422Expected: baseline target rank is 422 at 85.065 s. - Why it matters
- Meaning: The baseline names the actual parent and metric state before the ScriptRunner chooses which relay to remove. Boundary: A parent change and successful ping bound this fault run; they do not prove every mesh node recovered.

Step 2 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 3
- Do
- Click Start/Pause once and let the GUI reach its second pause near 150 s. Inspect target 5 in Network.
- You will see
- Run: headless cooja-rpl-parent-switch.csc; use the step input or filter.
Serial:
FAULT removed_parent=3 at_us=90065000Expected: relay 3 is removed at 90.065 s; target 5 must find another parent. - Why it matters
- Meaning: The intervention removes a real radio path. The new arrow is a real default-route annotation, not a drawn replacement. Boundary: A parent change and successful ping bound this fault run; they do not prove every mesh node recovered.

Step 3 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 4
- Do
- In Cooja's Mote output window, at the second pause, use the parent/Rank filter again and compare both snapshots. Read the change timestamp in expected-output.txt.
- You will see
- Run: headless cooja-rpl-parent-switch.csc; use the step input or filter.
Serial:
140065000 ID:5 -- Rank: 425Expected: post-fault target rank is 425 at 140.065 s in the actual run and capture. - Why it matters
- Meaning: Route-state recovery and packet recovery are different events. Record both rather than calling the whole interval instantaneous convergence. Boundary: A parent change and successful ping bound this fault run; they do not prove every mesh node recovered.

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 for Received ping reply. Check the root-initiated test after the parent change.
- You will see
- Run: headless cooja-rpl-parent-switch.csc; use the step input or filter.
Serial:
145136696 ID:1 Received ping reply from fd00::205:5:5:5, len 4, ttl 63, delay 71 msExpected: the first post-fault root ping returns in 71 ms. - Why it matters
- Meaning: The first recovered uplink appears at 110.644856 s and reply at 110.711112 s. Those bound application recovery later than the parent change. Boundary: A parent change and successful ping bound this fault run; they do not prove every mesh node recovered.

Step 5 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 6
- Do
- On Cooja's simulation toolbar, click Start/Pause again. The relay returns at 210.065 s; the run stops at 300 s. Reapply the parent/Rank filter.
- You will see
- Run: headless cooja-rpl-parent-switch.csc; use the step input or filter.
Serial:
260065000 ID:5 -- Preferred parent: fe80::202:2:2:2 (last DTSN: 240)Expected: target 5 still uses relay 2 after relay 3 returns. - Why it matters
- Meaning: Restoring physical reachability does not force the original parent back. Retention, link freshness and hysteresis must be observed, not assumed. Boundary: A parent change and successful ping bound this fault run; they do not prove every mesh node recovered.

Step 6 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 7
- Do
- In Cooja's Mote output window, filter for Received ping reply and check the second reply. Complete the README forwarding worksheet and six-part recovery record.
- You will see
- Run: headless cooja-rpl-parent-switch.csc; use the step input or filter.
Serial:
270166696 ID:1 Received ping reply from fd00::205:5:5:5, len 4, ttl 63, delay 101 msExpected: the final root ping returns in 101 ms. - Why it matters
- Meaning: Accept the tested target path with its loss window and limits. Nodes 3 and 6 do not have active parent annotations at the end; this is not proof that the entire mesh recovered. Boundary: A parent change and successful ping bound this fault run; they do not prove every mesh node recovered.

Step 7 · 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 node keeps switching between two parents with similar metrics, and telemetry still reaches the root most of the time. What is the strongest routing review response?
Return to the chapter’s knowledge checkA sensor can ping its gateway, but cloud replies never return. What does the evidence prove?
Return to the chapter’s knowledge check