vlan: a voice VLAN belongs to an access port, and a trunk only stores it #1877

Merged
jaylouisw merged 1 commit from rev/1117-1730 into main 2026-11-17 17:49:20 +00:00
Owner

The rule

switchport voice vlan <id> is the one command that puts a phone's tagged VLAN and a PC's untagged VLAN on the same port. This console had the rule backwards in both directions:

  • validatePortConfig refused a voice VLAN on an access port - "voice traffic is tagged";
  • classifyEgress/classifyIngress carried it on a trunk whether or not the allowed list named it;
  • switchportSentence called an access port's voice VLAN "stored, not in use".

So the one configuration a Cisco phone actually uses was reported as doing nothing, and the one place Cisco says the feature does not work was the place it worked.

The evidence

Every current Cisco switching guide states the same prerequisite:

Voice VLAN configuration is only supported on device access ports; voice VLAN configuration is not supported on trunk ports.

Note Trunk ports can carry any number of voice VLANs, similar to regular VLANs. The configuration of voice VLANs is not supported on trunk ports.

and the 9600 port-security chapter adds that on a trunk the configuration is allowed yet does nothing:

Voice VLAN is only supported on access ports and not on trunk ports, even though the configuration is allowed.

Full write-up, including what is inferred rather than quoted (the dual row in show vlan brief): research/voice-vlan-port-mode.md.

The change

  • classifyEgress - an access port sends the voice VLAN tagged (marked voice) beside the untagged access VLAN and still drops every other VLAN. A trunk is decided by its allowed list alone.
  • classifyIngress - an access port accepts the one tagged VLAN it is configured for; every other tag is still tagged-frame-on-access. The trunk lost its voice exemption.
  • validatePortConfig - the warning moved to the trunk case: "voiceVlan 20 has no effect on a trunk port: a voice VLAN applies to access ports".
  • switchportSentence and its web/app.js mirror - access VLAN 10 · voice 20 (tagged); a trunk prints · voice 20 (no effect on a trunk).
  • framesCompatible/mismatchReason - two access ports in the same data VLAN but with different voice VLANs no longer look interchangeable to a LAG member check.
  • no vlan <id> - the reference guard still refuses, but names (voice) on an access port and (voice, no effect) on a trunk, and no longer claims the port went inactive in a VLAN that was never its data VLAN.
  • show vlan needed no change: it asks classifyEgress, so a voice port is now listed under both VLANs - the transcript in docs/CLI.md shows the two rows.

Verification

node scripts/syntax-check.js - 392 files, all OK.
npm test - 320 suites, 11157 assertions, 0 failed.

Suite deltas: voice-vlan 37 -> 39 assertions (command receipts, classifier in both directions, dual show vlan rows), vlan 60 -> 62, switchport-agreement 12 -> 13 (the sentence is now checked against a live voice claim, and against the inert one on a trunk), vlan-delete-leaves-port-inactive 21 -> 27.

## The rule `switchport voice vlan <id>` is the one command that puts a phone's tagged VLAN and a PC's untagged VLAN on the same port. This console had the rule backwards in both directions: * `validatePortConfig` refused a voice VLAN on an **access** port - "voice traffic is tagged"; * `classifyEgress`/`classifyIngress` carried it on a **trunk** whether or not the allowed list named it; * `switchportSentence` called an access port's voice VLAN "stored, not in use". So the one configuration a Cisco phone actually uses was reported as doing nothing, and the one place Cisco says the feature does not work was the place it worked. ## The evidence Every current Cisco switching guide states the same prerequisite: > Voice VLAN configuration is only supported on device access ports; voice VLAN configuration is not supported on trunk ports. > > **Note** Trunk ports can carry any number of voice VLANs, similar to regular VLANs. The configuration of voice VLANs is not supported on trunk ports. - [Catalyst 9200 VLAN Configuration Guide 17.17 - Configuring Voice VLANs](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9200/software/release/17-17/configuration_guide/vlan/b_1717_vlan_9200_cg/configuring_voice_vlans.html) - [Catalyst 9600 VLAN Configuration Guide 17.12 - Configuring Voice VLANs](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9600/software/release/17-12/configuration_guide/vlan/b_1712_vlan_9600_cg/configuring_voice_vlans.html) and the 9600 port-security chapter adds that on a trunk the configuration is allowed yet does nothing: > Voice VLAN is only supported on access ports and not on trunk ports, even though the configuration is allowed. - [Catalyst 9600 Security Configuration Guide - Port Security](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9600/software/release/26-x/configuration_guide/sec/b_26x_sec_9600_cg/port_security.html) Full write-up, including what is inferred rather than quoted (the dual row in `show vlan brief`): `research/voice-vlan-port-mode.md`. ## The change * `classifyEgress` - an access port sends the voice VLAN tagged (marked `voice`) beside the untagged access VLAN and still drops every other VLAN. A trunk is decided by its allowed list alone. * `classifyIngress` - an access port accepts the one tagged VLAN it is configured for; every other tag is still `tagged-frame-on-access`. The trunk lost its voice exemption. * `validatePortConfig` - the warning moved to the trunk case: "voiceVlan 20 has no effect on a trunk port: a voice VLAN applies to access ports". * `switchportSentence` and its `web/app.js` mirror - `access VLAN 10 · voice 20 (tagged)`; a trunk prints `· voice 20 (no effect on a trunk)`. * `framesCompatible`/`mismatchReason` - two access ports in the same data VLAN but with different voice VLANs no longer look interchangeable to a LAG member check. * `no vlan <id>` - the reference guard still refuses, but names `(voice)` on an access port and `(voice, no effect)` on a trunk, and no longer claims the port went inactive in a VLAN that was never its data VLAN. * `show vlan` needed no change: it asks `classifyEgress`, so a voice port is now listed under both VLANs - the transcript in `docs/CLI.md` shows the two rows. ## Verification `node scripts/syntax-check.js` - 392 files, all OK. `npm test` - **320 suites, 11157 assertions, 0 failed**. Suite deltas: `voice-vlan` 37 -> 39 assertions (command receipts, classifier in both directions, dual `show vlan` rows), `vlan` 60 -> 62, `switchport-agreement` 12 -> 13 (the sentence is now checked against a live voice claim, and against the inert one on a trunk), `vlan-delete-leaves-port-inactive` 21 -> 27.
vlan: a voice VLAN belongs to an access port, and a trunk only stores it
All checks were successful
CI / Classify the change (pull_request) Successful in 9s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 17s
CI / Server smoke test (pull_request) Successful in 10s
CI / Docker build (pull_request) Successful in 23s
CI / Test (Node 20) (pull_request) Successful in 48s
CI / Test (Node 22) (pull_request) Successful in 51s
CI / Test (Node 18) (pull_request) Successful in 55s
CI / Arm auto-merge (pull_request) Successful in 6s
e2fda7572c
`switchport voice vlan <id>` had its rule backwards in both directions. `validatePortConfig`
refused a voice VLAN on an access port ("voice traffic is tagged"), `classifyEgress` carried
it on a trunk whether or not the allowed list named it, and an access port with a voice VLAN
was reported as "stored, not in use" - so the one configuration a Cisco IP phone actually uses
was the one this console said did nothing.

Every current Cisco switching guide states the prerequisite the same way: voice VLAN
configuration "is only supported on device access ports; ... not supported on trunk ports",
and the note beside it says a trunk "can carry any number of voice VLANs, similar to regular
VLANs". The 9600 port-security chapter adds that the configuration is allowed on a trunk and
still has no effect (research/voice-vlan-port-mode.md).

- `classifyEgress`: an access port sends the voice VLAN tagged and marks it as voice, sends its
  access VLAN untagged and still drops everything else. A trunk is told what to carry by its
  allowed list alone.
- `classifyIngress`: an access port accepts the one tagged VLAN it is configured for and still
  refuses every other tag with `tagged-frame-on-access`; the trunk lost its voice exemption.
- `validatePortConfig`: the warning moved to the trunk case, where the parameter really is inert.
- `switchportSentence` (and its panel mirror): `access VLAN 10 · voice 20 (tagged)` against
  `... · voice 20 (no effect on a trunk)`.
- `framesCompatible`/`mismatchReason`: two access ports with different voice VLANs no longer
  look interchangeable to a LAG member check.
- `no vlan <id>` still refuses a VLAN a voice port references, but names an access port's
  reference `(voice)`, a trunk's `(voice, no effect)`, and no longer calls the port inactive in it.
- `show vlan` needed no change of its own: it asks `classifyEgress`, so a voice port is now
  listed under both its access VLAN and its voice VLAN.

Closes nothing; #1368 and #1701 are the earlier halves of the same field.

Tests: npm test - 320 suites, 11157 assertions, 0 failed.
jaylouisw force-pushed rev/1117-1730 from e2fda7572c
All checks were successful
CI / Classify the change (pull_request) Successful in 9s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 17s
CI / Server smoke test (pull_request) Successful in 10s
CI / Docker build (pull_request) Successful in 23s
CI / Test (Node 20) (pull_request) Successful in 48s
CI / Test (Node 22) (pull_request) Successful in 51s
CI / Test (Node 18) (pull_request) Successful in 55s
CI / Arm auto-merge (pull_request) Successful in 6s
to 9898d3a99a
All checks were successful
CI / Classify the change (pull_request) Successful in 10s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 23s
CI / Test (Node 20) (pull_request) Successful in 50s
CI / Test (Node 18) (pull_request) Successful in 55s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Arm auto-merge (pull_request) Successful in 20s
2026-11-17 17:47:16 +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!1877
No description provided.