Disabling the DHCP Conduit settings via the API.

Home Forums Conduit: AEP Model Disabling the DHCP Conduit settings via the API.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #30566
    Ajay K
    Participant

    We 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,
    Ajay

    #30567
    Jason Reiss
    Keymaster

    Ajay,

    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/0

    Or delete them

    DELETE https://10.17.100.138/api/dhcp/dhcp6s/0
    DELETE https://10.17.100.138/api/dhcp/dhcps/0

    #30568
    Ajay K
    Participant

    Hey 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,
    Ajay

    #30569
    Ajay K
    Participant

    Thanks Jason, I got it working with the complete object.

    #30570
    Ajay K
    Participant

    Would 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?

    #30571
    Jason Reiss
    Keymaster

    Yes 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.