- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How to modify DHCP range domain-name-server option?
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2023 09:47 PM - edited 02-16-2023 09:49 PM
I am using the PUT method with this URL
/range/ZG5zLmRoY3BfcmFuZ2UkMTAuMTI5LjEzMi4xLzEwLjEyOS4xMzIuMjUwLy8vNi85OA:10.129.132.1/10.129.132.250/<name_of_the_network_view>
with this JSON body
{ "options":[ { "values":[ { "value":"8.8.8.8", "name":"domain-name-servers", "num":6, "use_option":true, "vendor_class":"DHCP" } ] } ] }
and I am getting this error
{ "Error": "AdmConProtoError: Required field missing: value", "code": "Client.Ibap.Proto", "text": "Required field missing: value" }
The URL should be correct because I can use this simple body to change the name/comment for the range
{ "name": "Difan-testing-range-1" }
Could you tell me what I did wrong? Thanks!
Re: How to modify DHCP range domain-name-server option?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2023 01:36 PM
Any updates, please? Would appreciate your help very much!
Re: How to modify DHCP range domain-name-server option?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2023 09:29 PM
Hi Difan,
The request body does not need a 'values' array inside the 'options' array. In your case the request body should be:
"options": [ { "value": "8.8.8.8", "name": "domain-name-servers", "num": 6, "use_option": true, "vendor_class": "DHCP" } ]
Re: How to modify DHCP range domain-name-server option?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 07:19 PM
Hi Shukran, your request body works, and thanks for that. However, after I applied it, my "default route" option changed... It was configured as "inherited: false" with this value
{ "name": "routers", "num": 3, "use_option": true, "value": "10.129.132.254", "vendor_class": "DHCP" }
After applying the provided body data, it became "inherited: true" with this data
{ "name": "routers", "num": 3, "use_option": false, "value": "10.129.57.254", "vendor_class": "DHCP" }
Here is the request body I applied:
{ "options": [ { "name": "domain-name-servers", "num": 6, "value": "8.8.8.8", "use_option": false, "vendor_class": "DHCP" } ] }
I didn't touch this default router option 3 at all... Do you know why this is the case? Thanks!