Skip to content

Inspect ZRP zones and bordercasts

Print intra-zone tables, trace bordercasts and compare radius costs with reproducible failure checks.

Blueprint Bina: I want you to inspect the failed case and the record that explains the next decision., your practice guide

Blueprint Bina: I want you to inspect the failed case and the record that explains the next decision.
Predict the reading, then compare it with the measurement.

Python 3 in your browser (JupyterLite)

Python · no install

Tier 2 · Web · paste-in setup · No account

Version tested: Python 3.12.7 / Pyodide 0.27.6 in JupyterLite 0.6.4; Chromium 148.0.7778.96; captureSource playwright:jupyterlite. Date: 2026-09-10.

Open the notebook in your browser and run each Python cell; no install or account is needed.

Three ways to run: use JupyterLite here with no install; run main.py locally from the downloadable lab folder; or open the same notebook in Google Colab.

Open in your browser (new tab)

Steps

Screens captured against Python 3 in your browser (JupyterLite) Python 3.12.7 / Pyodide 0.27.6 in JupyterLite 0.6.4; Chromium 148.0.7778.96; captureSource playwright:jupyterlite on 2026-09-10; the tool may have moved on — the text steps are the contract.

  1. 1 Step 1

    Do
    In the JupyterLite notebook, run the Step 1 cell to freeze the legacy topology.
    You will see
    Input: execute notebook step 1 with the record’s unchanged fixture, seed, and parameters. Observed: 15 nodes: three rows x five columns; horizontal and vertical unit links Observed: rows: 0 1 2 3 4 / 5 6 7 8 9 / 10 11 12 13 14 Observed: Computed diameter=6 hops; source=0 destination=14
    Why it matters
    Expected: STEP 1 scenario-contract ready from this deterministic notebook step. Interpretation: The exact legacy adjacency graph has a six-hop diameter. Keeping that separate from its eight-hop emergency example prevents mixing assumed and measured values. Action: Run python main.py and inspect step 1: freeze the legacy topology. Boundary: this local fixture is not a live device, network, or site measurement.
    JupyterLite step 1 showing the executed Python and its observed result.
    Step 1 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  2. 2 Step 2

    Do
    In the JupyterLite notebook, run the Step 2 cell to print radius-2 intra-zone tables: nodes 0-7.
    You will see
    Input: execute notebook step 2 with the record’s unchanged fixture, seed, and parameters. Observed: Print radius-2 intra-zone tables: nodes 0-7 Observed: node destination:next-hop/hops (self omitted) Observed: 0 1:1/1 2:1/2 5:5/1 6:1/2 10:5/2
    Why it matters
    Expected: STEP 2 local tables 0-7 complete from this deterministic notebook step. Interpretation: IARP stores local next hops and distances. These first eight tables show which destinations are ready without reactive discovery. Action: Run python main.py and inspect step 2: print radius-2 intra-zone tables: nodes 0-7. Boundary: this local fixture is not a live device, network, or site measurement.
    JupyterLite step 2 showing the executed Python and its observed result.
    Step 2 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  3. 3 Step 3

    Do
    In the JupyterLite notebook, run the Step 3 cell to print radius-2 intra-zone tables: nodes 8-14.
    You will see
    Input: execute notebook step 3 with the record’s unchanged fixture, seed, and parameters. Observed: Print radius-2 intra-zone tables: nodes 8-14 Observed: node destination:next-hop/hops (self omitted) Observed: 8 2:3/2 3:3/1 4:3/2 6:7/2 7:7/1 9:9/1 12:7/2 13:13/1 14:9/2
    Why it matters
    Expected: STEP 3 local tables 8-14 complete from this deterministic notebook step. Interpretation: The remaining seven tables complete the network record. Zone-edge membership explains who can receive bordercast queries. Action: Run python main.py and inspect step 3: print radius-2 intra-zone tables: nodes 8-14. Boundary: this local fixture is not a live device, network, or site measurement.
    JupyterLite step 3 showing the executed Python and its observed result.
    Step 3 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  4. 4 Step 4

    Do
    In the JupyterLite notebook, run the Step 4 cell to follow local lookup and out-of-zone bordercast.
    You will see
    Input: execute notebook step 4 with the record’s unchanged fixture, seed, and parameters. Observed: Local 0->6: path=[0, 1, 6] queries=0 Observed: 0 2 2 Observed: 0 6 2
    Why it matters
    Expected: STEP 4 bordercast measured from this deterministic notebook step. Interpretation: A local target needs no bordercast. An external target pays query and reply work, and duplicate suppression bounds each query recipient. Action: Run python main.py and inspect step 4: follow local lookup and out-of-zone bordercast. Boundary: this local fixture is not a live device, network, or site measurement.
    JupyterLite step 4 showing the executed Python and its observed result.
    Step 4 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  5. 5 Step 5

    Do
    In the JupyterLite notebook, run the Step 5 cell to compare radius costs on the same workload.
    You will see
    Input: execute notebook step 5 with the record’s unchanged fixture, seed, and parameters. Observed: 1 44 15 13 13 6 34 Observed: 2 104 59 6 12 6 77 Observed: 3 156 119 3 9 6 134
    Why it matters
    Expected: STEP 5 radii 1,2,3 compared from this deterministic notebook step. Interpretation: Larger zones trade more proactive refresh and memory for fewer reactive queries. Count hop transmissions as well as border recipients. Action: Run python main.py and inspect step 5: compare radius costs on the same workload. Boundary: this local fixture is not a live device, network, or site measurement.
    JupyterLite step 5 showing the executed Python and its observed result.
    Step 5 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  6. 6 Step 6

    Do
    In the JupyterLite notebook, run the Step 6 cell to detect degeneration and check the legacy arithmetic.
    You will see
    Input: execute notebook step 6 with the record’s unchanged fixture, seed, and parameters. Observed: r=10 >= diameter 6; node-0 zone size=15 Observed: Node-0 border=[]; reactive queries=0 Observed: Legacy emergency example (given values, not simulated measurements):
    Why it matters
    Expected: STEP 6 overlarge zone diagnosed from this deterministic notebook step. Interpretation: A radius beyond network diameter eliminates the reactive half of ZRP. The supplied overhead arithmetic is illustrative, separate from this run’s packet counts. Action: Run python main.py and inspect step 6: detect degeneration and check the legacy arithmetic. Boundary: this local fixture is not a live device, network, or site measurement.
    JupyterLite step 6 showing the executed Python and its observed result.
    Step 6 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  7. 7 Step 7

    Do
    In the JupyterLite notebook, run the Step 7 cell to validate faults and fresh local tables.
    You will see
    Input: execute notebook step 7 with the record’s unchanged fixture, seed, and parameters. Observed: one-hop: forward=[0, 1] reverse=[1, 0] PASS Observed: partition: forward=None reverse=None PASS Observed: asymmetric: forward=[0, 1] reverse=None PASS
    Why it matters
    Expected: STEP 7 fault checks PASS from this deterministic notebook step. Interpretation: A one-hop oracle, a disconnected graph, asymmetric links and a removed edge test different failure assumptions. Fresh zones must not silently reuse obsolete paths. Action: Run python main.py and inspect step 7: validate faults and fresh local tables. Boundary: this local fixture is not a live device, network, or site measurement.
    JupyterLite step 7 showing the executed Python and its observed result.
    Step 7 · Python 3 in your browser (JupyterLite); numbered callout added to a real capture. Enlarge screenshot (new tab)
  8. 8 Step 8

    Do
    In the JupyterLite notebook, run the Step 8 cell to replay 30 edge-loss seeds with matched input.
    You will see
    Input: execute notebook step 8 with the record’s unchanged fixture, seed, and parameters. Observed: Replay 30 edge-loss seeds with matched input Observed: seeds=42..71; independent edge-loss probability=0.12 Observed: Reachable radius-runs=81/90; reachability oracle agrees for all 90
    Why it matters
    Expected: STEP 8 validation PASS from this deterministic notebook step. Interpretation: Matching edge-loss seeds across radii isolates radius choice. A reachability oracle checks correctness; a physical testbed is needed to measure radio performance. Action: Run python main.py and inspect step 8: replay 30 edge-loss seeds with matched input. Boundary: this local fixture is not a live device, network, or site measurement.
    JupyterLite step 8 showing the executed Python and its observed result.
    Step 8 · Python 3 in your browser (JupyterLite); 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 sensor network has frequent local traffic and occasional distant messages. Which ZRP feature matches that pattern?

    Return to the chapter’s knowledge check
  2. A team enlarges ZRP zones to reduce discovery traffic. Which cost should it expect to review?

    Return to the chapter’s knowledge check

Caution

Use fictional inputs. This deterministic teaching model omits real radio interference and hardware timing; its counts explain this scenario, not field performance.

Return to ZRP Routing: Tuning and Deployment · Browse Labs