Reply
Accepted Solution

error while configuring next_available_IP for IPv6 using request method single call

hshah
Techie
Posts: 8
321     0

So, I wanted to configure next available IP address using request single call.

 

Here's my IPv4 call: https://{{grid_ip}}/wapi/v2.9.5/request

 

and then I'm passing all parameters as follow: (apologies if I'm not using correct terminology)

 

[{
    "method": "POST",
    "object": "record:host",
    "data": { "configure_for_dns": false,
                  "ipv4addrs":[{"configure_for_dhcp": false,
                                        "ipv4addr":{"_object_function":"next_available_ip",
                                                           "_result_field":"ips",
                                                           "_object" : "network",
                                                           "_object_parameters":{"network":"10.10.10.0/24"}}}],
                "name": "CPE_1",
                "network_view": "sandbox"},
    "args": { "_return_fields": "name" }
}] 

and this one works perfectly fine and I'm able to configure next available IPv4 address. now, I'm trying to do same thing for IPv6

[{
    "method": "POST",
    "object": "record:host",
    "data": { "configure_for_dns": false,
                  "ipv6addrs":[{"configure_for_dhcp": false,
                                        "ipv6addr":{"_object_function":"next_available_ip",
                                                           "_result_field":"ips",
                                                           "_object" : "ipv6network",
                                                           "_object_parameters":{"network":"2600:6801:1106:f00::f00/120"}}}],
                "name": "CPE_1",
                "network_view": "sandbox"},
    "args": { "_return_fields": "name" }
}] 

 

but when i run this query, I got following error:

{
"Error": "AdmConProtoError: The search parameters {\"network\": \"2600:6801:1106:f00::f00/120\"} for object ipv6network returned multiple objects",
"code": "Client.Ibap.Proto",
"text": "The search parameters {\"network\": \"2600:6801:1106:f00::f00/120\"} for object ipv6network returned multiple objects"
}

according to this document:
https://infoblox-use1.viasat.cloud/wapidoc/objects/record.host_ipv6addr.html
but example provided here is for Ipv4 and not for ipv6 and when I try to do same for IPv6 I got above error.
 
Can anyone try out and point me as to what i am doing wrong here?
 

 

Re: error while configuring next_available_IP for IPv6 using request method single call

Adviser
Posts: 101
322     0

Hi,

 

Do you have the same IPv6 network(2600:6801:1106:f00::f00/120) in different network views on your grid?

 

If yes, please add the network_view parameter in your list of _object_parameters like below:

'_object_parameters': {
        'network': '2600:6801:1106:f00::f00/120',
        'network_view': 'replace_with_your_network_view',
    }

Hope this helps,

Krishna Vasudevan

Re: error while configuring next_available_IP for IPv6 using request method single call

hshah
Techie
Posts: 8
322     0

YES!!! You're right


That one worked. However, I have to define Network_View twice in the body part. 

[{
"method": "POST",
"object": "record:host",
"data": { "configure_for_dns": false,
"ipv6addrs":[{"configure_for_dhcp": false,
"ipv6addr":{"_object_function":"next_available_ip",
"_result_field":"ips",
"_object" : "ipv6network",
"_object_parameters":{"network":"2600:6801:1106:f00::f00/120", "network_view": "sandbox"}}}],
"network_view": "sandbox",
"name": "Loopback-4"},
"args": { "_return_fields": "name,ipv6addrs,network_view" }
}]

 

Is It because I have the same subnet in 2 different network Views? If you can explain as to why I need to use twice I would make things clear.

 

Just to test it out I created a dummy IPv6 network and it worked fine. So, I guess it was the issue with conflicting IPv6 addresses in 2 different views. 

[{
"method": "POST",
"object": "record:host",
"data": { "configure_for_dns": false,
"ipv6addrs":[{"configure_for_dhcp": false,
"ipv6addr":{"_object_function":"next_available_ip",
"_result_field":"ips",
"_object" : "ipv6network",
"_object_parameters":{"network":"2600:6801:1106:f00::e00/126"}}}],
"network_view": "sandbox",
"name": "Loopback-5"},
"args": { "_return_fields": "name,ipv6addrs,network_view" }
}]

 

Thanks,

Harsh

 

 

Re: error while configuring next_available_IP for IPv6 using request method single call

Adviser
Posts: 101
322     0

Hi,

 

The first network view (in the _object_parameters) indicates that the network you are looking for is in the network view 'sandbox'.

 

The second network view (network_view) indicates that the host record you are creating is created within the network view 'sandbox'.

 

I hope this makes sense,

Krishna Vasudevan

Re: error while configuring next_available_IP for IPv6 using request method single call

hshah
Techie
Posts: 8
322     0

It absolutely does. Many Thanks, Krishna.

Showing results for 
Search instead for 
Do you mean 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin