Unable to assign a Network/Broadcast IP to an Interface when Prefix is Pool #8427

Closed
opened 2025-12-29 20:36:34 +01:00 by adam · 5 comments
Owner

Originally created by @jshifletmilliman on GitHub (Aug 5, 2023).

NetBox version

v3.5.7

Python version

3.8

Steps to Reproduce

  1. Create a device
  2. Add a Network type interface to the device
  3. Create a IPAM Pool (example 192.168.0.0/24) and check the box for "Is a Pool".
  4. Add an IP address that would normally be considered the Network or Broadcast IP address (for instance, if the Prefix is 192.168.0.0/24, add an IP address of 192.168.0.0/24)
  5. Attempt to assign the newly created 192.168.0.0/24 IP Address to a device interface and Save the IP.

Expected Behavior

The IP address should be saved without issue and the IP address should now be assigned to the device's network interface

Observed Behavior

When trying to save the IP, you will receive a red error message at the bottom right along the lines of "192.168.0.0/24 is a network ID, which may not be assigned to an interface."

Originally created by @jshifletmilliman on GitHub (Aug 5, 2023). ### NetBox version v3.5.7 ### Python version 3.8 ### Steps to Reproduce 1. Create a device 2. Add a Network type interface to the device 3. Create a IPAM Pool (example 192.168.0.0/24) and check the box for "Is a Pool". 4. Add an IP address that would normally be considered the Network or Broadcast IP address (for instance, if the Prefix is 192.168.0.0/24, add an IP address of 192.168.0.0/24) 5. Attempt to assign the newly created 192.168.0.0/24 IP Address to a device interface and Save the IP. ### Expected Behavior The IP address should be saved without issue and the IP address should now be assigned to the device's network interface ### Observed Behavior When trying to save the IP, you will receive a red error message at the bottom right along the lines of "192.168.0.0/24 is a network ID, which may not be assigned to an interface."
adam closed this issue 2025-12-29 20:36:35 +01:00
Author
Owner

@jshifletmilliman commented on GitHub (Aug 5, 2023):

This appears to be a regression of #12687

@jshifletmilliman commented on GitHub (Aug 5, 2023): This appears to be a regression of #12687
Author
Owner

@ITJamie commented on GitHub (Aug 6, 2023):

note this was closed out as as-intended per https://github.com/netbox-community/netbox/issues/12962#issuecomment-1613002512

@ITJamie commented on GitHub (Aug 6, 2023): note this was closed out as as-intended per https://github.com/netbox-community/netbox/issues/12962#issuecomment-1613002512
Author
Owner

@jshifletmilliman commented on GitHub (Aug 6, 2023):

This is still bad behavior considering this functionality was previously allowed in older versions.

Imagine this scenario:

  • Enterprise organization
  • Departments are treated as Tenants
  • Org has a parent /24 prefix for OOB device management
  • Org subdivides the /24 into /27's and assigns a /27 to each Tenant/Department
  • Each /27 is marked as "Is a Pool" to allow for use of all 32 IP addresses, since the /27 is purely a logical subdivision of the /24 for documentation and assignment purposes to prevent accidental overlap, not for routing purposes
  • VRF for the subnet is in the /24, meaning all IPs in the /27 ranges use a netmask of /24 on their interfaces and point to the same gateway IP

So, example:

  • Parent Subnet: 192.168.0.0/24
  • Parent Subnet Default Gateway: 192.168.0.1/24
  • Sales Department Child Prefix: 192.168.0.32/27
  • Sales Department Console Server IP: 192.168.0.32/24
  • Sales Department Console Server Device Default Gateway: 192.168.0.1/24

Before, we were able to assign every IP in the /27 to an interface. Now, if we even so much as try and edit the IP address to change description or DNS value, we can't update it because of this error.

@jshifletmilliman commented on GitHub (Aug 6, 2023): This is still bad behavior considering this functionality was previously allowed in older versions. Imagine this scenario: - Enterprise organization - Departments are treated as Tenants - Org has a parent /24 prefix for OOB device management - Org subdivides the /24 into /27's and assigns a /27 to each Tenant/Department - Each /27 is marked as "Is a Pool" to allow for use of all 32 IP addresses, since the /27 is purely a logical subdivision of the /24 for documentation and assignment purposes to prevent accidental overlap, not for routing purposes - VRF for the subnet is in the /24, meaning all IPs in the /27 ranges use a netmask of /24 on their interfaces and point to the same gateway IP So, example: - Parent Subnet: 192.168.0.0/24 - Parent Subnet Default Gateway: 192.168.0.1/24 - Sales Department Child Prefix: 192.168.0.32/27 - Sales Department Console Server IP: 192.168.0.32/24 - Sales Department Console Server Device Default Gateway: 192.168.0.1/24 Before, we were able to assign every IP in the /27 to an interface. Now, if we even so much as try and edit the IP address to change description or DNS value, we can't update it because of this error.
Author
Owner

@ITJamie commented on GitHub (Aug 6, 2023):

since the /27 is purely a logical subdivision of the /24 the actual ip objects should still be /24's in this case, the /27 is just a logical subdivision (and probably should be marked as a container)

@ITJamie commented on GitHub (Aug 6, 2023): `since the /27 is purely a logical subdivision of the /24` the actual ip objects should still be /24's in this case, the /27 is just a logical subdivision (and probably should be marked as a container)
Author
Owner

@jeremystretch commented on GitHub (Aug 7, 2023):

This is expected behavior and has already been discussed in previous issues.

@jeremystretch commented on GitHub (Aug 7, 2023): This is expected behavior and has already been discussed in previous issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8427