-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Feature idea: support for explicit "IP ranges"
An IP range would have a start address and an end address attribute, a name, and a VRF. It would be independent from IP prefixes.
Use case 1: documentation of ranges within a prefix. For example, in our current dumb spreadsheet we have assigned logical ranges for user assignment
- 10.10.2.151 - 10.10.2.160 : Tester range
- 10.10.2.180 - 10.10.2.253 : Admin/Developer range
and I prefer not to lose that information when moving to Netbox.
Use case 2 (related to #761): a cleaner way of defining IP pools, rather than enumerating all addresses within a range and setting their status individually to "DHCP Pool". The current model wouldn't work very well if you wanted a large IPv6 pool. Also, generating a DHCP config from this involves iterating over all the addresses and collecting adjacent ones together to form a single range, which is messy.
Use case 2a: for redundancy you have two DHCP servers on a subnet with separate ranges, e.g. DHCP1 has pool .50-.149 and DHCP2 has pool .150-.249
Use case 3 (related to #665): be able to automatically assign the next available address from within a specific range. For example: suppose your address plan for a /24 reserves .1-.9 and .250-.254 for infrastructure. So you define a named range .10-.249 and then on demand assign the next available address from within that range. This would be particularly helpful for automatic assignment via an API.
This last case can also be handled by marking addresses unused addresses in the .1-.9 and .250-.254 ranges as status "reserved". That may be reasonable for IPv4, but might not work well for IPv6, e.g. if your plan had
- ::0 to ::fff - reserved for infrastructure
- ::1000 to ::ffff - available for assignment
It also doesn't let you assign from two or more ranges within the same prefix - e.g. going back to use case 1, "assign next Tester address" or "assign next Admin/Developer address"