- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Best practices for reserving ranges then adding hosts
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2021 03:02 AM
Hi,
I've read through lots of posts but not seen exactly what I'm looking for.
I need to reserve ranges for services. So when people reserve a new network they can't take one that is already reserved and they know not to steal a /28 from a reserved /24. I then need to automate assigning the next unused IP within that range for servers that come online.
I tired using the DHCP reservation as it leaves the range reserved at range level but the IPs unused. This disables the next IP function apparently within the range so I couldn't add a host using netx IP.
So what is the best practice for reserving a network at range level for a service but allowing IPs free IPs within that range to be assigned automatically?
Re: Best practices for reserving ranges then adding hosts
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2021 10:14 PM
Hi,
This is what you can do:
- Create a /24 network, say 10.10.10.0/24
- Create a reservation range using all the IPs in the network, 10.10.10.1 - 10.10.10.254
- When you run a "next_available_network"or "next_available_ip" call against the network, it will return with an empty response.
- For servers that need to be allocated IP addresses from this reserved range, issue the "next_available_ip" call against the range, like below:
API to get the range reference: curl -k -u <uname>:<pwd> -X GET 'https://grid-master/wapi/v2.10/range?network=10.10.10.0/24' Sample output: [ { "_ref": "range/ZG5zLmRoY3BfcmFuZ2UkMTAuMTAuMTAuMS8xMC4xMC4xMC4yNTQvLy8wLw:10.10.10.1/10.10.10.254/default", "end_addr": "10.10.10.254", "network": "10.10.10.0/24", "network_view": "default", "start_addr": "10.10.10.1" } ] API to get next available IP within the range: curl -k -u <uname>:<pwd> -X POST 'https://grid-master/wapi/v2.10/range/ZG5zLmRoY3BfcmFuZ2UkMTAuMTAuMTAuMS8xMC4xMC4xMC4yNTQvLy8wLw:10.10.10.1/10.10.10.254/default?_function=next_available_ip' Sample output: { "ips": [ "10.10.10.1" ] }
Hope this is helpful,
Regards,
Krishna