Create prefix within container automatically #10282

Closed
opened 2025-12-29 21:29:24 +01:00 by adam · 1 comment
Owner

Originally created by @ya-cha on GitHub (Sep 24, 2024).

NetBox version

v.4.0.10

Feature type

New functionality

Proposed functionality

When creating a prefix in other prefixes, Netbox is looking for the next available. This happens in the user interface /ipam/prefixes/add/?prefix={id} and in the API /api/ipam/prefixes/{id}/available-prefixes/.
If there are child prefixes with the status container, I would expect those containers to be used when finding the next free one (so creating a prefix inside the container inside the given prefix).

Use case

For internal purposes (rDNS) the prefix used for our customers is divided in multiple containers. The Netbox considers it as completely full. In our understanding the purpose of containers is not to block prefixes but to group them. I would expect the Netbox to create a prefix in the container.

Database changes

To prevent breaking changes this behaviour could be managed in a feature flag. This would be a DB change

External dependencies

No response

Originally created by @ya-cha on GitHub (Sep 24, 2024). ### NetBox version v.4.0.10 ### Feature type New functionality ### Proposed functionality When creating a prefix in other prefixes, Netbox is looking for the next available. This happens in the user interface `/ipam/prefixes/add/?prefix={id}` and in the API `/api/ipam/prefixes/{id}/available-prefixes/`. If there are child prefixes with the status `container`, I would expect those containers to be used when finding the next free one (so creating a prefix inside the container inside the given prefix). ### Use case For internal purposes (rDNS) the prefix used for our customers is divided in multiple containers. The Netbox considers it as completely full. In our understanding the purpose of containers is not to block prefixes but to group them. I would expect the Netbox to create a prefix in the container. ### Database changes To prevent breaking changes this behaviour could be managed in a feature flag. This would be a DB change ### External dependencies _No response_
adam added the type: featurenetbox labels 2025-12-29 21:29:24 +01:00
adam closed this issue 2025-12-29 21:29:24 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 23, 2025):

I would expect those containers to be used when finding the next free one (so creating a prefix inside the container inside the given prefix).

This would defeat the intended purpose of designating containers, which is to allocate a specific portion of the parent IP space for a particular use. When automatically allocating available IP space, the user should specify the intended containing prefix.

@jeremystretch commented on GitHub (Jan 23, 2025): > I would expect those containers to be used when finding the next free one (so creating a prefix inside the container inside the given prefix). This would defeat the intended purpose of designating containers, which is to allocate a specific portion of the parent IP space for a particular use. When automatically allocating available IP space, the user should specify the intended containing prefix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10282