Utilization can push up to 200% #5101

Closed
opened 2025-12-29 19:24:14 +01:00 by adam · 3 comments
Owner

Originally created by @c-po on GitHub (Jul 26, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.9

Python version

3.6

Steps to Reproduce

  1. Create a new prefix 192.0.2.0/30
  2. Import IP addresses via https:///ipam/ip-addresses/import/
address
192.0.2.0/30
192.0.2.1/30
192.0.2.2/30
192.0.2.3/30

Expected Behavior

An error should be raised as 192.0.2.0/30 and 192.0.2.3/30 are no host addresses

Observed Behavior

image

image

Originally created by @c-po on GitHub (Jul 26, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.9 ### Python version 3.6 ### Steps to Reproduce 1. Create a new prefix `192.0.2.0/30` 2. Import IP addresses via https://<netbox>/ipam/ip-addresses/import/ ``` address 192.0.2.0/30 192.0.2.1/30 192.0.2.2/30 192.0.2.3/30 ``` ### Expected Behavior An error should be raised as 192.0.2.0/30 and 192.0.2.3/30 are no host addresses ### Observed Behavior ![image](https://user-images.githubusercontent.com/25299219/126975120-05b0549a-85f4-42b6-bc3f-cd998c8f1ef3.png) ![image](https://user-images.githubusercontent.com/25299219/126975144-e0dbd4d1-8175-45c3-826a-5a179b287a33.png)
adam added the type: bugstatus: accepted labels 2025-12-29 19:24:14 +01:00
adam closed this issue 2025-12-29 19:24:15 +01:00
Author
Owner

@sdktr commented on GitHub (Jul 27, 2021):

I don't think we should block the creation of these (subnet/broadcast) IP's. The creation of them might very well be intended to do just that: reflect how the IP's are behaving. Nice excercise for the new 'CustomValidator' hooks :-)

A utilization above 100% does seem odd as well though. Maybe we could put an artificial limit on that number to cap it at 100?

@sdktr commented on GitHub (Jul 27, 2021): I don't think we should block the creation of these (subnet/broadcast) IP's. The creation of them might very well be intended to do just that: reflect how the IP's are behaving. Nice excercise for the [new 'CustomValidator' hooks](https://github.com/netbox-community/netbox/issues/5963) :-) A utilization above 100% does seem odd as well though. Maybe we could put an artificial limit on that number to cap it at 100?
Author
Owner

@jeremystretch commented on GitHub (Jul 28, 2021):

Capping it at 100% seems like the way to go.

@jeremystretch commented on GitHub (Jul 28, 2021): Capping it at 100% seems like the way to go.
Author
Owner

@c-po commented on GitHub (Jul 28, 2021):

@sdktr and @jeremystretch I agree that capping would also be a viable option if one want's to document those IP addresses.

What happens if the network and broadcast address is documented but two host addresses are still free? Will it show 100%, too?

Network and Broadcast addresses can be calculated, so I think the most effective way would be to not take them into account when calculating the host address usage in percent.

@c-po commented on GitHub (Jul 28, 2021): @sdktr and @jeremystretch I agree that capping would also be a viable option if one want's to document those IP addresses. What happens if the network and broadcast address is documented but two host addresses are still free? Will it show 100%, too? Network and Broadcast addresses can be calculated, so I think the most effective way would be to not take them into account when calculating the host address usage in percent.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5101