Skip to content

fix: Vlan trunk restrictions - #2456

Open
stevekeay wants to merge 3 commits into
mainfrom
vlan-trunk-restrictions
Open

stevekeay wants to merge 3 commits into
mainfrom
vlan-trunk-restrictions

Conversation

@stevekeay

Copy link
Copy Markdown
Contributor

The check was added to prevent the user from claiming a segmentation ID
that happens to be the same as the parent port of this vlan. We don't
want to allow that situation because the switch (stupidly) rejects that
configuration.

However, the way the check was implemented was too restrictive - it
banned a range of thousands of VLAN IDs. It did successfully prevent
all theoretical clashes present and future, but it also prevented
legitimate configurations and caused an upset customer.

We update this check so that it now compares the VLAN ID of the actual
native VLAN on this trunk interface, and only raises an error if the
user is configuring a number that would currently clash.

The theoretical valid range is 1-4094 according to 802.1Q.

However we would avoid VLAN 1, and we must avoid our nxos "reserved" vlan range 3872-3999.

On Nexus 9000 NX-OS, Cisco treats VLANs 4048-4093 as their own. These
might work, but even if they work today, they might randomly stop
working at some future point.

So this puts the realistic useable VLAN range at 2-3871 inclusive.

There was an existing config setting that seemed to do the right thing so I
piggy-backed on that rather than create another that does almost exactly
the same thing.

The check was added to prevent the user from claiming a segmentation ID
that happens to be the same as the parent port of this vlan.  We don't
want to allow that situation because the switch (stupidly) rejects that
configuration.

However, the way the check was implemented was too restrictive - it
banned a range of thousands of VLAN IDs.  It did successfully prevent
all theoretical clashes present and future, but it also prevented
legitimate configurations and caused an upset customer.

We update this check so that it now compares the VLAN ID of the actual
native VLAN on this trunk interface, and only raises an error if the
user is configuring a number that would currently clash.

The theoretical valid range is 1-4094 according to 802.1Q.

However we would avoid VLAN 1, and we must avoid our nxos "reserved" vlan range 3872-3999.

On Nexus 9000 NX-OS, Cisco treats VLANs 4048-4093 as their own.  These
might work, but even if they work today, they might randomly stop
working at some future point.

So this puts the realistic useable VLAN range at 2-3871 inclusive.
Avoid VLANs that may be reserved/used by Cisco for their own purposes.
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Python test results

129 tests   129 ✅  9s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 8498de8.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant