docs(CLI): the running-config table lists NAT, the bridge priority and clock rate #2042

Merged
jaylouisw merged 1 commit from docs/1118-2147 into main 2026-11-18 22:08:03 +00:00
Owner

What was untrue

docs/CLI.md -> What the config contains opens with "the output is also complete: every object the CLI can configure appears in it" and then enumerates the printed sections in a table. Three things the printer writes had no row:

  • ip nat pool <name> <start> <end> netmask <mask> and one ip nat inside source ... line per rule, plus per-interface ip nat inside / ip nat outside;
  • spanning-tree priority <n>;
  • clock rate <bps> inside a serial interface block.

Evidence from the code

engine/cli.js (running-config printer) pushes ip nat pool ... and each rule via nat.formatRuleLine(), then spanning-tree priority, both before the for (const i of dev.interfaces.values()) walk; clock rate is pushed inside that walk; ip nat inside|outside comes from i.natRole. test/config-completeness.test.js already declares both keys (stpPriority, nat) as things the printer must cover, so the table was behind its own guard.

Verified by typing it back: ip nat pool WAN 203.0.113.1 203.0.113.6 netmask 255.255.255.0, ip nat inside source list 192.168.10.0/24 interface Gi0/1 overload, ip nat inside source static 192.168.10.60 203.0.113.1 tcp 443 and spanning-tree priority 4096 all print in exactly that form and replay.

Second, smaller correction in the same sentence

The paragraph after the table said a value equal to the assumed default "is printed only when it differs, which is the same rule the rest of the config follows". A typed spanning-tree priority 32768 is printed (the printer tests stpPriority !== null, not the value), so the page now states that exception instead of contradicting the console.

Guards (before -> after)

  • node scripts/syntax-check.js — 425 files, all OK (unchanged)
  • docs-cli-transcript — 4 passed / 0 failed (unchanged)
  • docs-show-commands — 7 passed / 0 failed, 59 forms / 118 commands (unchanged)
  • help-completeness — 8 passed / 0 failed, 102 advertised commands (unchanged)
  • no-form-help-key — 81 / 0 (unchanged)
  • config-completeness — 59 / 0 (unchanged)
  • check-doc-citations — 356 citations, no judgement over 40 lines (unchanged)

Docs-only: no engine change.

## What was untrue `docs/CLI.md` -> *What the config contains* opens with "the output is also **complete**: every object the CLI can configure appears in it" and then enumerates the printed sections in a table. Three things the printer writes had no row: * `ip nat pool <name> <start> <end> netmask <mask>` and one `ip nat inside source ...` line per rule, plus per-interface `ip nat inside` / `ip nat outside`; * `spanning-tree priority <n>`; * `clock rate <bps>` inside a serial interface block. ## Evidence from the code `engine/cli.js` (running-config printer) pushes `ip nat pool ...` and each rule via `nat.formatRuleLine()`, then `spanning-tree priority`, both before the `for (const i of dev.interfaces.values())` walk; `clock rate` is pushed inside that walk; `ip nat inside|outside` comes from `i.natRole`. `test/config-completeness.test.js` already declares both keys (`stpPriority`, `nat`) as things the printer must cover, so the table was behind its own guard. Verified by typing it back: `ip nat pool WAN 203.0.113.1 203.0.113.6 netmask 255.255.255.0`, `ip nat inside source list 192.168.10.0/24 interface Gi0/1 overload`, `ip nat inside source static 192.168.10.60 203.0.113.1 tcp 443` and `spanning-tree priority 4096` all print in exactly that form and replay. ## Second, smaller correction in the same sentence The paragraph after the table said a value equal to the assumed default "is printed only when it differs, which is the same rule the rest of the config follows". A typed `spanning-tree priority 32768` **is** printed (the printer tests `stpPriority !== null`, not the value), so the page now states that exception instead of contradicting the console. ## Guards (before -> after) * `node scripts/syntax-check.js` — 425 files, all OK (unchanged) * docs-cli-transcript — 4 passed / 0 failed (unchanged) * docs-show-commands — 7 passed / 0 failed, 59 forms / 118 commands (unchanged) * help-completeness — 8 passed / 0 failed, 102 advertised commands (unchanged) * no-form-help-key — 81 / 0 (unchanged) * config-completeness — 59 / 0 (unchanged) * check-doc-citations — 356 citations, no judgement over 40 lines (unchanged) Docs-only: no engine change.
docs(CLI): the running-config table lists NAT, the bridge priority and clock rate
All checks were successful
CI / Classify the change (pull_request) Successful in 5s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 4s
CI / Server smoke test (pull_request) Has been skipped
CI / Docker build (pull_request) Has been skipped
CI / Test (Node 20) (pull_request) Successful in 53s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Test (Node 18) (pull_request) Successful in 58s
CI / Arm auto-merge (pull_request) Successful in 2s
1373df305d
The page says the printed config is complete and enumerates its sections, but three
lines the printer writes had no row: `ip nat pool` + `ip nat inside source ...` (and
the per-interface `ip nat inside|outside`), `spanning-tree priority <n>`, and the
per-interface `clock rate <bps>` on a serial DCE. engine/cli.js prints the first two
above the first interface block and the third inside it; test/config-completeness.test.js
already declares `nat` and `stpPriority` as keys the printer must cover.

The page's default-value sentence claimed every value equal to the assumed default is
omitted; a typed `spanning-tree priority 32768` is printed, so that exception is stated.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-18 22:01:00 +00:00
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!2042
No description provided.