cli(nat): the plain translation table ends at Outside global, as a box's does #2396

Merged
jaylouisw merged 1 commit from rev/1121-0842 into main 2026-11-21 09:12:26 +00:00
Owner

Question

Does the plain show ip nat translations table have a sixth column, and where does its inside-global column start?

Sources

  • Catalyst 9600 17.18 command reference, show ip nat translations (PDF, p.156) - five columns, ends at Outside global
  • IOS 12.4T / 15.2S NAT configuration guide, "Monitoring and Maintaining NAT" (archived) - five columns
  • IOS XE 17.x "Monitoring and Maintaining NAT" (PDF) - five fields in prose, no sixth
  • Catalyst 9000 NAT configuration note (PDF) - icmp row under a heading whose Inside global starts at column 4
  • Cisco NAT terms article (4606-8) - --- 172.16.68.5 10.10.10.1 --- ---

Verdict

Settled: five columns, no translation-type field; the protocol field ends at column 4; a portless entry prints --- where the protocol goes. The three address widths remain unresolved (16/15/15 vs 19/19/19, unattributed), so they stay at this console's 23 and the widening is recorded rather than guessed.

Changed

  • engine/nat.js: rows stop at the outside-global address; heading and rows share one set of column stops (protocol field 4 wide); any prints as --- in the protocol column.
  • test/nat.test.js (+5 assertions incl. the icmp overrun and the portless --- row), test/protocol-regression.test.js, test/nat-translations-total.test.js (heading), docs/CLI.md example and prose, research/show-ip-nat-translations-columns.md (follow-up taken, widths still open).

Tests

node scripts/syntax-check.js 521 files OK; full npm test: 441 suites, 14,867 assertions, 0 failed.

Unresolved

Which platform prints 16/15/15 vs 19/19/19; a raw show tech-support or pasted session log with spacing intact would settle it.

## Question Does the plain `show ip nat translations` table have a sixth column, and where does its inside-global column start? ## Sources * Catalyst 9600 17.18 command reference, `show ip nat translations` (PDF, p.156) - five columns, ends at `Outside global` * IOS 12.4T / 15.2S NAT configuration guide, "Monitoring and Maintaining NAT" (archived) - five columns * IOS XE 17.x "Monitoring and Maintaining NAT" (PDF) - five fields in prose, no sixth * Catalyst 9000 NAT configuration note (PDF) - `icmp` row under a heading whose `Inside global` starts at column 4 * Cisco NAT terms article (4606-8) - `--- 172.16.68.5 10.10.10.1 --- ---` ## Verdict Settled: five columns, no translation-type field; the protocol field ends at column 4; a portless entry prints `---` where the protocol goes. The three address widths remain unresolved (16/15/15 vs 19/19/19, unattributed), so they stay at this console's 23 and the widening is recorded rather than guessed. ## Changed * `engine/nat.js`: rows stop at the outside-global address; heading and rows share one set of column stops (protocol field 4 wide); `any` prints as `---` in the protocol column. * `test/nat.test.js` (+5 assertions incl. the `icmp` overrun and the portless `---` row), `test/protocol-regression.test.js`, `test/nat-translations-total.test.js` (heading), `docs/CLI.md` example and prose, `research/show-ip-nat-translations-columns.md` (follow-up taken, widths still open). ## Tests `node scripts/syntax-check.js` 521 files OK; full `npm test`: **441 suites, 14,867 assertions, 0 failed**. ## Unresolved Which platform prints 16/15/15 vs 19/19/19; a raw `show tech-support` or pasted session log with spacing intact would settle it.
cli(nat): the plain translation table ends at Outside global, as a box's does
All checks were successful
CI / Classify the change (pull_request) Successful in 16s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 5s
CI / Server smoke and Docker build (pull_request) Successful in 26s
CI / Test (Node 20) (pull_request) Successful in 1m1s
CI / Test (Node 22) (pull_request) Successful in 1m3s
CI / Test (Node 18) (pull_request) Successful in 1m7s
CI / Arm auto-merge (pull_request) Successful in 2s
0053c3a34c
`show ip nat translations` printed a sixth field that no IOS sample has: the
translation's type (`pat`/`static`) after the outside-global address. Every
vendor sample of the plain table - Catalyst 9600 17.18 command reference,
12.4T/15.2S NAT guide, IOS XE 17.x guide, and the NAT terms article - ends at
`Outside global`; a box prints the type only under `verbose`, as `flags:`.
The rows now stop there. The distinction is still readable where a box keeps
it: `show ip nat rules` names the rule (with `overload` for PAT) and
`show ip nat statistics` counts rules by type.

Two more facts the same samples agree on were adopted with it:

* the protocol field ends at column 4 (`Pro `, `tcp `, `udp `), not 5. The
  heading and the rows are now built from one set of column stops, so they
  cannot drift; a four-character `icmp` overruns its stop by one and does not
  shift the columns after it, which is what the Catalyst 9000 capture shows.
* a translation with no protocol prints `---` in that column, not this
  model's internal `any` (`--- 172.16.68.5 10.10.10.1 --- ---`).

The three address cells keep this console's own 23 columns: the documents in
hand disagree (16/15/15 vs 19/19/19) and nothing read here attributes either
geometry to a platform, so picking one would be a coin flip. That remains the
open half, recorded in research/show-ip-nat-translations-columns.md, which
this change takes its follow-up from.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-21 08:58:22 +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!2396
No description provided.