- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Does the "next_available_ip" function accept a collection of ipv6networks as the input parameter
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2024 06:44 PM
I'm tring to create ipv6fixedaddress with "next_available_ip" function.
My question is ——
Does the "next_available_ip" function accept a collection of ipv6networks as the input parameter
so that when the first network is exhausted, it can still allocate in the second network
My request as following:
POST ${iburl}/wapi/v2.12/ipv6fixedaddress
{
"duid": "00:00:00:00:00:00:00:00:00:00:00:00:00:01",
"ipv6addr":{
"_object_function": "next_available_ip",
"_object": "ipv6network",
"_object_parameters": {
"network": "2402:2500::1/64,2402:2500::2/64"
},
"_result_field": "ips"
}
}
Re: Does the "next_available_ip" function accept a collection of ipv6networks as the input
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 02:27 AM - edited 06-07-2024 09:23 PM
@vegachowHealthCareGov wrote:I'm tring to create ipv6fixedaddress with "next_available_ip" function.
My question is ——
Does the "next_available_ip" function accept a collection of ipv6networks as the input parameter
so that when the first network is exhausted, it can still allocate in the second network
My request as following:
POST ${iburl}/wapi/v2.12/ipv6fixedaddress
{
"duid": "00:00:00:00:00:00:00:00:00:00:00:00:00:01",
"ipv6addr":{
"_object_function": "next_available_ip",
"_object": "ipv6network",
"_object_parameters": {
"network": "2402:2500::1/64,2402:2500::2/64"
},
"_result_field": "ips"
}
}
Hello,
No, the "_object_parameters" field in your request likely doesn't accept a collection of ipv6networks directly for "next_available_ip".
This function typically works with a single network as input.
Here are two possible approaches:
Sequential allocation:
Try allocating from the first network (2402:2500::1/64).
If allocation fails (due to exhaustion), handle the error and attempt allocation from the second network (2402:2500::2/64) in a separate request.
External logic:
Implement logic outside the API request to track available IPs across both networks.
Based on your tracking, choose the appropriate network and include it in the "_object_parameters" field during the API call.
I hope the information may help you.