Sending Commands to Kea via HTTP
  • Updated on 07 Aug 2019
  • 1 minute to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Sending Commands to Kea via HTTP

  • Print
  • Share
  • Dark
    Light

When sending commands to Kea via a UNIX socket, there's no ambiguity; only one daemon is listening, so there is no need to explicitly specify a recipient. However, when sending commands via HTTP, you must specify whether it's addressed to dhcpv4, dhcpv6, or the control agent itself. This specification is added using the service parameter.

For example, the following command adds a reservation via dhcpv4:

{
   "command": "reservation-add",
   "service": [ "dhcp4" ],
   "arguments": {
                   "reservation": {
                   "subnet-id": 16,
                   "hw-address": "b8:27:eb:8c:7a:be",
                   "ip-address": "203.0.113.2"
               }
   }
}

For more information about commands in the Kea Shell, please refer to the Kea Administrator Reference Manual.

Was this article helpful?