All types of commands accept an optional ``remote`` map which selects the
database instance to which the command refers. For example:
-::
+.. code-block:: json
{
"command": "remote-subnet4-list",
The following is the example response to the ``remote-network4-list``
command, which includes the metadata:
-::
+.. code-block:: json
{
"result": 0,
the configuration database. The server is identified by a unique case
insensitive server tag. For example:
-::
+.. code-block:: json
{
"command": "remote-server4-del",
The following is the successful response to the `remote-server4-del` command:
-::
+.. code-block:: json
{
"result": 0,
This command is used to fetch the information about the selected DHCP server
from the configuration database. For example:
-::
+.. code-block:: json
{
"command": "remote-server6-get"
returns basic information about the server, such as server tag and the user's
description of the server:
-::
+.. code-block:: json
{
"result": 0,
This command is used to fetch all user defined DHCPv4 or DHCPv6 servers from the
database. The command structure is very simple:
-::
+.. code-block:: json
{
"command": "remote-server4-get-all"
The response includes basic information about each server, such as its server
tag and description:
-::
+.. code-block:: json
{
"result": 0,
following command creates a new (or updates an existing) DHCPv6 server in the
database:
-::
+.. code-block:: json
{
"command": "remote-server6-set"
The following is the example response to the above command:
-::
+.. code-block:: json
{
"result": 0,
The following command attempts to delete the DHCPv4 ``renew-timer``
parameter common for all servers from the database:
-::
+.. code-block:: json
{
"command": "remote-global-parameter4-del",
The following command attempts to fetch the ``boot-file-name``
parameter for the "server1":
-::
+.. code-block:: json
{
"command": "remote-global-parameter4-get",
In the case of the example above, the string value is returned, e.g.:
-::
+.. code-block:: json
{
"result": 0,
The example response for the integer value is:
-::
+.. code-block:: json
{
"result": 0,
The real value:
-::
+.. code-block:: json
{
"result": 0,
Finally, the boolean value:
-::
+.. code-block:: json
{
"result": 0,
for the specified server. The following example demonstrates how to fetch all
global parameters to be used by the server "server1":
-::
+.. code-block:: json
{
"command": "remote-global-parameter4-get-all",
The example response may look as follows:
-::
+.. code-block:: json
{
"result": 0,
within a single command, each having one of the four types: string,
integer, real, or boolean. For example:
-::
+.. code-block:: json
{
"command": "remote-global-parameter4-set"
The following command:
-::
+.. code-block:: json
{
"command": "remote-network6-del",
The following command fetches the "level3" IPv6 shared network along
with the full information about the subnets belonging to it:
-::
+.. code-block:: json
{
"command": "remote-network6-get",
The following command retrieves all shared networks to be used by the
"server1" and "server2":
-::
+.. code-block:: json
{
"command": "remote-network4-list"
`null` value the returned response contains a list of unassigned shared
networks, i.e. the networks which are associated with no servers. For example:
-::
+.. code-block:: json
{
"command": "remote-network4-list"
The example response to this command when non-null server tags are specified
looks similar to this:
-::
+.. code-block:: json
{
"result": 0,
When listing unassigned shared networks, the response will look similar
to this:
-::
+.. code-block:: json
{
"result": 0,
The following command adds the IPv6 shared network "level3" to the
database:
-::
+.. code-block:: json
{
"command": "remote-network6-set",
database. The option definition is identified by an option code and
option space. For example:
-::
+.. code-block:: json
{
"command": "remote-option-def6-del",
The following command retrieves a DHCPv4 option definition associated with all
servers, having the code of 1 and belonging to the option space "isc":
-::
+.. code-block:: json
{
"command": "remote-option-def4-get"
These commands are used to fetch all DHCP option definitions from the database
for the particular server or all servers. For example:
-::
+.. code-block:: json
{
"command": "remote-option-def6-get-all"
The following is the example response to this command:
-::
+.. code-block:: json
{
"result": 0,
The following command creates the DHCPv4 option definition in the
top-level "dhcp4" option space and associates it with the "server1":
-::
+.. code-block:: json
{
"command": "remote-option-def4-set",
database. The option is identified by an option code and option space.
For example:
-::
+.. code-block:: json
{
"command": "remote-option4-global-del",
The following command retrieves the IPv6 "DNS Servers" (code 23) option
associated with all servers:
-::
+.. code-block:: json
{
- "command": remote-option6-global-get",
+ "command": "remote-option6-global-get",
"arguments": {
"options": [
{
database for the particular server or for all servers. The following command
fetches all global DHCPv4 options for the "server1":
-::
+.. code-block:: json
{
"command": "remote-option6-global-get-all",
the `null` value. The following is the example response to this
command with a single option being associated with the "server1" returned:
-::
+.. code-block:: json
{
"result": 0,
same as in the Kea configuration file (see :ref:`dhcp4-std-options`
and :ref:`dhcp6-std-options`). For example:
-::
+.. code-block:: json
{
"command": "remote-option6-global-set",
for the user-defined DHCP option, the option code should be specified
instead of the name. For example:
-::
+.. code-block:: json
{
"command": "remote-option6-global-set",
option code 5 in the top-level option space from the shared
network "fancy".
-::
+.. code-block:: json
{
"command": "remote-option4-network-del",
name of the shared network for which the option is to be set. If such an option
already exists for the shared network, it is replaced with the new instance.
-::
+.. code-block:: json
{
"command": "remote-option6-network-set",
option. In order to delete a subnet level option the
`remote-option6-subnet-del` command must be used instead.
-::
+.. code-block:: json
{
"command": "remote-option6-pd-pool-del",
For example:
-::
+.. code-block:: json
{
"command": "remote-option6-pd-pool-set",
option code 5 in the top-level option space from an IPv4 address
pool:
-::
+.. code-block:: json
{
"command": "remote-option4-pool-del",
For example:
-::
+.. code-block:: json
{
"command": "remote-option4-pool-set",
option code 5 in the top-level option space from the subnet
having an identifier of 123.
-::
+.. code-block:: json
{
"command": "remote-option4-subnet-del",
the subnet for which the option is to be set. If such an option already exists
for the subnet, it is replaced with the new instance.
-::
+.. code-block:: json
{
"command": "remote-option6-subnet-set",
subnet from the database. It uses the subnet ID to identify the subnet. For
example, to delete the IPv4 subnet with an ID of 5:
-::
+.. code-block:: json
{
"command": "remote-subnet4-del-by-id",
IPv6 subnet from the database. It uses the subnet prefix to identify the
subnet. For example:
-::
+.. code-block:: json
{
"command": "remote-subnet6-del-by-prefix",
subnet from the database. It uses a subnet ID to identify the subnet.
For example:
-::
+.. code-block:: json
{
"command": "remote-subnet4-get-by-id",
subnet from the database. It uses a subnet prefix to identify the
subnet. For example:
-::
+.. code-block:: json
{
"command": "remote-subnet6-get-by-prefix",
selected servers or all servers. The following command retrieves all servers to
be used by the "server1" and "server2":
-::
+.. code-block:: json
{
"command": "remote-subnet4-list"
of unassigned subnets, i.e. the subnets which are associated with no servers.
For example:
-::
+.. code-block:: json
{
"command": "remote-subnet4-list"
The example response to this command when non-null server tags are specified
looks similar to this:
-::
+.. code-block:: json
{
"result": 0,
When listing unassigned subnets, the response will look similar to this:
-::
+.. code-block:: json
{
"result": 0,
Consider the following example:
-::
+.. code-block:: json
{
"command": "remote-subnet4-set",
network - the ``shared-network-name`` must be explicitly set to
``null``:
-::
+.. code-block:: json
{
"command": "remote-subnet4-set",
``remote-class4-get-all`` command to fetch all client classes and find
the dependent ones.
-::
+.. code-block:: json
{
"command": "remote-class4-del",
These commands retrieve DHCPv4 or DHCPv6 client class information by a client
class name.
-::
+.. code-block:: json
{
"command": "remote-class4-get",
A response to the command looks similar to this:
-::
+.. code-block:: json
{
"result": 0,
of `server1` and all servers. In other words, it returns all client classes
used by that server.
-::
+.. code-block:: json
{
"command": "remote-class4-get-all",
A response to the command looks similar to this:
-::
+.. code-block:: json
{
"result": 0,
configuration file (see :ref:`dhcp4-client-classifier` and
:ref:`dhcp6-client-classifier` for details).
-::
+.. code-block:: json
{
"command": "remote-class4-set",
database: `first-class` and `second-class`. To add a new class, `third-class`,
between these two, use the command similar to the following:
-::
+.. code-block:: json
{
"command": "remote-class6-set",
The `follow-class-name` parameter can be explicitly set to `null`, e.g.:
-::
+.. code-block:: json
{
"command": "remote-class6-set",