Show /32 allocations in child prefixes list #4089

Closed
opened 2025-12-29 18:33:02 +01:00 by adam · 1 comment
Owner

Originally created by @amuckart on GitHub (Sep 10, 2020).

Environment

  • Python version: 3.6.9
  • NetBox version: 2.9.3

Steps to Reproduce

  1. Create a /24 IPv4 prefix
  2. Create a pair of /29s with a /29 worth of space between them, e.g. .0/29 and .16/29
  3. Create a couple /32 IP addresses from the intervening /29, e.g. .11 and .13
  4. Go to the "Child Prefixes" tab of the /24. The .8/29 prefix is shown as available.
  5. Create the .8/29 prefix, it will show as partially used.

Expected Behavior

The /32 allocations should show up in the Child Prefixes list and should break up blocks of free space, creating /32 or /31s etc. as needed.

I realise that /32 isn't technically a "child prefix" but when allocating loopback addresses they do get assigned directly from the containing /24 and it isn't possible (and doesn't make sense) to create a /32 "prefix" to hold the single IP address.

Observed Behavior

When viewing the "Child Prefixes" tab blocks of space that have /32 IP addresses assigned from inside them show as available and the existence of the /32s doesn't become obvious until you've either created the containing prefix or you check through both the "Child Prefixes" list and the "IP Addresses" list.

For any prefix length than /32, it's entirely sane to require the containing prefix exist and IPs are allocated out of that but individual IPs are a special case.

Originally created by @amuckart on GitHub (Sep 10, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.6.9 * NetBox version: 2.9.3 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Create a /24 IPv4 prefix 2. Create a pair of /29s with a /29 worth of space between them, e.g. .0/29 and .16/29 3. Create a couple /32 IP addresses from the intervening /29, e.g. .11 and .13 3. Go to the "Child Prefixes" tab of the /24. The .8/29 prefix is shown as available. 4. Create the .8/29 prefix, it will show as partially used. <!-- What did you expect to happen? --> ### Expected Behavior The /32 allocations should show up in the Child Prefixes list and should break up blocks of free space, creating /32 or /31s etc. as needed. I realise that /32 isn't technically a "child prefix" but when allocating loopback addresses they do get assigned directly from the containing /24 and it isn't possible (and doesn't make sense) to create a /32 "prefix" to hold the single IP address. <!-- What happened instead? --> ### Observed Behavior When viewing the "Child Prefixes" tab blocks of space that have /32 IP addresses assigned from inside them show as available and the existence of the /32s doesn't become obvious until you've either created the containing prefix or you check through both the "Child Prefixes" list and the "IP Addresses" list. For any prefix length than /32, it's entirely sane to require the containing prefix exist and IPs are allocated out of that but individual IPs are a special case.
adam closed this issue 2025-12-29 18:33:02 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 14, 2020):

This is expected behavior. Before allocating the /32s, you should create a /29 container prefix for them. This ensures that the space is allocated for the purpose of provisioning loopback IPs.

@jeremystretch commented on GitHub (Sep 14, 2020): This is expected behavior. Before allocating the /32s, you should create a /29 container prefix for them. This ensures that the space is allocated for the purpose of provisioning loopback IPs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4089