Disabling the DHCP Conduit settings via the API.
Home › Forums › Conduit: AEP Model › Disabling the DHCP Conduit settings via the API.
Tagged: Conduit Collection API., DHCP Setting
- This topic has 5 replies, 2 voices, and was last updated 4 years, 11 months ago by
Jason Reiss.
-
AuthorPosts
-
May 1, 2020 at 1:09 am #30566
Ajay K
ParticipantWe are trying to disable the DHCP settings via the Conduit collections endpoint API. We are able to retrieve the settings, however when we attempt to update the settings, using the http “PUT” method, since its an update to an existing setting, we are getting http error 404 error. Any ideas as to why this may be the case or is the update of DHCP settings via the API not supported?
Here is what we retrieve while making a get request using the following URL:
https://192.168.2.1/api/dhcp. In the below JSON, all we are doing is updating the value of the enabled property on the dhcp6s and dhcps collection to false and submitting the JSON back to the conduit.{ "code" : 200, "result" : { "__v" : 2, "dhcp6s" : [ { "domain" : "", "enabled" : true, "fixedAddresses" : [], "interface" : "br0", "leaseTime" : 86400, "leases" : [], "maxLeases" : 200, "mode" : "STATELESS", "modeRA" : "STATELESS", "options" : [ "dhcp-authoritative" ], "rangeEnd" : "", "rangeStart" : "", "subnetPrefix" : "", "subnetPrefixLength" : 64 } ], "dhcps" : [ { "defaultGateway" : "192.168.2.1", "domain" : "", "enabled" : true, "fixedAddresses" : [], "interface" : "br0", "leaseTime" : 86400, "leases" : [], "maxLeases" : 200, "options" : [ "dhcp-authoritative" ], "rangeEnd" : "192.168.2.254", "rangeStart" : "192.168.2.100", "subnetAddress" : "192.168.2.0", "subnetMask" : "255.255.255.0" } ] }, "status" : "success" }
Thanks,
AjayMay 1, 2020 at 7:28 am #30567Jason Reiss
KeymasterAjay,
You would need to PUT the entire “dhcps” or “dhcp6s” object with “enabled” changed as false to each of these URLS.
PUT https://10.17.100.138/api/dhcp/dhcp6s/0
PUT https://10.17.100.138/api/dhcp/dhcps/0Or delete them
DELETE https://10.17.100.138/api/dhcp/dhcp6s/0
DELETE https://10.17.100.138/api/dhcp/dhcps/0May 1, 2020 at 4:09 pm #30568Ajay K
ParticipantHey Jason,
Thanks a lot for your timely response. When you say to include the entire object, i.e.in addition to the enabled property I would need to include all the other properties as well in the request JSON object?
Thanks,
AjayMay 1, 2020 at 7:56 pm #30569Ajay K
ParticipantThanks Jason, I got it working with the complete object.
May 1, 2020 at 8:09 pm #30570Ajay K
ParticipantWould disabling the dhcp6s and dhcps, prevent me from connecting to the conduit using the IP 192.168.2.1? I can no longer connect to my conduit after disabling the DHCP.
Thanks,
Ajay?May 4, 2020 at 9:40 am #30571Jason Reiss
KeymasterYes and no. Disabling DHCP does not prevent access.
However it does disable the automatic settings your PC was using to connect.
The Ethernet settings will need to be set manually on your PC.https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol
-
AuthorPosts
- You must be logged in to reply to this topic.