show ip route prints a cache it never computes: a converged lab reads as empty and an early question reads as settled #1360

Closed
opened 2026-11-10 11:38:20 +00:00 by jaylouisw · 0 comments
Owner

The console prints control-plane results without ever computing them, so the same question gets different answers
depending on what ran before it.

The control planes are results: computeStp(), computeVrrp(), computeOspf() and computeBgp() each write
their conclusions onto the devices, and each honours runAtMs. show ip route prints whatever the last computation
left there — and the console never runs one.

Measured on two ISR 4331s with a segment behind each and OSPF configured on all four interfaces:

fresh console, show ip route, no run behind it, settled lab   ->  (none)
same, after computeOspf() at Infinity                         ->  O 192.168.2.0/24 via 10.0.0.2
computeOspf() at 5000  (OSPF converges at 16000)              ->  (none)
same at 20000                                                 ->  O 192.168.2.0/24 via 10.0.0.2

Two defects follow:

  1. A false negative. A console with no run behind it reports (no O routes) on a lab that is fully converged. The
    routes only appear if a ping or a load happened to run the OSPF computation first.
  2. The answer depends on history. Ask show ip route at instant 5000 after a settled run and it prints routes
    that will not exist for another 11000 ms. The same question, asked twice, answers differently.

Same family as dev.stp in #1336 — the console reading a cache instead of the model.

What must be true instead

  • a show refreshes the control planes at the instant the session is standing at, before producing output — the same
    four computations the packet path already runs before it sends anything;
  • a show may compute; it must not destroy. Recompute only the processes the device is configured to run:
    recomputing an unconfigured process does not give the same answer twice, it erases the device's learned routes. This
    is not hypothetical — the first version recomputed unconditionally and test/routes-agreement.test.js caught it, a
    device whose fixture-installed ospfRoutes came back with one prefix instead of four;
  • asking must not rewrite the configuration, and rows keep their distances and is directly connected wording.
The console prints control-plane results without ever computing them, so the same question gets different answers depending on what ran before it. The control planes are **results**: `computeStp()`, `computeVrrp()`, `computeOspf()` and `computeBgp()` each write their conclusions onto the devices, and each honours `runAtMs`. `show ip route` prints whatever the last computation left there — and the console never runs one. Measured on two ISR 4331s with a segment behind each and OSPF configured on all four interfaces: ``` fresh console, show ip route, no run behind it, settled lab -> (none) same, after computeOspf() at Infinity -> O 192.168.2.0/24 via 10.0.0.2 computeOspf() at 5000 (OSPF converges at 16000) -> (none) same at 20000 -> O 192.168.2.0/24 via 10.0.0.2 ``` Two defects follow: 1. **A false negative.** A console with no run behind it reports `(no O routes)` on a lab that is fully converged. The routes only appear if a `ping` or a load happened to run the OSPF computation first. 2. **The answer depends on history.** Ask `show ip route` at instant 5000 after a settled run and it prints routes that will not exist for another 11000 ms. The same question, asked twice, answers differently. Same family as `dev.stp` in #1336 — the console reading a cache instead of the model. ## What must be true instead * a `show` refreshes the control planes at the instant the session is standing at, before producing output — the same four computations the packet path already runs before it sends anything; * **a `show` may compute; it must not destroy.** Recompute only the processes the device is configured to run: recomputing an unconfigured process does not give the same answer twice, it erases the device's learned routes. This is not hypothetical — the first version recomputed unconditionally and `test/routes-agreement.test.js` caught it, a device whose fixture-installed `ospfRoutes` came back with one prefix instead of four; * asking must not rewrite the configuration, and rows keep their distances and `is directly connected` wording.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge#1360
No description provided.