Reply

WAPI to get all free IPs in a subnet

luckyarora
Techie
Posts: 1
282     0

We need WAPI to get all the free IPs from IPAM for a particular subnet in one shot. As per document we can see there is a command for "ipv4addr": "func:nextavailableip. But is there any API which can give all IPs in one shot

Re: WAPI to get all free IPs in a subnet

Adviser
Posts: 43
282     0

Using the ipv4address object and searching on the Infoblox network and status=UNUSED will give you the list of available IPs for that subnet.

 

E.g.

 

curl -k1 -u testuser -X GET 'https://10.10.100.51/wapi/v1.4/ipv4address?network=10.10.10.0/24&status=UNUSED'

Re: WAPI to get all free IPs in a subnet

Authority
Posts: 16
282     0

This will exclude any free LEASES as part of a DHCP range within the subnet.  Can use "lease_state" for that with status FREE

Highlighted

Re: WAPI to get all free IPs in a subnet

Authority
Posts: 30
282     0

Hi JVoss,

 

I have a question on similar lines. In the below code as suggested by you, if i change the status to USED or to an extrensible attribute value as status=blocked, will the api give me used ip address and blocked ip address respectively ??

Showing results for 
Search instead for 
Do you mean 

Recommended for You