Automatic reservation of subnets and ip addresses #40

Closed
opened 2025-12-29 15:30:27 +01:00 by adam · 7 comments
Owner

Originally created by @kasimon on GitHub (Jun 28, 2016).

In our setup a central function of an ipam system is to handle the reservation of free ip addresses and subnets, this is crucial for fully automated server provisioning workflows. So please have a look at the ip reservation functions of tools like phpipam and especially nipap and generously steal concepts from them and adapt them accordingly ;)

Originally created by @kasimon on GitHub (Jun 28, 2016). In our setup a central function of an ipam system is to handle the reservation of free ip addresses and subnets, this is crucial for fully automated server provisioning workflows. So please have a look at the ip reservation functions of tools like phpipam and especially nipap and generously steal concepts from them and adapt them accordingly ;)
adam closed this issue 2025-12-29 15:30:28 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 28, 2016):

This is way too broad to mark as a feature request. Could you please enumerate the specific workflow you'd like to see?

@jeremystretch commented on GitHub (Jun 28, 2016): This is way too broad to mark as a feature request. Could you please enumerate the specific workflow you'd like to see?
Author
Owner

@bellwood commented on GitHub (Jun 28, 2016):

In PHPIPAM we have a "free IP's" tool that breaks down what free prefixes are available amongst our aggregates

When provisioning it's nice to know what block you can grab and go with

@bellwood commented on GitHub (Jun 28, 2016): In PHPIPAM we have a "free IP's" tool that breaks down what free prefixes are available amongst our aggregates When provisioning it's nice to know what block you can grab and go with
Author
Owner

@kasimon commented on GitHub (Jun 28, 2016):

I'll gladly try to precise my intention. If I'm going to add a new server to a subnet, I don't want to search manually for a free ip in that subnet but instead have the ability to add a entry to netbox and let netbox pick the first free ip in that subnet, return it to the caller and in the same atomic transaction add an entry to the netbox database so that ip is not free anymore.

Have a look at nipap's "add from-prefix" command for inspiration: https://spritelink.gitbooks.io/nipap-user-guide/content/cli/add_a_prefix.html

This workflow could also be implemented for subnets, which is especially helpful for ipv6 setups. The use case would be "give me the first free /64 from this /56 and reserve it for me".

Hopefully this makes it clear.

(My dream scenario would be the different open source dcim/ipam tools being able to interact with each other and combine their best features, so one could combine the snmp discovery of netdot, the ipam engine of nipap with the polished interface and integration of the different subsystems of netbox. But I fear that is no a very realistic vision.)

@kasimon commented on GitHub (Jun 28, 2016): I'll gladly try to precise my intention. If I'm going to add a new server to a subnet, I don't want to search manually for a free ip in that subnet but instead have the ability to add a entry to netbox and let netbox pick the first free ip in that subnet, return it to the caller and in the same atomic transaction add an entry to the netbox database so that ip is not free anymore. Have a look at nipap's "add from-prefix" command for inspiration: https://spritelink.gitbooks.io/nipap-user-guide/content/cli/add_a_prefix.html This workflow could also be implemented for subnets, which is especially helpful for ipv6 setups. The use case would be "give me the first free /64 from this /56 and reserve it for me". Hopefully this makes it clear. (My dream scenario would be the different open source dcim/ipam tools being able to interact with each other and combine their best features, so one could combine the snmp discovery of netdot, the ipam engine of nipap with the polished interface and integration of the different subsystems of netbox. But I fear that is no a very realistic vision.)
Author
Owner

@ghost commented on GitHub (Jul 14, 2016):

+1. this would be great. it's nice to see what's specifically available, reserved, blocked, in use, and not guess based on what's not listed in the IPAM. in my experience, you absolutely cannot count on others to mark an IP used if they provision a server or appliance.

@ghost commented on GitHub (Jul 14, 2016): +1. this would be great. it's nice to see what's specifically available, reserved, blocked, in use, and not guess based on what's not listed in the IPAM. in my experience, you absolutely cannot count on others to mark an IP used if they provision a server or appliance.
Author
Owner

@Gelob commented on GitHub (Aug 4, 2016):

I think this was the original issue before https://github.com/digitalocean/netbox/issues/289 and was completed with v1.4.1

@Gelob commented on GitHub (Aug 4, 2016): I think this was the original issue before https://github.com/digitalocean/netbox/issues/289 and was completed with [v1.4.1](https://github.com/digitalocean/netbox/releases/tag/v1.4.1)
Author
Owner

@alexjhart commented on GitHub (Aug 16, 2016):

I agree the "let netbox pick the first free ip in that subnet" feature exists as of v1.4.1

@alexjhart commented on GitHub (Aug 16, 2016): I agree the "let netbox pick the first free ip in that subnet" feature exists as of v1.4.1
Author
Owner

@jeremystretch commented on GitHub (Aug 19, 2016):

I'm going to close this out as it seems to have been addressed by annotating available prefixes and IPs. I'm not sure that a blind "give me the first free IP" in a given prefix is particularly useful. But if we did implement something like that, it would be an API endpoint.

@jeremystretch commented on GitHub (Aug 19, 2016): I'm going to close this out as it seems to have been addressed by annotating available prefixes and IPs. I'm not sure that a blind "give me the first free IP" in a given prefix is particularly useful. But if we did implement something like that, it would be an API endpoint.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#40