Assigning a VLAN that has no site to a prefix that has a site #6433

Closed
opened 2025-12-29 19:40:41 +01:00 by adam · 9 comments
Owner

Originally created by @schmittvictor on GitHub (May 2, 2022).

NetBox version

v3.2.1

Feature type

New functionality

Proposed functionality

Possibility to assign a VLAN that has no site assigned to a prefix that has a site.

Use case

Our company has specific prefixes based on sites but has normalized the VLAN numbering across all our sites, so it would be nice to be able to assign a VLAN that has no site to a prefix that has a site.

Database changes

No response

External dependencies

No response

Originally created by @schmittvictor on GitHub (May 2, 2022). ### NetBox version v3.2.1 ### Feature type New functionality ### Proposed functionality Possibility to assign a VLAN that has no site assigned to a prefix that has a site. ### Use case Our company has specific prefixes based on sites but has normalized the VLAN numbering across all our sites, so it would be nice to be able to assign a VLAN that has no site to a prefix that has a site. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 19:40:41 +01:00
adam closed this issue 2025-12-29 19:40:41 +01:00
Author
Owner

@DanSheps commented on GitHub (May 2, 2022):

I don't have a specific arguement for or against this proposal in principal. However, for your specific use case:

Our company has specific prefixes based on sites but has normalized the VLAN numbering across all our sites, so it would be nice to be able to assign a VLAN that has no site to a prefix that has a site.

The correct way to model this is actually discrete vlans assigned to each site as they are separate l2 segments and not the same VLAN.

Do you perhaps have a different use-case that could be applied to this equally?

@DanSheps commented on GitHub (May 2, 2022): I don't have a specific arguement for or against this proposal in principal. However, for your specific use case: > Our company has specific prefixes based on sites but has normalized the VLAN numbering across all our sites, so it would be nice to be able to assign a VLAN that has no site to a prefix that has a site. The correct way to model this is actually discrete vlans assigned to each site as they are separate l2 segments and not the same VLAN. Do you perhaps have a different use-case that could be applied to this equally?
Author
Owner

@schmittvictor commented on GitHub (May 2, 2022):

I don't have a specific arguement for or against this proposal in principal. However, for your specific use case:

Our company has specific prefixes based on sites but has normalized the VLAN numbering across all our sites, so it would be nice to be able to assign a VLAN that has no site to a prefix that has a site.

The correct way to model this is actually discrete vlans assigned to each site as they are separate l2 segments and not the same VLAN.

Do you perhaps have a different use-case that could be applied to this equally?

In our case its actually the same VLAN since we have our proper fiber network across the country.

sorry for expressing myself badly

@schmittvictor commented on GitHub (May 2, 2022): > I don't have a specific arguement for or against this proposal in principal. However, for your specific use case: > > > > > Our company has specific prefixes based on sites but has normalized the VLAN numbering across all our sites, so it would be nice to be able to assign a VLAN that has no site to a prefix that has a site. > > > > The correct way to model this is actually discrete vlans assigned to each site as they are separate l2 segments and not the same VLAN. > > > > Do you perhaps have a different use-case that could be applied to this equally? In our case its actually the same VLAN since we have our proper fiber network across the country. sorry for expressing myself badly
Author
Owner

@DanSheps commented on GitHub (May 3, 2022):

To clarify:

You have two prefixes (example: 10.232.10.0/24 at Site A and 10.232.11.0/24 at Site B) and you could have Site B's IP (10.232.11.23/24) configured at Site A and have communication with other devices in Site B (Ex: 10.232.11.21/24)?

@DanSheps commented on GitHub (May 3, 2022): To clarify: You have two prefixes (example: 10.232.10.0/24 at Site A and 10.232.11.0/24 at Site B) and you could have Site B's IP (10.232.11.23/24) configured at Site A and have communication with other devices in Site B (Ex: 10.232.11.21/24)?
Author
Owner

@LHBL2003 commented on GitHub (May 3, 2022):

In my case I have two sites, each with 100 VLAN for development projects. (VLAN 3000 - 3100)

Also I wanted to create a transparent view to see which systems belong together.

I currently create VLAN groups with location prefix.

Hamburg | development system
Berlin | development system

Then I create all VLANs 2x with the respective group.

Not so nice but possible. Only with the prefix I get my problems now, with filtering.

See: https://github.com/netbox-community/netbox/issues/9284

After closing :D

Here again my unexpected behavior after closing the ticket:

I hope the minimalistic steps help to recreate the problem:

Add Sites

name,slug,status
TestSites,testsites,active

Add VLAN Group:

name,slug
VG1, vg1

Add VLAN

vid,name,status
4000,Test4000,active

Add Prefixes

prefix,status
192.168.0.0/24,active

Edit Prefix
Site/VLAN Assignment --> Site --> Select "TestSites"

Failure:
I can NOT select a VLAN group or VLAN

Site/VLAN Assignment --> Site --> remove selection
I can select a VLAN group or VLAN

Can it be that one may only document site or VLAN?

"Site/VLAN Assignment" ALIAS
"Site or VLAN Assignment"

If so, then I misunderstood.
I wasn't aware that only one or the other could be used.
Because if I configure the VLAN first and then the site. Then I can save it too.

@LHBL2003 commented on GitHub (May 3, 2022): In my case I have two sites, each with 100 VLAN for development projects. (VLAN 3000 - 3100) Also I wanted to create a transparent view to see which systems belong together. I currently create VLAN groups with location prefix. Hamburg | development system Berlin | development system Then I create all VLANs 2x with the respective group. Not so nice but possible. Only with the prefix I get my problems now, with filtering. See: https://github.com/netbox-community/netbox/issues/9284 After closing :D **Here again my unexpected behavior after closing the ticket:** I hope the minimalistic steps help to recreate the problem: **Add Sites** ``` name,slug,status TestSites,testsites,active ``` **Add VLAN Group:** ``` name,slug VG1, vg1 ``` **Add VLAN** ``` vid,name,status 4000,Test4000,active ``` **Add Prefixes** ``` prefix,status 192.168.0.0/24,active ``` **Edit Prefix** Site/VLAN Assignment --> Site --> Select "TestSites" **Failure:** I can NOT select a VLAN group or VLAN Site/VLAN Assignment --> Site --> remove selection I can select a VLAN group or VLAN Can it be that one may only document site or VLAN? "Site/VLAN Assignment" ALIAS "Site **or** VLAN Assignment" If so, then I misunderstood. I wasn't aware that only one or the other could be used. Because if I configure the VLAN first and then the site. Then I can save it too.
Author
Owner

@DanSheps commented on GitHub (May 3, 2022):

Again, unless the two vlans can talk together (IE, you can configure the prefix for one on the ohter side and still communicate) then they should be modelled as separate vlans in netbox as they are separate L2 domains.

@DanSheps commented on GitHub (May 3, 2022): Again, unless the two vlans can talk together (IE, you can configure the prefix for one on the ohter side and still communicate) then they should be modelled as separate vlans in netbox as they are separate L2 domains.
Author
Owner

@schmittvictor commented on GitHub (May 3, 2022):

Again, unless the two vlans can talk together (IE, you can configure the prefix for one on the ohter side and still communicate) then they should be modelled as separate vlans in netbox as they are separate L2 domains.

Yes it is a different VLAN but I think that it would be easier that if no site has been attributed to a VLAN it can be assigned to an object with any site. Instead of creating every VLANs for every sites.
Or maybe let the user decide if this can be possible with a Dynamic Setting.

@schmittvictor commented on GitHub (May 3, 2022): > Again, unless the two vlans can talk together (IE, you can configure the prefix for one on the ohter side and still communicate) then they should be modelled as separate vlans in netbox as they are separate L2 domains. Yes it is a different VLAN but I think that it would be easier that if no site has been attributed to a VLAN it can be assigned to an object with any site. Instead of creating every VLANs for every sites. Or maybe let the user decide if this can be possible with a Dynamic Setting.
Author
Owner

@max-baumgarten commented on GitHub (May 4, 2022):

@schmittvictor I agree with you. We should be able to have a set of universal VLANs that can be applied across all sites, especially if we have standardized VLAN schema's that apply to all prefixes, regardless of site.

@max-baumgarten commented on GitHub (May 4, 2022): @schmittvictor I agree with you. We should be able to have a set of universal VLANs that can be applied across all sites, especially if we have standardized VLAN schema's that apply to all prefixes, regardless of site.
Author
Owner

@DanSheps commented on GitHub (May 5, 2022):

If you are trying to model this properly, it should be a separate L2 segment (VLAN) in NetBox. I understand you might be trying to save time, but you are comprising the accuracy of your network model in NetBox as when you model it as a single VLAN it looks like it is a single VLAN that the IPs share.

As far as a universal VLANs, speaking from an automation standpoint, how do you know if those VLANs need to be deployed to a specific device on a site? What if your standard model deviates at one site.

There are valid use cases for assigning a site to a VLAN with multiple sites, but I would honestly rather see the VLAN model change to a many-to-many relationship rather then have site as null.

@DanSheps commented on GitHub (May 5, 2022): If you are trying to model this properly, it should be a separate L2 segment (VLAN) in NetBox. I understand you might be trying to save time, but you are comprising the accuracy of your network model in NetBox as when you model it as a single VLAN it looks like it is a single VLAN that the IPs share. As far as a universal VLANs, speaking from an automation standpoint, how do you know if those VLANs need to be deployed to a specific device on a site? What if your standard model deviates at one site. There are valid use cases for assigning a site to a VLAN with multiple sites, but I would honestly rather see the VLAN model change to a many-to-many relationship rather then have site as null.
Author
Owner

@schmittvictor commented on GitHub (May 5, 2022):

If you are trying to model this properly, it should be a separate L2 segment (VLAN) in NetBox. I understand you might be trying to save time, but you are comprising the accuracy of your network model in NetBox as when you model it as a single VLAN it looks like it is a single VLAN that the IPs share.

As far as a universal VLANs, speaking from an automation standpoint, how do you know if those VLANs need to be deployed to a specific device on a site? What if your standard model deviates at one site.

There are valid use cases for assigning a site to a VLAN with multiple sites, but I would honestly rather see the VLAN model change to a many-to-many relationship rather then have site as null.

You are probably right. Thanks for the time given to answer

@schmittvictor commented on GitHub (May 5, 2022): > If you are trying to model this properly, it should be a separate L2 segment (VLAN) in NetBox. I understand you might be trying to save time, but you are comprising the accuracy of your network model in NetBox as when you model it as a single VLAN it looks like it is a single VLAN that the IPs share. > > > > As far as a universal VLANs, speaking from an automation standpoint, how do you know if those VLANs need to be deployed to a specific device on a site? What if your standard model deviates at one site. > > > > There are valid use cases for assigning a site to a VLAN with multiple sites, but I would honestly rather see the VLAN model change to a many-to-many relationship rather then have site as null. You are probably right. Thanks for the time given to answer
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6433