large ipv6 ranges lead to an error #5359

Closed
opened 2025-12-29 19:27:07 +01:00 by adam · 1 comment
Owner

Originally created by @hojerst on GitHub (Sep 11, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.0.2

Python version

3.9

Steps to Reproduce

  1. try to create an ip range for 1:2:3:4::/64 to 1:2:3:4::ffff:ffff/64

I assume, that the size calculation leads to an error, as this doesn't fit to an int32

Expected Behavior

ip range is created

Observed Behavior

Server Error

There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'django.db.utils.DataError'>

integer out of range

Python version: 3.9.5
NetBox version: 3.0.2

If further assistance is required, please post to the NetBox discussion forum on GitHub.

Originally created by @hojerst on GitHub (Sep 11, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.0.2 ### Python version 3.9 ### Steps to Reproduce 1. try to create an ip range for 1:2:3:4::/64 to 1:2:3:4::ffff:ffff/64 I assume, that the size calculation leads to an error, as this doesn't fit to an int32 ### Expected Behavior ip range is created ### Observed Behavior Server Error There was a problem with your request. Please contact an administrator. The complete exception is provided below: <class 'django.db.utils.DataError'> integer out of range Python version: 3.9.5 NetBox version: 3.0.2 If further assistance is required, please post to the NetBox discussion forum on GitHub.
adam added the type: bugstatus: accepted labels 2025-12-29 19:27:07 +01:00
adam closed this issue 2025-12-29 19:27:07 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 13, 2021):

The range size is currently stored as a signed integer, with a maximum value of 2^32-1, or essentially half the size of the entire IPv4 space. While perhaps it was an omission to not document the maximum supported range, I don't know that it makes sense to raise this any higher. When we talk of IP ranges, we're typically referencing magnitudes in the hundreds or thousands of individual addresses, not millions. Open to other opinions.

@jeremystretch commented on GitHub (Sep 13, 2021): The range size is currently stored as a signed integer, with a maximum value of 2^32-1, or essentially half the size of the entire IPv4 space. While perhaps it was an omission to not document the maximum supported range, I don't know that it makes sense to raise this any higher. When we talk of IP ranges, we're typically referencing magnitudes in the hundreds or thousands of individual addresses, not millions. Open to other opinions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5359