Sending Commands to Kea via HTTP
  • 16 Mar 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Sending Commands to Kea via HTTP

  • Dark
    Light
  • PDF

Article Summary

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.