netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.89k stars 2.55k forks source link

Support assigning prefixes/VLANs to locations #6746

Open c-po opened 3 years ago

c-po commented 3 years ago

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:

Database changes

No response

External dependencies

No response

eronlloyd commented 3 years ago

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

github-actions[bot] commented 3 years ago

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.

BarbarossaTM commented 2 years ago

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?

DanSheps commented 2 years ago

@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.

c-po commented 12 months ago

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.

jeremystretch commented 1 week ago

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