Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add min/max VID values to VLAN groups for validation #8168

Closed
jeremystretch opened this issue Dec 23, 2021 · 5 comments
Closed

Add min/max VID values to VLAN groups for validation #8168

jeremystretch opened this issue Dec 23, 2021 · 5 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.1.2

Feature type

Data model extension

Proposed functionality

Add two new fields to the VLANGroup model:

  • min_vid
  • max_vid

These fields will be used to validate the assignment of child VLANs to the group. They will default to the absolute minimum and maximum values for a VLAN ID (1 and 4094 respectively), so their introduction will not cause a breaking change.

Use case

This was originally proposed under #2658 but warrants its own separate FR.

It would be great to create a VLAN group and restricting this group to a selected amount of VLAN's (for instance, 150 - 170). We use VLAN groups for each customer deployment. This will keep each customer in its own group and prevent over-exhaustion of VLAN's.

Database changes

Add two new positive small integer fields to the VLANGroup model as noted above.

External dependencies

No response

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application labels Dec 23, 2021
@jeremystretch jeremystretch added this to the v3.2 milestone Dec 23, 2021
@jeremystretch jeremystretch self-assigned this Dec 23, 2021
@PieterL75
Copy link
Contributor

Maybe extend this idea a little bit ?
We could introduce a 'VlanRange' object type, just like ip ranges.
a vlanrange has to be part of a vlangroup.
the vlangroup always will contain all vlans and makes sure they are unique.
the vlanrange then can be used to provision vlans within a certain range of the vlangroup.

@jeremystretch
Copy link
Member Author

That sounds over-complicated IMO. VLAN groups essentially already function as ranges; this just provides the option of reducing the range from the default min/max VIDs.

@PieterL75
Copy link
Contributor

Giving it a second thought..
and yeah, it will overcomplicate it...
We just need to create several vlan groups to cover the entire 4096 vlans that are now in one group. and maybe link them together with a tag...
I'm happy with the proposed FR :-)

@snowie-swe
Copy link

snowie-swe commented Dec 27, 2021

iknow its closed. somesort of parent child relationship would be really nice.
Or something similar as IP Prefix binding it towards VRF.
Same can be made with just multiple groups and a good name standard.
But it would help to have when you do have multiple dc or environments within the same locations.

DC1
1-100 infra
101 - 999 transit
1000 - 4096 - Servers

DC2
1-100 infra
101 - 999 transit
1000 - 4096 - Servers

DCX
1-100 infra
101 - 999 transit
1000 - 4096 - Servers

@PieterL75
Copy link
Contributor

You can add a tag to vlangroups that belong together.
That's my approach anyway.
As Jeremy pointed out, it will created extra complexity that can be solved with a simple tag.

P

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants