Support assigning VLANs to locations #5063

Open
opened 2025-12-29 19:23:42 +01:00 by adam · 7 comments
Owner

Originally created by @c-po on GitHub (Jul 13, 2021).

NetBox version

v2.11.9

Feature type

Data model extension

Proposed functionality

It would be very nice if we could not only assign certain data types not only to a site, but also to a location on this specific site.

Use case

Locations got added to NetBox to extend a site with e.g. physical buildings.

The following Items should get support to be mapped to a Location within a site:

  • IP Address (buildings/locations may contain individual devices/printers/phones)
  • IP Prefix (buildings/locations may contain individual assigned prefixes (covered by #6414)
  • VLAN (buildings/locations may contain individual VLANs)
  • Circuit (buildings/locations will get connected via multiple circuits) (covered by #9604)

Database changes

No response

External dependencies

No response

Originally created by @c-po on GitHub (Jul 13, 2021). ### NetBox version v2.11.9 ### Feature type Data model extension ### Proposed functionality It would be very nice if we could not only assign certain data types not only to a site, but also to a location on this specific site. ### Use case Locations got added to NetBox to extend a site with e.g. physical buildings. The following Items should get support to be mapped to a Location within a site: - ~IP Address (buildings/locations may contain individual devices/printers/phones)~ - ~IP Prefix (buildings/locations may contain individual assigned prefixes~ (covered by #6414) - VLAN (buildings/locations may contain individual VLANs) - ~Circuit (buildings/locations will get connected via multiple circuits)~ (covered by #9604) ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurenetboxstatus: backlogcomplexity: low labels 2025-12-29 19:23:42 +01:00
Author
Owner

@eronlloyd commented on GitHub (Jul 18, 2021):

This is an excellent idea. We're redesigning our LAN subnets across multiple sites and had this very question.

@eronlloyd commented on GitHub (Jul 18, 2021): This is an excellent idea. We're redesigning our LAN subnets across multiple sites and had this very question.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 17, 2021):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Sep 17, 2021): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@BarbarossaTM commented on GitHub (Jul 25, 2022):

Agree that this would be cool. I recently also had a use case where it would be been cool to assign a prefix and VLAN to a region. Would we consider this inside the same scope than this issue or rather a different thing?

@BarbarossaTM commented on GitHub (Jul 25, 2022): Agree that this would be cool. I recently also had a use case where it would be been cool to assign a prefix and VLAN to a region. Would we consider this inside the same scope than this issue or rather a different thing?
Author
Owner

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

@jeremystretch I think we may want to consider looking at revamping our "Locations" modelling further before looking into this.

It may make more sense to collapse Region/Site/Location/etc into a "BaseLocation" and using Polymorphism. This would allow assignment to any of Region/Site/Location/etc for certain things. It would also considerably clean up our organizational structure of items and may remove GFKs in some cases.

Something to consider and I can throw in a FR for review for it if you like.

@DanSheps commented on GitHub (Aug 2, 2022): @jeremystretch I think we may want to consider looking at revamping our "Locations" modelling further before looking into this. It may make more sense to collapse Region/Site/Location/etc into a "BaseLocation" and using Polymorphism. This would allow assignment to any of Region/Site/Location/etc for certain things. It would also considerably clean up our organizational structure of items and may remove GFKs in some cases. Something to consider and I can throw in a FR for review for it if you like.
Author
Owner

@c-po commented on GitHub (Sep 29, 2023):

We are currently working on an IPv6 address plan for multiple regions and sites.

An idea is to have an aggregate per region, a prefix per site, and a sub-prefix assigned per any given building on that site. Marking this in IPAM would make tracking easy which prefix is assigned to a building and vice-versa.

Maybe that thought helps on the location revamping.

@c-po commented on GitHub (Sep 29, 2023): We are currently working on an IPv6 address plan for multiple regions and sites. An idea is to have an aggregate per region, a prefix per site, and a sub-prefix assigned per any given building on that site. Marking this in IPAM would make tracking easy which prefix is assigned to a building and vice-versa. Maybe that thought helps on the location revamping.
Author
Owner

@jeremystretch commented on GitHub (Sep 19, 2024):

I suspect this will overlap quit a bit with #6414, but we'll keep it as a separate FR for now.

@jeremystretch commented on GitHub (Sep 19, 2024): I suspect this will overlap quit a bit with #6414, but we'll keep it as a separate FR for now.
Author
Owner

@jeremystretch commented on GitHub (Oct 7, 2024):

This was flagged for v4.2 for the assignment of prefixes to locations only; this work can be folded into #6414. Additionally, FR #9604 proposes the ability to associate a circuit termination with a location.

It would not make sense to assign an IP address to a location (IP addresses can only be assigned to specific interfaces), but I'll leave this open for the remaining item, the assignment of a VLAN to a location.

@jeremystretch commented on GitHub (Oct 7, 2024): This was flagged for v4.2 for the assignment of prefixes to locations only; this work can be folded into #6414. Additionally, FR #9604 proposes the ability to associate a circuit termination with a location. It would not make sense to assign an IP address to a location (IP addresses can only be assigned to specific interfaces), but I'll leave this open for the remaining item, the assignment of a VLAN to a location.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5063