Toggle show available prefixes in /ipam/prefixes/ #6112

Closed
opened 2025-12-29 19:36:54 +01:00 by adam · 7 comments
Owner

Originally created by @bluikko on GitHub (Feb 18, 2022).

NetBox version

v3.1.8

Feature type

Change to existing functionality

Proposed functionality

Currently NetBox can show free/available prefixes inside a container by displaying a prefix -> Child Prefixes (/ipam/prefixes/#/prefixes/).

This feature request is to add similar functionality to the main Prefixes view at /ipam/prefixes/. It should probably have a button to enable it:
image

Which would then display the available prefixes in /ipam/prefixes/ in the same way as /ipam/prefixes/#/prefixes/ does:
image

Use case

Allow operator to find available prefixes more easily.

Currently the only way is to click through several "Container" prefixes and display their "Child Prefixes" to find available prefixes.
Using the "Utilization" bar to find available prefixes is not very useful.

So currently we are adding "dummy" prefixes with the name "Free" to quickly keep available prefixes listed in the main "Prefixes" view.

Database changes

None.

External dependencies

None.

Originally created by @bluikko on GitHub (Feb 18, 2022). ### NetBox version v3.1.8 ### Feature type Change to existing functionality ### Proposed functionality Currently NetBox can show free/available prefixes inside a container by displaying a prefix -> `Child Prefixes` (`/ipam/prefixes/#/prefixes/`). This feature request is to add similar functionality to the main Prefixes view at `/ipam/prefixes/`. It should probably have a button to enable it: ![image](https://user-images.githubusercontent.com/14869000/154624590-3e1d44f1-665f-4eb0-9b58-be55bab5c0bf.png) Which would then display the available prefixes in `/ipam/prefixes/` in the same way as `/ipam/prefixes/#/prefixes/` does: ![image](https://user-images.githubusercontent.com/14869000/154624833-76fbab88-e9c3-40f2-a7d5-65a95cf9c384.png) ### Use case Allow operator to find available prefixes more easily. Currently the only way is to click through several "Container" prefixes and display their "Child Prefixes" to find available prefixes. Using the "Utilization" bar to find available prefixes is not very useful. So currently we are adding "dummy" prefixes with the name "Free" to quickly keep available prefixes listed in the main "Prefixes" view. ### Database changes None. ### External dependencies None.
adam added the type: featurestatus: needs ownerpending closure labels 2025-12-29 19:36:54 +01:00
adam closed this issue 2025-12-29 19:36:54 +01:00
Author
Owner

@minitriga commented on GitHub (Feb 24, 2022):

Available is not a valid status choice for prefixes. Utilization does the same thing as you are suggesting so maybe a show/hide utilized might work.

This can already be filtered in the filter section.

image

@minitriga commented on GitHub (Feb 24, 2022): Available is not a valid status choice for prefixes. Utilization does the same thing as you are suggesting so maybe a show/hide utilized might work. This can already be filtered in the filter section. ![image](https://user-images.githubusercontent.com/26367336/155506213-00474226-61a0-40e9-8f89-02b96c4606cf.png)
Author
Owner

@bluikko commented on GitHub (Feb 24, 2022):

Available is not a valid status choice for prefixes.

Of course it isn't. Take a look at how /ipam/prefixes/x/prefixes/ works as listed in the OP. It has nothing to do with 100% utilized.

@bluikko commented on GitHub (Feb 24, 2022): > Available is not a valid status choice for prefixes. Of course it isn't. Take a look at how `/ipam/prefixes/x/prefixes/` works as listed in the OP. It has nothing to do with 100% utilized.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 26, 2022):

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 (Apr 26, 2022): 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

@DanSheps commented on GitHub (Apr 28, 2022):

Available is not a valid status choice for prefixes.

Of course it isn't. Take a look at how /ipam/prefixes/x/prefixes/ works as listed in the OP. It has nothing to do with 100% utilized.

The problem with this proposal, is in the main prefix view, there is no "parent", so we are left with showing each CIDR between any prefixes you have defined as well as any outside of the defined ones to the min (0.0.0.0) and max (255.255.255.255). This won't scale well and as such I doubt we are going to take it up.

@DanSheps commented on GitHub (Apr 28, 2022): > > Available is not a valid status choice for prefixes. > > Of course it isn't. Take a look at how `/ipam/prefixes/x/prefixes/` works as listed in the OP. It has nothing to do with 100% utilized. The problem with this proposal, is in the main prefix view, there is no "parent", so we are left with showing each CIDR between any prefixes you have defined as well as any outside of the defined ones to the min (0.0.0.0) and max (255.255.255.255). This won't scale well and as such I doubt we are going to take it up.
Author
Owner

@bluikko commented on GitHub (Apr 28, 2022):

Available is not a valid status choice for prefixes.

Of course it isn't. Take a look at how /ipam/prefixes/x/prefixes/ works as listed in the OP. It has nothing to do with 100% utilized.

The problem with this proposal, is in the main prefix view, there is no "parent", so we are left with showing each CIDR between any prefixes you have defined as well as any outside of the defined ones to the min (0.0.0.0) and max (255.255.255.255). This won't scale well and as such I doubt we are going to take it up.

Good point that I had not considered. On large installations it might not scale even when taking aggregates into account. I was thinking that aggregates would be the limiting factor but perhaps that is an invalid expectation and also insufficient on large installations.

@bluikko commented on GitHub (Apr 28, 2022): > > > Available is not a valid status choice for prefixes. > > > > > > Of course it isn't. Take a look at how `/ipam/prefixes/x/prefixes/` works as listed in the OP. It has nothing to do with 100% utilized. > > The problem with this proposal, is in the main prefix view, there is no "parent", so we are left with showing each CIDR between any prefixes you have defined as well as any outside of the defined ones to the min (0.0.0.0) and max (255.255.255.255). This won't scale well and as such I doubt we are going to take it up. Good point that I had not considered. On large installations it might not scale even when taking aggregates into account. I was thinking that aggregates would be the limiting factor but perhaps that is an invalid expectation and also insufficient on large installations.
Author
Owner

@DanSheps commented on GitHub (Apr 28, 2022):

I suppose we could generate the list by using aggregates, I hadn't consider that, but there is also the point of if you have 1.0.0.0/8, that is still a massive amount of addresses to potentially calculate.

@DanSheps commented on GitHub (Apr 28, 2022): I suppose we could generate the list by using aggregates, I hadn't consider that, but there is also the point of if you have 1.0.0.0/8, that is still a massive amount of addresses to potentially calculate.
Author
Owner

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

Closing this out as it does not seem feasible. If anyone would like to propose a specific, detailed implementation, you are welcome to do so in a new FR.

@jeremystretch commented on GitHub (May 31, 2022): Closing this out as it does not seem feasible. If anyone would like to propose a specific, detailed implementation, you are welcome to do so in a new FR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6112