Reply

How to assign a router IP to a DHCP range using REST

community Employee
Employee
Posts: 65
2368     0

Hi, I need to know how to assign a router IP to a DHCP range of the IPAM product. I am able to successfully set a range with this syntax: https://10.130.190.5/wapi/v1.0/range?start_addr=6.6.0.2&end_addr=6.6.0.6&network=6.6.0.0/29 ...To clarify, In the IPAM GUI once a IPAM range is created, and you go into the edit window, you can set the IP Address of the Router under the IPv4 DHCP Options selection. I want to be able to set this Router IP using the REST api. Please give an example of how to do this.

Well, this is an old question, but I'll answer it anyway...

GBleiker
Techie
Posts: 3
2369     0
I was looking for the same thing, and seeing nobody answered so far, I'll write down what I did. First of all you need to post the parameters in the body of the request as a JSON object and set the content-type of the body to application/json. The body should look something like this: {"member": { "_struct":"dhcpmember","ipv4addr":"x.x.x.x", "name":"infoblox.localdomain"} , "start_addr":"x.x.x.x", "end_addr":"x.x.x.x", "server_association_type":"MEMBER", "enable_ddns":true, "use_enable_ddns":true, "options":[ { "name": "dhcp-lease-time", "use_option": true,"value": "6000", "vendor_class": "DHCP" }, { "name": "routers", "use_option": true,"value": "x.x.x.x", "vendor_class": "DHCP" }, { "name": "domain-name", "use_option": true,"value": "ictest.local", "vendor_class": "DHCP" }, { "name": "ntp-servers","value": "x.x.x.x", "vendor_class": "DHCP" } ], "use_options": true } Obviously, you'll have to replace the x.x.x.x with something meaningful and the options are just samples. The URL to call will then be https://infoblox/wapi/v1.1/range Hope this helps Greg
Showing results for 
Search instead for 
Do you mean 

Recommended for You