Add site to IP address/range model #6443

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

Originally created by @abhi1693 on GitHub (May 4, 2022).

NetBox version

v3.2.2

Feature type

Data model extension

Proposed functionality

Allow a way to assign the IP address/IP range to a site and/or region and add filtering capabilities for the same. This will add more insight into where the IP address exists in the organizational structure if it is not assigned to an interface or does not have a parent prefix.

Use case

The IP address model does not have a site (or related) field on the model. When private IPs are used and documented on NetBox which can be on different sites, there is no way to filter them by site or region. One can have the exact same IP in 1 or more sites/regions. The same can be said for the IP ranges. In both cases, the object can be assigned to a tenant, but it is not necessary to have a tenant for the IP addresses.

In my test env, I have close to 300 IP addresses, that are not assigned to anything nor do they have a parent prefix. Without an association to a site, I do not have where in our organization, they should exist.

Database changes

Add site and region fields to the IP address and IP range model

External dependencies

None

Originally created by @abhi1693 on GitHub (May 4, 2022). ### NetBox version v3.2.2 ### Feature type Data model extension ### Proposed functionality Allow a way to assign the IP address/IP range to a site and/or region and add filtering capabilities for the same. This will add more insight into where the IP address exists in the organizational structure if it is not assigned to an interface or does not have a parent prefix. ### Use case The IP address model does not have a site (or related) field on the model. When private IPs are used and documented on NetBox which can be on different sites, there is no way to filter them by site or region. One can have the exact same IP in 1 or more sites/regions. The same can be said for the IP ranges. In both cases, the object can be assigned to a tenant, but it is not necessary to have a tenant for the IP addresses. In my test env, I have close to 300 IP addresses, that are not assigned to anything nor do they have a parent prefix. Without an association to a site, I do not have where in our organization, they should exist. ### Database changes Add `site` and `region` fields to the IP address and IP range model ### External dependencies None
adam added the type: feature label 2025-12-29 19:40:47 +01:00
adam closed this issue 2025-12-29 19:40:47 +01:00
Author
Owner

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

You can already do it with custom object fields.

@schmittvictor commented on GitHub (May 4, 2022): You can already do it with custom object fields.
Author
Owner

@jeremystretch commented on GitHub (May 4, 2022):

In my test env, I have close to 300 IP addresses, that are not assigned to anything nor do they have a parent prefix.

Why aren't they assigned to anything? What are they used for?

@jeremystretch commented on GitHub (May 4, 2022): > In my test env, I have close to 300 IP addresses, that are not assigned to anything nor do they have a parent prefix. Why aren't they assigned to anything? What are they used for?
Author
Owner

@abhi1693 commented on GitHub (May 4, 2022):

We have a few isolated or closed rack and due to compliance issues we cannot add the inventory to netbox. However, we are still allowed to document the IP addresses in an IPAM tool.

@abhi1693 commented on GitHub (May 4, 2022): We have a few isolated or closed rack and due to compliance issues we cannot add the inventory to netbox. However, we are still allowed to document the IP addresses in an IPAM tool.
Author
Owner

@sc68cal commented on GitHub (May 4, 2022):

I'm a 👎 on this because individual IP addresses should be tied to a prefix object, which already has that information. I don't think having IP addresses also support the site and region attributes and possibly conflict with their parent prefix is a good idea

@sc68cal commented on GitHub (May 4, 2022): I'm a 👎 on this because individual IP addresses should be tied to a `prefix` object, which already has that information. I don't think having IP addresses also support the site and region attributes and possibly conflict with their parent prefix is a good idea
Author
Owner

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

I'm a 👎 on this because individual IP addresses should be tied to a prefix object, which already has that information. I don't think having IP addresses also support the site and region attributes and possibly conflict with their parent prefix is a good idea

Is there a way to adjust group privileges that way, so that a user only had an access to IP addresses that are related to the prefix that is assigned to the specific site?

@dteknet commented on GitHub (May 5, 2022): > I'm a 👎 on this because individual IP addresses should be tied to a `prefix` object, which already has that information. I don't think having IP addresses also support the site and region attributes and possibly conflict with their parent prefix is a good idea Is there a way to adjust group privileges that way, so that a user only had an access to IP addresses that are related to the prefix that is assigned to the specific site?
Author
Owner

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

Not easily currently, you would need #7845 to be completed first.

Once done, you can achieve it with a permission constraint.

@DanSheps commented on GitHub (May 9, 2022): Not easily currently, you would need #7845 to be completed first. Once done, you can achieve it with a permission constraint.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6443