docs: show vlan lists access members only - a trunk is in no row #1886

Merged
jaylouisw merged 1 commit from docs/1117-1846 into main 2026-11-17 18:51:03 +00:00
Owner

docs/CLI.md, Reading show vlan, documented the membership rule that #1638 replaced.

The page said:

Membership is decided by the same rule the switch forwards by ... a trunk appears in every VLAN its allowed list names ... a trunk with allowedVlan all appears in every row.

engine/cli.js (show vlan, the membership loop) does the opposite: if (i.vlan && i.vlan.mode === 'trunk') continue; - a trunk port is in no row at all - and the comment says why: Cisco's usage guideline ("When displaying multiple VLANs only non-trunk ports are displayed"), with research/vlan-brief-trunk-ports.md as the evidence. test/show-vlan.test.js asserts it for both a trunk with an explicit allowed list and one that allows every VLAN.

Reproduced on a C9200L-24T-4G: trunk Gi1/0/1 with allowed vlan 20,30, VLANs 20 and 30 created, access VLAN 20 on Gi1/0/2 - show vlan brief lists 20 ... Gi1/0/2 and 30 ... (empty); Gi1/0/1 is in no Ports cell, VLAN 1 included.

The same paragraph's row-set sentence ("or if a port uses it") was also stale: after no vlan 22 the port keeps the id, the row is gone, and show interfaces reports the port inactive until vlan 22 returns.

Docs-only. Guards: syntax-check 393 files OK; docs-cli-transcript 4/0; docs-show-commands 7/0; help-completeness 8/0 (unchanged before and after); help-key-is-not-a-value 40/0; no-form-help-key 81/0; show-vlan 34/0; doc-catalog-counts 43; doc-citations 11/0.

`docs/CLI.md`, **Reading `show vlan`**, documented the membership rule that #1638 replaced. The page said: > Membership is decided by the same rule the switch forwards by ... a trunk appears in every VLAN its allowed list names ... a trunk with `allowedVlan all` appears in every row. `engine/cli.js` (`show vlan`, the membership loop) does the opposite: `if (i.vlan && i.vlan.mode === 'trunk') continue;` - a trunk port is in no row at all - and the comment says why: Cisco's usage guideline ("When displaying multiple VLANs only non-trunk ports are displayed"), with `research/vlan-brief-trunk-ports.md` as the evidence. `test/show-vlan.test.js` asserts it for both a trunk with an explicit allowed list and one that allows every VLAN. Reproduced on a C9200L-24T-4G: trunk Gi1/0/1 with `allowed vlan 20,30`, VLANs 20 and 30 created, access VLAN 20 on Gi1/0/2 - `show vlan brief` lists `20 ... Gi1/0/2` and `30 ... (empty)`; Gi1/0/1 is in no Ports cell, VLAN 1 included. The same paragraph's row-set sentence ("or if a port uses it") was also stale: after `no vlan 22` the port keeps the id, the row is gone, and `show interfaces` reports the port inactive until `vlan 22` returns. Docs-only. Guards: syntax-check 393 files OK; docs-cli-transcript 4/0; docs-show-commands 7/0; help-completeness 8/0 (unchanged before and after); help-key-is-not-a-value 40/0; no-form-help-key 81/0; show-vlan 34/0; doc-catalog-counts 43; doc-citations 11/0.
docs: show vlan's Ports column is access membership, and a trunk is in no row
All checks were successful
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
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 51s
CI / Test (Node 22) (pull_request) Successful in 55s
CI / Test (Node 18) (pull_request) Successful in 59s
CI / Arm auto-merge (pull_request) Successful in 15s
01c110bc15
The 'Reading show vlan' bullets still described the rule replaced in #1638:
a trunk appearing in every VLAN its allowed list names, and in every row
when the list is 'all'. engine/cli.js skips a trunk port outright
('if (i.vlan && i.vlan.mode === "trunk") continue') and builds the row set
from the VLAN database plus access ports, so the page sent an operator
looking for a trunk in a table that never prints one.

Also corrects the row-set sentence: 'or if a port uses it' no longer holds
after 'no vlan 22' - the port keeps the id, the row goes, and show
interfaces reports it inactive.
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!1886
No description provided.