cli: show ip ospf neighbor prints the device's six columns - Pri and Dead Time included #1708

Merged
jaylouisw merged 1 commit from rev/1116-1800 into main 2026-11-16 18:35:47 +00:00
Owner

The neighbour table printed four of the six fields a real box prints, in a different order: Address and Interface sat where Pri and Dead Time belong.

Question: which fields does show ip ospf neighbor print, in what order, at what column, and what is Dead Time counting?

Evidence

  • Cisco 13688-16: the six fields in order, with Pri = the neighbour's priority (default 1) and Dead Time = "the amount of time that remains as the router waits to receive an OSPF hello packet from the neighbor before it declares the neighbor is down".
  • ntc-templates raw capture (whitespace intact): fields at 0 / 16 (Pri right-aligned, ends 18) / 22 / 38 / 50 / 66, all four sample rows on the same columns.
  • RFC 2328 A.3.2: Router Priority, HelloInterval and RouterDeadInterval travel in the Hello.
  • Cisco 13683-11: three neighbours in one table at 32/33/39 s, i.e. the countdown runs per neighbour from the last Hello.

Change

  • show ip ospf neighbor prints Neighbor ID Pri State Dead Time Address Interface at the measured widths.
  • ospfNeighbors[].priority carries the neighbour's Hello priority (1 everywhere; ip ospf priority is not modelled).
  • Dead Time comes from convergence.ospfTimers() - the schedule OSPF already converges on - so a converged table prints the whole interval and a finite run instant prints the countdown.
  • docs/CLI.md sample and prose updated; research/ospf-neighbor-table-layout.md records sources, inferences and the open questions (row expiry at zero, FULL/ - spacing, the hour form).

Tests

  • test/show-ospf.test.js 46 -> 64 assertions (header string, six column positions, Pri alignment, the countdown at t=0/4 s/9 s/10 s/14 s, and a 120 s dead interval over a 30 s hello).
  • node scripts/syntax-check.js: 355 files OK. Full suite: 284 suites, 10166 assertions, 0 failed.
The neighbour table printed four of the six fields a real box prints, in a different order: Address and Interface sat where Pri and Dead Time belong. **Question:** which fields does `show ip ospf neighbor` print, in what order, at what column, and what is `Dead Time` counting? **Evidence** - Cisco 13688-16: the six fields in order, with Pri = the neighbour's priority (default 1) and Dead Time = "the amount of time that remains as the router waits to receive an OSPF hello packet from the neighbor before it declares the neighbor is down". - ntc-templates raw capture (whitespace intact): fields at 0 / 16 (Pri right-aligned, ends 18) / 22 / 38 / 50 / 66, all four sample rows on the same columns. - RFC 2328 A.3.2: Router Priority, HelloInterval and RouterDeadInterval travel in the Hello. - Cisco 13683-11: three neighbours in one table at 32/33/39 s, i.e. the countdown runs per neighbour from the last Hello. **Change** - `show ip ospf neighbor` prints `Neighbor ID Pri State Dead Time Address Interface` at the measured widths. - `ospfNeighbors[].priority` carries the neighbour's Hello priority (1 everywhere; `ip ospf priority` is not modelled). - Dead Time comes from `convergence.ospfTimers()` - the schedule OSPF already converges on - so a converged table prints the whole interval and a finite run instant prints the countdown. - `docs/CLI.md` sample and prose updated; `research/ospf-neighbor-table-layout.md` records sources, inferences and the open questions (row expiry at zero, `FULL/ -` spacing, the hour form). **Tests** - `test/show-ospf.test.js` 46 -> 64 assertions (header string, six column positions, Pri alignment, the countdown at t=0/4 s/9 s/10 s/14 s, and a 120 s dead interval over a 30 s hello). - `node scripts/syntax-check.js`: 355 files OK. Full suite: 284 suites, 10166 assertions, 0 failed.
cli: show ip ospf neighbor prints the device's six columns - Pri and Dead Time included
All checks were successful
CI / Classify the change (pull_request) Successful in 14s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 13s
CI / Server smoke test (pull_request) Successful in 13s
CI / Docker build (pull_request) Successful in 31s
CI / Test (Node 20) (pull_request) Successful in 1m3s
CI / Test (Node 18) (pull_request) Successful in 1m10s
CI / Test (Node 22) (pull_request) Successful in 1m1s
97a7a9ed9c
The table printed four of the six fields a real box prints, and in a different order: Address
and Interface sat where Pri and Dead Time belong, so a reader who knew the command looked for a
countdown that was not there and found the port under `Address`.

The widths are measured off a capture whose spacing survives (ntc-templates keeps the raw CLI
text): Neighbor ID@0, Pri right-aligned in three columns ending at 18, State@22, Dead Time@38,
Address@50, Interface@66. Cisco 13688-16 lists the same six fields in the same order.

Pri is the neighbour's Hello priority, now carried as ospfNeighbors[].priority. It is 1 on every
port because `ip ospf priority` is not modelled - held as a number so the day the command exists
the table reads it instead of being rewritten.

Dead Time is the Router Dead Interval counting down from the last Hello, taken from
convergence.ospfTimers() - the timers the convergence schedule already runs OSPF on, not a second
table - so a converged table prints the whole interval (00:00:40 over the default 10 s hello) and
a run stopped 15 s in prints 00:00:35.

research/ospf-neighbor-table-layout.md: sources, what is inferred (no Hello jitter, the rounding),
and what is unresolved (what the row does when the timer expires, `FULL/ -` versus `FULL/  -`, the
hour form, the Dell Area column).

Tests: test/show-ospf.test.js 46 -> 64 assertions; full suite 284 suites / 10166 assertions, 0 failed.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 18:35:31 +00:00
jaylouisw force-pushed rev/1116-1800 from 97a7a9ed9c
All checks were successful
CI / Classify the change (pull_request) Successful in 14s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 13s
CI / Server smoke test (pull_request) Successful in 13s
CI / Docker build (pull_request) Successful in 31s
CI / Test (Node 20) (pull_request) Successful in 1m3s
CI / Test (Node 18) (pull_request) Successful in 1m10s
CI / Test (Node 22) (pull_request) Successful in 1m1s
to 35cb54d4de
All checks were successful
CI / Classify the change (pull_request) Successful in 14s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 15s
CI / Test (Node 18) (pull_request) Has been skipped
CI / Test (Node 20) (pull_request) Has been skipped
CI / Test (Node 22) (pull_request) Has been skipped
CI / Server smoke test (pull_request) Has been skipped
CI / Docker build (pull_request) Has been skipped
2026-11-16 18:35:36 +00:00
Compare
Sign in to join this conversation.
No reviewers
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!1708
No description provided.