Behavior for getting available ips in v6 prefixes differ between api and frontend #4873

Closed
opened 2025-12-29 19:21:32 +01:00 by adam · 0 comments
Owner

Originally created by @jweiher on GitHub (May 5, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v.2.11.1

Python version

3.9

Steps to Reproduce

  1. Create a v6 prefix
  2. Open ip addresses tab
  3. See that the frontend suggests (correctly) that :: (e.g. the 0-th ip in the net) is available, which is correct for v6
  4. Use /ipam/prefixes/{id}/available-ips/ via API for the same prefix - the first ip shown is ::1

Expected Behavior

The expected behavior would be that at least the api and the frontend behave the same.

Observed Behavior

API and Frontend behave different. The problem is probably due to different "get available ip" algorithms being implemented. The frontend view uses code from ipam/utils.py and the api uses the code from the prefix model. In my opinion there should only be one place in the codebase where this is implemented.

Originally created by @jweiher on GitHub (May 5, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v.2.11.1 ### Python version 3.9 ### Steps to Reproduce 1. Create a v6 prefix 2. Open ip addresses tab 3. See that the frontend suggests (correctly) that :: (e.g. the 0-th ip in the net) is available, which is correct for v6 4. Use /ipam/prefixes/{id}/available-ips/ via API for the same prefix - the first ip shown is ::1 ### Expected Behavior The expected behavior would be that at least the api and the frontend behave the same. ### Observed Behavior API and Frontend behave different. The problem is probably due to different "get available ip" algorithms being implemented. The frontend view uses code from ipam/utils.py and the api uses the code from the prefix model. In my opinion there should only be one place in the codebase where this is implemented.
adam added the type: bugstatus: accepted labels 2025-12-29 19:21:32 +01:00
adam closed this issue 2025-12-29 19:21:33 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4873