netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Expand IP Range Limit to Account for Larger IPv6 Ranges

Open Joshua-M-CANARIE opened this issue 2 years ago • 11 comments
trafficstars

NetBox version

3.4.7

Feature type

Data model extension

Proposed functionality

Increase IP Range MAX_SIZE from the current: MAX_SIZE = 2 ** 32 - 1 and change it to accommodate IPv6 Ranges:

MAX_SIZE = 2 ** 32 - 1
if self.family == 6:
   MAX_SIZE = 2 ** 128 - 1

Use case

Organizations wanting to keep track of their IPv6 blocks are limited currently to /96 or smaller blocks. Within my organization, we have IPv6 blocks that we break into /64 ranges for peering, but attempts to keep track of these peering blocks with IP Ranges fail due to the maximum size restriction limiting to IPv4 sizes.

Database changes

No response

External dependencies

No response

Joshua-M-CANARIE avatar Apr 12 '23 20:04 Joshua-M-CANARIE

I'm afraid I don't understand your use case. /64s would be tracked as prefixes, not IP ranges. Could you elaborate on specifically what you're trying to model?

jeremystretch avatar Apr 13 '23 13:04 jeremystretch

For IPv6, we have a /48 that we have been breaking up into /64s for smaller applications like peering, I was intending to track these /64s with ranges to allow for displaying what the next available /64 is. These subnets for purely used for peering, and therefor IP Prefixes are overkill for our application. I recognize that it's wasteful of the IP address usage, but it's the habit with our company, and has been in place since before I joined.

Joshua-M-CANARIE avatar Apr 13 '23 13:04 Joshua-M-CANARIE

I spoke with Joshua about this. Here is how it is setup from my understanding. Maybe Joshua can correct me further.

X::X/48 (Aggregate) -- X::X/64 (Prefix) ---- X::X/64 to X::Y/64 where X to Y is a /90 for example.

Available IPs in the range for the /96 is the limit for the range (2**32). I believe they would like to be able to use a complete range, all the way up to the /64 or ideally the /0 bound of a IPv6 address.

I suspect we placed the 2**32 in place not thinking about the possible IP Ranges available in IPv6

DanSheps avatar Apr 14 '23 03:04 DanSheps

I still don't understand the need to track such an enormous arbitrary range. Why not use a prefix?

jeremystretch avatar May 04 '23 20:05 jeremystretch

To clarify what we do:

We have a /32, that we split into /48s, and split those into /64 that are used for point to point peerings. X:X::/32 -- X:X:X::/48 (prefix) ---- X:X:X:X::/64 (range) ------ X:X:X:X::1/64 to X:X:X:X::2/64 (the peering addresses)

My question is that, you have the MAX_SIZE value used to keep ranges from being 0.0.0.0 to 255.255.255.255, but allow for any other range of IPv4 addresses to be represented in a range, but with the limitation for IPv4, IPv6 gets unproportionately limited to only a quarter of it's size, isn't it fair to provide both types of IP access to their near full range?

Joshua-M-CANARIE avatar May 09 '23 17:05 Joshua-M-CANARIE

The MAX_SIZE constant is used to validate that the size of a range doesn't exceed the maximum value of the size database field (a signed 32-bit integer); it has nothing to do with address planning.

jeremystretch avatar May 09 '23 17:05 jeremystretch

Hello!, I have a similar situation. What would be the correct way to model this in Netbox currently?:

Delegated space --> /48 (pool segment) Subnet --> /64 (segment) DHCPv6 range --> space within the same /64 (range)

Currently Netbox doesn't accept a range like ????:0600:008:4089:0:ffff:0:0 - ????:0600:008:4089:0:ffff:ffff:ffff.

I assume I could mark the parent /64 as a pool and create ranges within it, but I understand pools are not actually setup as subnets in active nodes, which in this opportunity is not the case.

ciroiriarte avatar May 18 '23 10:05 ciroiriarte

I might make sense to switch to BigIntegerField if there is a need.

DanSheps avatar May 18 '23 14:05 DanSheps

We would also like to use /80 IPv6 ranges within a /64 prefix.

gurubert avatar Aug 15 '23 11:08 gurubert

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] avatar Nov 14 '23 04:11 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] avatar Feb 28 '24 04:02 github-actions[bot]