/32 IP's not automatically represented in /32 subnet. #5014

Closed
opened 2025-12-29 19:23:10 +01:00 by adam · 5 comments
Owner

Originally created by @darcynz on GitHub (Jun 21, 2021).

Originally assigned to: @WillIrvine on GitHub.

NetBox version

v2.11.7

Python version

3.7

Steps to Reproduce

  1. Have a /32 IP address,

  2. Create a /32 Subnet for that IP address

  3. In the new subnet on the IP addresses tab observe IP's.

Expected Behavior

IP address reference should be observed and not the ability to assign an IP address in the subnet.

Observed Behavior

'Available IP' Button is present instead of a reference to the IP address as per 1).

Originally created by @darcynz on GitHub (Jun 21, 2021). Originally assigned to: @WillIrvine on GitHub. ### NetBox version v2.11.7 ### Python version 3.7 ### Steps to Reproduce 1) Have a /32 IP address, 2) Create a /32 Subnet for that IP address 3) In the new subnet on the IP addresses tab observe IP's. ### Expected Behavior IP address reference should be observed and not the ability to assign an IP address in the subnet. ### Observed Behavior 'Available IP' Button is present instead of a reference to the IP address as per 1).
adam added the status: acceptedtype: feature labels 2025-12-29 19:23:10 +01:00
adam closed this issue 2025-12-29 19:23:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 21, 2021):

Why shouldn't a user be able to create a /32 IP address for assignment to an interface in addition to a /32 route to advertise that address?

@jeremystretch commented on GitHub (Jun 21, 2021): Why shouldn't a user be able to create a /32 IP address for assignment to an interface in addition to a /32 route to advertise that address?
Author
Owner

@WillIrvine commented on GitHub (Jun 21, 2021):

I think the issue here is that the /32 IP address gets created in the /32 subnet, but then does not display when navigating back to the Subnet

Example:

  1. Make /32 Prefix

image

  1. Make /32 IP address within that prefix

image

  1. Go back to parent prefix, newly created IP address does not display under /32 prefixes IP address's, however IP address has been created.

image

@WillIrvine commented on GitHub (Jun 21, 2021): I think the issue here is that the /32 IP address gets created in the /32 subnet, but then does not display when navigating back to the Subnet Example: 1. Make /32 Prefix ![image](https://user-images.githubusercontent.com/32685892/122830132-03c9fe00-d33c-11eb-8810-e45c5e5680d5.png) 2. Make /32 IP address within that prefix ![image](https://user-images.githubusercontent.com/32685892/122830200-1d6b4580-d33c-11eb-880d-d052227ebd61.png) 3. Go back to parent prefix, newly created IP address does not display under /32 prefixes IP address's, however IP address has been created. ![image](https://user-images.githubusercontent.com/32685892/122830314-48559980-d33c-11eb-8413-ac92c17e607a.png)
Author
Owner

@darcynz commented on GitHub (Jun 22, 2021):

Sorry I should have included pictures. We have no issue with duplicate /32's just that they are not displaying within a subnet as per WillIrvine's images above.

@darcynz commented on GitHub (Jun 22, 2021): Sorry I should have included pictures. We have no issue with duplicate /32's just that they are not displaying within a subnet as per WillIrvine's images above.
Author
Owner

@WillIrvine commented on GitHub (Jun 23, 2021):

Hi

https://github.com/netbox-community/netbox/issues/6455#issuecomment-855275592

This solution seems to work and AFAIA does not look to cause any undesired issues.
This looks to however be more of a design question as expressed by Jeremy - Should a /32 Prefix contain a /32 IP.

I think it should as people are using IP's and Prefix's for separate purposes, and it maintains a familiar workflow to track both individually. But if not we should at least limit the UI from displaying that there is 1 available address within the prefix.

Happy to put in a PR for this if accepted.

@WillIrvine commented on GitHub (Jun 23, 2021): Hi https://github.com/netbox-community/netbox/issues/6455#issuecomment-855275592 This solution seems to work and AFAIA does not look to cause any undesired issues. This looks to however be more of a design question as expressed by Jeremy - Should a /32 Prefix contain a /32 IP. I think it should as people are using IP's and Prefix's for separate purposes, and it maintains a familiar workflow to track both individually. But if not we should at least limit the UI from displaying that there is 1 available address within the prefix. Happy to put in a PR for this if accepted.
Author
Owner

@stevenmyhre commented on GitHub (Jul 22, 2021):

I also ran into this. We are using prefixes to document NAT translations (even though netbox doesn't support it specifically), and, it's perfectly valid to have a 1-1 nat with a /32 prefix, i.e. 1-1 NAT. However, the single IP Address in the prefix gets lost the way it is coded currently.

@stevenmyhre commented on GitHub (Jul 22, 2021): I also ran into this. We are using prefixes to document NAT translations (even though netbox doesn't support it specifically), and, it's perfectly valid to have a 1-1 nat with a /32 prefix, i.e. 1-1 NAT. However, the single IP Address in the prefix gets lost the way it is coded currently.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5014