Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps

Reply

How to modify DHCP range domain-name-server option?

[ Edited ]
Techie
Posts: 14
1571     1

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?

Techie
Posts: 14
1571     1

Any updates, please? Would appreciate your help very much!

Re: How to modify DHCP range domain-name-server option?

Superuser
Posts: 38
1571     1

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"
        }
    ]

 

Shukran

Re: How to modify DHCP range domain-name-server option?

Techie
Posts: 14
1572     1

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!

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You