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 ToolRemove the selected RPL relay, measure target-node packet loss and recovery, then restore the link and test the return path again.
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 the CSC. The GUI pauses at about 89 s. Trace target mote 5’s current arrows toward root 1.
- You will see
- Before the fault, target 5 uses parent 3, then root 1.
- Why it matters
- Keep a before-state record; a final successful path alone cannot establish what changed or how long recovery took.

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
- At 85.065 s, target 5 reports parent fe80::203:3:3:3 and Rank 422.
- Why it matters
- The baseline names the actual parent and metric state before the ScriptRunner chooses which relay to remove.

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
- The script moves the actual preferred relay 3 to (300,300) at 90.065 s. Target 5 now reaches the root through relay 2. Relay 3 is outside the shown viewport.
- Why it matters
- The intervention removes a real radio path. The new arrow is a real default-route annotation, not a drawn replacement.

Step 3 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 4
- Do
- 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
- The 140.065 s snapshot reports parent 2 and Rank 420. The first new-parent annotation occurs at 100.760728 s, 10.695728 s after removal.
- Why it matters
- Route-state recovery and packet recovery are different events. Record both rather than calling the whole interval instantaneous convergence.

Step 4 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 5
- Do
- Filter for Received ping reply. Check the root-initiated test after the parent change.
- You will see
- The root receives a reply from target 5 with ttl 63 and delay 71 ms. During the fault window, the log records 12 target requests sent, 10 received, and 10 replies received by the target.
- Why it matters
- The first recovered uplink appears at 110.644856 s and reply at 110.711112 s. Those bound application recovery later than the parent change.

Step 5 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 6
- Do
- 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
- At 260.065 s, target 5 still prefers relay 2, with Rank 395. It does not return to relay 3 during this observation window.
- Why it matters
- Restoring physical reachability does not force the original parent back. Retention, link freshness and hysteresis must be observed, not assumed.

Step 6 · Contiki-NG Cooja; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 7
- Do
- Filter for Received ping reply and check the second reply. Complete the README forwarding worksheet and six-part recovery record.
- You will see
- The final root-to-target ping has ttl 63 and delay 101 ms. The script passes only after a parent change, repeated target uplink/reply successes, and both downward pings.
- Why it matters
- 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.

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