show vlan brief: a trunk port is in no row, and a trunk's allowed list creates no VLAN #1638

Merged
jaylouisw merged 1 commit from rev/1116-0830 into main 2026-11-16 08:54:05 +00:00
Owner

Question

On a Cisco-style access switch, does show vlan brief list a trunk port in the VLANs it carries?

Verdict

No. The Ports column is access membership, and the row set is the VLAN database.

  • Cisco IOS LAN Switching Command Reference, show vlan: "When displaying multiple VLANs only non-trunk ports are displayed"; show vlan all-ports exists to add trunks.
  • Cisco support KB: "Trunk ports never show up under any VLANs."

PacketForge listed a trunk in every VLAN it carried, because membership was decided by classifyEgress() - the data plane rule (#1261), right about forwarding and wrong about this table. It also invented rows for VLANs that only a trunk's allowed vlan list named.

Changed

  • engine/cli.js: show vlan / show vlan brief builds rows from the VLAN database only, and skips trunk-mode ports in the Ports cell.
  • test/show-vlan.test.js: membership section asserts the vendor rule (listed iff access port belonging to the VLAN), plus a lab where a trunk allows two VLANs nobody created.
  • test/trunk-allowed-add-remove.test.js: the show vlan brief check now expects no rows for non-existent VLANs and no trunk in any row.
  • docs/CLI.md: the show vlan row says access ports.
  • research/vlan-brief-trunk-ports.md: evidence, the unconnected-trunk contradiction, and the EtherChannel / show vlan id items left open.

classifyEgress() is untouched: the data plane still forwards every VLAN a trunk allows.

Tests

node scripts/syntax-check.js - 345 files OK; npm test - 275 suites, 9851 assertions, 0 failed.

## Question On a Cisco-style access switch, does `show vlan brief` list a **trunk port** in the VLANs it carries? ## Verdict No. The Ports column is *access* membership, and the row set is the VLAN database. - Cisco IOS LAN Switching Command Reference, `show vlan`: "When displaying multiple VLANs only non-trunk ports are displayed"; `show vlan all-ports` exists to add trunks. - Cisco support KB: "Trunk ports never show up under any VLANs." PacketForge listed a trunk in every VLAN it carried, because membership was decided by `classifyEgress()` - the data plane rule (#1261), right about forwarding and wrong about this table. It also invented rows for VLANs that only a trunk's `allowed vlan` list named. ## Changed - `engine/cli.js`: `show vlan` / `show vlan brief` builds rows from the VLAN database only, and skips trunk-mode ports in the Ports cell. - `test/show-vlan.test.js`: membership section asserts the vendor rule (listed iff access port belonging to the VLAN), plus a lab where a trunk allows two VLANs nobody created. - `test/trunk-allowed-add-remove.test.js`: the `show vlan brief` check now expects no rows for non-existent VLANs and no trunk in any row. - `docs/CLI.md`: the `show vlan` row says access ports. - `research/vlan-brief-trunk-ports.md`: evidence, the unconnected-trunk contradiction, and the EtherChannel / `show vlan id` items left open. `classifyEgress()` is untouched: the data plane still forwards every VLAN a trunk allows. ## Tests `node scripts/syntax-check.js` - 345 files OK; `npm test` - **275 suites, 9851 assertions, 0 failed**.
show vlan brief: a trunk port is in no row, and a trunk's allowed list creates no VLAN
All checks were successful
CI / Classify the change (pull_request) Successful in 13s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 17s
CI / Server smoke test (pull_request) Successful in 21s
CI / Docker build (pull_request) Successful in 33s
CI / Test (Node 20) (pull_request) Successful in 1m20s
CI / Test (Node 18) (pull_request) Successful in 1m42s
CI / Test (Node 22) (pull_request) Successful in 1m44s
cba17987e5
Cisco's LAN Switching Command Reference states the rule for the multi-VLAN form:
'When displaying multiple VLANs only non-trunk ports are displayed', and
'show vlan all-ports' exists to add trunks. The support KB is blunter: 'Trunk
ports never show up under any VLANs'.

The Ports column is access membership; the row set is the VLAN database. The
table was built from classifyEgress() - the data plane's rule, which is right
about forwarding and wrong about this view - so a trunk was listed in every
VLAN it carried and a trunk's allowed list invented rows for VLANs that did
not exist in config.vlans.

Evidence and the one contradiction (unconnected trunks) in
research/vlan-brief-trunk-ports.md.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 08:53:51 +00:00
jaylouisw force-pushed rev/1116-0830 from cba17987e5
All checks were successful
CI / Classify the change (pull_request) Successful in 13s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 17s
CI / Server smoke test (pull_request) Successful in 21s
CI / Docker build (pull_request) Successful in 33s
CI / Test (Node 20) (pull_request) Successful in 1m20s
CI / Test (Node 18) (pull_request) Successful in 1m42s
CI / Test (Node 22) (pull_request) Successful in 1m44s
to c466bb56ec
All checks were successful
CI / Classify the change (pull_request) Successful in 13s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 12s
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 08:53:54 +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!1638
No description provided.