Mapping between used Prefixes and IP Addresses availability #6286

Closed
opened 2025-12-29 19:39:00 +01:00 by adam · 4 comments
Owner

Originally created by @VictorPetrescu on GitHub (Apr 2, 2022).

NetBox version

v3.1.10

Python version

3.9

Steps to Reproduce

  1. Create a Prefix with /24
  2. Assign three other child Prefixes with /30 and mark them as Fully Utilized.
  3. Assign in the /24 Prefix, some random IP Addresses.

Expected Behavior

You should not be allowed to allocate an IP Addresses from the /30 child Prefix. Or even to mark them as used in the IP Addresses View.

Observed Behavior

Even if I marked the /30 Prefix as Fully Utilized, when I allocate an IP Addresses I am not aware of the /30 that is used, and I can allocate an IP Address from that range.

Prefix: 192.168.100.0/24
Child Prefix 1: 192.168.100.32/30 (Marked as 100% Utilized)
Child Prefix 2: 192.168.100.36/30 (Marked as 100% Utilized)
Child Prefix 3: 192.168.100.40/30 (Marked as 100% Utilized)

Under the IP Addresses Section in the 192.168.100.0/24 Prefix I should not be allowed to alocate an IP Address from none of the 3 Child Prefixes, or at least to see them used, not available, like in the picture.

192.168.100.34 says is available, and I could add 192.168.100.33/32 and 192.168.100.37/32, even though there part of a fully utilized prefix.

Screenshot_98

Also in the IP Addresses Section from the Child Prefix (192.168.100.32/30) there are still Available IPs.

Thank you.

Originally created by @VictorPetrescu on GitHub (Apr 2, 2022). ### NetBox version v3.1.10 ### Python version 3.9 ### Steps to Reproduce 1. Create a Prefix with /24 2. Assign three other child Prefixes with /30 and mark them as Fully Utilized. 3. Assign in the /24 Prefix, some random IP Addresses. ### Expected Behavior You should not be allowed to allocate an IP Addresses from the /30 child Prefix. Or even to mark them as used in the IP Addresses View. ### Observed Behavior Even if I marked the /30 Prefix as Fully Utilized, when I allocate an IP Addresses I am not aware of the /30 that is used, and I can allocate an IP Address from that range. Prefix: 192.168.100.0/24 Child Prefix 1: 192.168.100.32/30 (Marked as 100% Utilized) Child Prefix 2: 192.168.100.36/30 (Marked as 100% Utilized) Child Prefix 3: 192.168.100.40/30 (Marked as 100% Utilized) Under the IP Addresses Section in the 192.168.100.0/24 Prefix I should not be allowed to alocate an IP Address from none of the 3 Child Prefixes, or at least to see them used, not available, like in the picture. 192.168.100.34 says is available, and I could add 192.168.100.33/32 and 192.168.100.37/32, even though there part of a fully utilized prefix. ![Screenshot_98](https://user-images.githubusercontent.com/11586456/161392652-c0c63d8b-a7e3-481f-bc2e-604b2c17d0df.png) Also in the IP Addresses Section from the Child Prefix (192.168.100.32/30) there are still Available IPs. Thank you.
adam added the type: bugpending closure labels 2025-12-29 19:39:00 +01:00
adam closed this issue 2025-12-29 19:39:00 +01:00
Author
Owner

@DetunizedGravity commented on GitHub (Apr 2, 2022):

What is the actual meaning of "Mark as fully utilized" for you?

I interpret it as "all IP address in this prefix have been alloted, but not all of them have been/can be registered in Netbox right now". I do not* interpret it as "I do not want to register any IP address of this prefix, ever, in Netbox".

For example, I may want to use a prefix to represent a DHCP pool, of which a few IP are fixed leases. I would use the mark as fully used flag to show that the whole prefix is reserved for use by the DHCP server The only addresses that it would make sense to register are the permanent leases because they are the only ones that do not change host randomly. What you propose would prevent me from doing that.

@DetunizedGravity commented on GitHub (Apr 2, 2022): What is the actual meaning of "Mark as fully utilized" for you? I interpret it as "all IP address in this prefix have been alloted, but not all of them have been/can be registered in Netbox right now". I do **not*** interpret it as "I do not want to register any IP address of this prefix, ever, in Netbox". For example, I may want to use a prefix to represent a DHCP pool, of which a few IP are fixed leases. I would use the mark as fully used flag to show that the whole prefix is reserved for use by the DHCP server The only addresses that it would make sense to register are the permanent leases because they are the only ones that do not change host randomly. What you propose would prevent me from doing that.
Author
Owner

@VictorPetrescu commented on GitHub (Apr 2, 2022):

In the scenario that I described, "Mark as fully utilized" means all the IPs in that range are used and I cannot allocate an IP Address from those /30 ranges. Let's say I give /30 to a customer 1...I have to know that when I allocate an IP Address to another customer 2, I don't use one from the range given to customer 1. And yes, it can be done, because now there is no warning to say there is an overlap.

Maybe the "Mark as fully utilized" is not the solution for what I describe…but I think it should be a warning that it occurs in an overlap.

@VictorPetrescu commented on GitHub (Apr 2, 2022): In the scenario that I described, "Mark as fully utilized" means all the IPs in that range are used and I cannot allocate an IP Address from those /30 ranges. Let's say I give /30 to a customer 1...I have to know that when I allocate an IP Address to another customer 2, I don't use one from the range given to customer 1. And yes, it can be done, because now there is no warning to say there is an overlap. Maybe the "Mark as fully utilized" is not the solution for what I describe…but I think it should be a warning that it occurs in an overlap.
Author
Owner

@DetunizedGravity commented on GitHub (Apr 2, 2022):

Your use case looks more like a matter of tenancy to me. Giving a /30 to a
customer literally translates to "assign this customer as tenant of the
/30." What you are asking for is a way to make sure that IP address inside
a prefix belongs to the same tenant as the prefix.

Now I don't know if a way to do that at creation time of the address.
Maybe there is?

Edit: typo

@DetunizedGravity commented on GitHub (Apr 2, 2022): Your use case looks more like a matter of tenancy to me. Giving a /30 to a customer literally translates to "assign this customer as tenant of the /30." What you are asking for is a way to make sure that IP address inside a prefix belongs to the same tenant as the prefix. Now **I** don't know if a way to do that at creation time of the address. Maybe there is? Edit: typo
Author
Owner

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

Thank you for opening a bug report. It seems that the described functionality is intended behavior. If you meant to open a feature request instead, please close this issue and open a new one using the feature request template. Otherwise, please revise your post above to elaborate on why you believe the observed behavior is flawed.

@DanSheps commented on GitHub (Apr 3, 2022): Thank you for opening a bug report. It seems that the described functionality is intended behavior. If you meant to open a feature request instead, please close this issue and open a new one using the [feature request template](https://github.com/netbox-community/netbox/issues/new?template=feature_request.md). Otherwise, please revise your post above to elaborate on why you believe the observed behavior is flawed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6286