API Reference
Kea currently supports 196 commands in kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6 daemons and cb_cmds, class_cmds, gss_tsig, high_availability, host_cache, host_cmds, lease_cmds, lease_query, stat_cmds, subnet_cmds hook libraries.
Commands supported by kea-ctrl-agent daemon: build-report, config-get, config-hash-get, config-reload, config-set, config-test, config-write, list-commands, shutdown, status-get, version-get.
Commands supported by kea-dhcp-ddns daemon: build-report, config-get, config-hash-get, config-reload, config-set, config-test, config-write, gss-tsig-get, gss-tsig-get-all, gss-tsig-key-del, gss-tsig-key-expire, gss-tsig-key-get, gss-tsig-list, gss-tsig-purge, gss-tsig-purge-all, gss-tsig-rekey, gss-tsig-rekey-all, list-commands, shutdown, statistic-get, statistic-get-all, statistic-reset, statistic-reset-all, status-get, version-get.
Commands supported by kea-dhcp4 daemon: build-report, cache-clear, cache-flush, cache-get, cache-get-by-id, cache-insert, cache-load, cache-remove, cache-size, cache-write, class-add, class-del, class-get, class-list, class-update, config-backend-pull, config-get, config-hash-get, config-reload, config-set, config-test, config-write, dhcp-disable, dhcp-enable, extended-info4-upgrade, ha-continue, ha-heartbeat, ha-maintenance-cancel, ha-maintenance-notify, ha-maintenance-start, ha-reset, ha-scopes, ha-sync, ha-sync-complete-notify, lease4-add, lease4-del, lease4-get, lease4-get-all, lease4-get-by-client-id, lease4-get-by-hostname, lease4-get-by-hw-address, lease4-get-page, lease4-resend-ddns, lease4-update, lease4-wipe, lease4-write, leases-reclaim, list-commands, network4-add, network4-del, network4-get, network4-list, network4-subnet-add, network4-subnet-del, remote-class4-del, remote-class4-get, remote-class4-get-all, remote-class4-set, remote-global-parameter4-del, remote-global-parameter4-get, remote-global-parameter4-get-all, remote-global-parameter4-set, remote-network4-del, remote-network4-get, remote-network4-list, remote-network4-set, remote-option-def4-del, remote-option-def4-get, remote-option-def4-get-all, remote-option-def4-set, remote-option4-global-del, remote-option4-global-get, remote-option4-global-get-all, remote-option4-global-set, remote-option4-network-del, remote-option4-network-set, remote-option4-pool-del, remote-option4-pool-set, remote-option4-subnet-del, remote-option4-subnet-set, remote-server4-del, remote-server4-get, remote-server4-get-all, remote-server4-set, remote-subnet4-del-by-id, remote-subnet4-del-by-prefix, remote-subnet4-get-by-id, remote-subnet4-get-by-prefix, remote-subnet4-list, remote-subnet4-set, reservation-add, reservation-del, reservation-get, reservation-get-all, reservation-get-by-address, reservation-get-by-hostname, reservation-get-by-id, reservation-get-page, reservation-update, server-tag-get, shutdown, stat-lease4-get, statistic-get, statistic-get-all, statistic-remove, statistic-remove-all, statistic-reset, statistic-reset-all, statistic-sample-age-set, statistic-sample-age-set-all, statistic-sample-count-set, statistic-sample-count-set-all, status-get, subnet4-add, subnet4-del, subnet4-delta-add, subnet4-delta-del, subnet4-get, subnet4-list, subnet4-update, version-get.
Commands supported by kea-dhcp6 daemon: build-report, cache-clear, cache-flush, cache-get, cache-get-by-id, cache-insert, cache-load, cache-remove, cache-size, cache-write, class-add, class-del, class-get, class-list, class-update, config-backend-pull, config-get, config-hash-get, config-reload, config-set, config-test, config-write, dhcp-disable, dhcp-enable, extended-info6-upgrade, ha-continue, ha-heartbeat, ha-maintenance-cancel, ha-maintenance-notify, ha-maintenance-start, ha-reset, ha-scopes, ha-sync, ha-sync-complete-notify, lease6-add, lease6-bulk-apply, lease6-del, lease6-get, lease6-get-all, lease6-get-by-duid, lease6-get-by-hostname, lease6-get-page, lease6-resend-ddns, lease6-update, lease6-wipe, lease6-write, leases-reclaim, list-commands, network6-add, network6-del, network6-get, network6-list, network6-subnet-add, network6-subnet-del, remote-class6-del, remote-class6-get, remote-class6-get-all, remote-class6-set, remote-global-parameter6-del, remote-global-parameter6-get, remote-global-parameter6-get-all, remote-global-parameter6-set, remote-network6-del, remote-network6-get, remote-network6-list, remote-network6-set, remote-option-def6-del, remote-option-def6-get, remote-option-def6-get-all, remote-option-def6-set, remote-option6-global-del, remote-option6-global-get, remote-option6-global-get-all, remote-option6-global-set, remote-option6-network-del, remote-option6-network-set, remote-option6-pd-pool-del, remote-option6-pd-pool-set, remote-option6-pool-del, remote-option6-pool-set, remote-option6-subnet-del, remote-option6-subnet-set, remote-server6-del, remote-server6-get, remote-server6-get-all, remote-server6-set, remote-subnet6-del-by-id, remote-subnet6-del-by-prefix, remote-subnet6-get-by-id, remote-subnet6-get-by-prefix, remote-subnet6-list, remote-subnet6-set, reservation-add, reservation-del, reservation-get, reservation-get-all, reservation-get-by-address, reservation-get-by-hostname, reservation-get-by-id, reservation-get-page, reservation-update, server-tag-get, shutdown, stat-lease6-get, statistic-get, statistic-get-all, statistic-remove, statistic-remove-all, statistic-reset, statistic-reset-all, statistic-sample-age-set, statistic-sample-age-set-all, statistic-sample-count-set, statistic-sample-count-set-all, status-get, subnet6-add, subnet6-del, subnet6-delta-add, subnet6-delta-del, subnet6-get, subnet6-list, subnet6-update, version-get.
Commands supported by cb_cmds hook library: remote-class4-del, remote-class4-get, remote-class4-get-all, remote-class4-set, remote-class6-del, remote-class6-get, remote-class6-get-all, remote-class6-set, remote-global-parameter4-del, remote-global-parameter4-get, remote-global-parameter4-get-all, remote-global-parameter4-set, remote-global-parameter6-del, remote-global-parameter6-get, remote-global-parameter6-get-all, remote-global-parameter6-set, remote-network4-del, remote-network4-get, remote-network4-list, remote-network4-set, remote-network6-del, remote-network6-get, remote-network6-list, remote-network6-set, remote-option-def4-del, remote-option-def4-get, remote-option-def4-get-all, remote-option-def4-set, remote-option-def6-del, remote-option-def6-get, remote-option-def6-get-all, remote-option-def6-set, remote-option4-global-del, remote-option4-global-get, remote-option4-global-get-all, remote-option4-global-set, remote-option4-network-del, remote-option4-network-set, remote-option4-pool-del, remote-option4-pool-set, remote-option4-subnet-del, remote-option4-subnet-set, remote-option6-global-del, remote-option6-global-get, remote-option6-global-get-all, remote-option6-global-set, remote-option6-network-del, remote-option6-network-set, remote-option6-pd-pool-del, remote-option6-pd-pool-set, remote-option6-pool-del, remote-option6-pool-set, remote-option6-subnet-del, remote-option6-subnet-set, remote-server4-del, remote-server4-get, remote-server4-get-all, remote-server4-set, remote-server6-del, remote-server6-get, remote-server6-get-all, remote-server6-set, remote-subnet4-del-by-id, remote-subnet4-del-by-prefix, remote-subnet4-get-by-id, remote-subnet4-get-by-prefix, remote-subnet4-list, remote-subnet4-set, remote-subnet6-del-by-id, remote-subnet6-del-by-prefix, remote-subnet6-get-by-id, remote-subnet6-get-by-prefix, remote-subnet6-list, remote-subnet6-set.
Commands supported by class_cmds hook library: class-add, class-del, class-get, class-list, class-update.
Commands supported by gss_tsig hook library: gss-tsig-get, gss-tsig-get-all, gss-tsig-key-del, gss-tsig-key-expire, gss-tsig-key-get, gss-tsig-list, gss-tsig-purge, gss-tsig-purge-all, gss-tsig-rekey, gss-tsig-rekey-all.
Commands supported by high_availability hook library: ha-continue, ha-heartbeat, ha-maintenance-cancel, ha-maintenance-notify, ha-maintenance-start, ha-reset, ha-scopes, ha-sync, ha-sync-complete-notify.
Commands supported by host_cache hook library: cache-clear, cache-flush, cache-get, cache-get-by-id, cache-insert, cache-load, cache-remove, cache-size, cache-write.
Commands supported by host_cmds hook library: reservation-add, reservation-del, reservation-get, reservation-get-all, reservation-get-by-address, reservation-get-by-hostname, reservation-get-by-id, reservation-get-page, reservation-update.
Commands supported by lease_cmds hook library: lease4-add, lease4-del, lease4-get, lease4-get-all, lease4-get-by-client-id, lease4-get-by-hostname, lease4-get-by-hw-address, lease4-get-page, lease4-resend-ddns, lease4-update, lease4-wipe, lease4-write, lease6-add, lease6-bulk-apply, lease6-del, lease6-get, lease6-get-all, lease6-get-by-duid, lease6-get-by-hostname, lease6-get-page, lease6-resend-ddns, lease6-update, lease6-wipe, lease6-write.
Commands supported by lease_query hook library: extended-info4-upgrade, extended-info6-upgrade.
Commands supported by stat_cmds hook library: stat-lease4-get, stat-lease6-get.
Commands supported by subnet_cmds hook library: network4-add, network4-del, network4-get, network4-list, network4-subnet-add, network4-subnet-del, network6-add, network6-del, network6-get, network6-list, network6-subnet-add, network6-subnet-del, subnet4-add, subnet4-del, subnet4-delta-add, subnet4-delta-del, subnet4-get, subnet4-list, subnet4-update, subnet6-add, subnet6-del, subnet6-delta-add, subnet6-delta-del, subnet6-get, subnet6-list, subnet6-update.
build-report
This command returns the list of compilation options that this particular binary was built with.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see build-report command
Command syntax:
{
"command": "build-report"
}
Response syntax:
{
"result": 0,
"text": <string with build details>
}
cache-clear
This command removes all cached host reservations.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (host_cache hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see cache-clear command
Command syntax:
{
"command": "cache-clear"
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
cache-flush
This command removes up to the given number or all cached host reservations.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (host_cache hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see cache-flush command
Command syntax:
{
"command": "cache-flush",
"arguments": 5
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
cache-get
This command returns the full content of the host cache.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (host_cache hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see cache-get command
Command syntax:
{
"command": "cache-get"
}
Response syntax:
{
"result": 0,
"text": "123 entries returned.",
"arguments": <list of host reservations>
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
cache-get-by-id
This command returns entries matching the given identifier from the host cache.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (host_cache hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see cache-get-by-id command
Command syntax:
{
"command": "cache-get-by-id",
"arguments": {
"hw-address": "01:02:03:04:05:06"
}
}
Response syntax:
{
"result": 0,
"text": "2 entries returned.",
"arguments": <list of host reservations>
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
cache-insert
This command inserts a host into the cache.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (host_cache hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see cache-insert command
Command syntax:
{
"command": "cache-insert",
"arguments": {
"hw-address": "01:02:03:04:05:06",
"subnet-id4": 4,
"subnet-id6": 0,
"ip-address": "192.0.2.100",
"hostname": "somehost.example.org",
"client-classes4": [ ],
"client-classes6": [ ],
"option-data4": [ ],
"option-data6": [ ],
"next-server": "192.0.0.2",
"server-hostname": "server-hostname.example.org",
"boot-file-name": "bootfile.efi",
"host-id": 0
}
}
Another example that adds IPv6 host reservation to cache is:
{
"command": "cache-insert",
"arguments": {
"hw-address": "01:02:03:04:05:06",
"subnet-id4": 0,
"subnet-id6": 6,
"ip-addresses": [ "2001:db8::cafe:babe" ],
"prefixes": [ "2001:db8:dead:beef::/64" ],
"hostname": "",
"client-classes4": [ ],
"client-classes6": [ ],
"option-data4": [ ],
"option-data6": [ ],
"next-server": "0.0.0.0",
"server-hostname": "",
"boot-file-name": "",
"host-id": 0
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
cache-load
This command allows the contents of a file on disk to be loaded into an in-memory cache.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (host_cache hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see cache-load command
Command syntax:
{
"command": "cache-load",
"arguments": "/tmp/kea-host-cache.json"
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
cache-remove
This command removes entries from the host cache. It takes parameters similar to the reservation-get
command.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (host_cache hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see cache-remove command
Command syntax:
{
"command": "cache-remove",
"arguments": {
"ip-address": "192.0.2.1",
"subnet-id": 123
}
}
Another example that removes the IPv6 host identifier by DUID and specific subnet-id is:
{
"command": "cache-remove",
"arguments": {
"duid": "00:01:ab:cd:f0:a1:c2:d3:e4",
"subnet-id": 123
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
cache-size
This command returns the number of entries in the host cache.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (host_cache hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see cache-size command
Command syntax:
{
"command": "cache-size"
}
Response syntax:
{
"result": 0,
"text": "123 entries.",
"arguments": { "size": 123 }
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
cache-write
This command instructs Kea to write its host cache content to disk.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (host_cache hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see cache-write command
Command syntax:
{
"command": "cache-write",
"arguments": "/path/to/the/file.json"
}
The command takes one mandatory argument that specifies the filename path of a file to be written.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
class-add
This command adds a new class to the existing server configuration.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.5.0 (class_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see class-add command
Command syntax:
{
"command": "class-add",
"arguments": {
"client-classes": [ {
"name": <name of the class>,
"test": <test expression to be evaluated on incoming packets>,
"option-data": [ <option values here> ],
"option-def": [ <option definitions here> ],
"next-server": <ipv4 address>,
"server-hostname": <string>,
"boot-file-name": <name of the boot file>
} ]
}
}
The next-server
, server-hostname
, and boot-file-name
are DHCPv4-specific. Only one client class can be added with a single command.
Response syntax:
{
"result": 0,
"text": "Class '<class-name>' added."
}
The command is successful (result 0), unless the class name is a duplicate or another error occurs (result 1).
class-del
This command removes a client class from the server configuration.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.5.0 (class_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see class-del command
Command syntax:
{
"command": "class-del",
"arguments": {
"name": <name of the class>
}
}
Response syntax:
{
"result": 0,
"text": "Class '<class-name>' deleted."
}
The command returns a result of 3 (empty) if the client class does not exist. If the client class exists, the returned result is 0 if the deletion was successful; the result is 1 if the deletion is unsuccessful.
class-get
This command returns detailed information about an existing client class.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.5.0 (class_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see class-get command
Command syntax:
{
"command": "class-get",
"arguments": {
"name": <name of the class>
}
}
Response syntax:
{
"result": 0,
"text": "Class '<class-name>' definition returned",
"arguments": {
"client-classes": [
{
"name": <name of the class>,
"only-if-required": <only if required boolean value>,
"test": <test expression to be evaluated on incoming packets>,
"option-data": [ <option values here> ],
"option-def": [ <option definitions here> ],
"next-server": <ipv4 address>,
"server-hostname": <string>,
"boot-file-name": <name of the boot file>
}
]
}
}
The returned information depends on the DHCP server type, i.e. some parameters are specific to the DHCPv4 server. Also, some parameters may not be returned if they are not set for the client class. If a class with the specified name does not exist, a result of 3 (empty) is returned. If the client class is found, the result of 0 is returned. If there is an error while processing the command, the result of 1 is returned.
class-list
This command retrieves a list of all client classes from the server configuration.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.5.0 (class_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see class-list command
Command syntax:
{
"command": "class-list"
}
This command includes no arguments.
Response syntax:
{
"result": 0,
"text": "'<number of>' classes found",
"arguments": {
"client-classes": [
{
"name": <first class name>
},
{
"name": <second class name>
}
]
}
}
The returned list of classes merely contains their names. In order to retrieve full information about one of these classes, use The class-get Command. The returned result is 3 (empty) if no classes are found. If the command is processed successfully and the list of client classes is not empty, the result of 0 is returned. If there is an error while processing the command, the result of 1 is returned.
class-update
This command updates an existing client class in the server configuration.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.5.0 (class_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see class-update command
Command syntax:
{
"command": "class-update",
"arguments": {
"client-classes": [ {
"name": <name of the class>,
"test": <test expression to be evaluated on incoming packets>,
"option-data": [ <option values here> ],
"option-def": [ <option definitions here> ],
"next-server": <ipv4 address>,
"server-hostname": <string>,
"boot-file-name": <name of the boot file>
} ]
}
}
The next-server
, server-hostname
, and boot-file-name
are DHCPv4-specific. Only one client class can be updated with a single command.
Response syntax:
{
"result": 0,
"text": "Class '<class-name>' updated."
}
The command returns the result of 3 (empty) if the client class does not exist. If the client class exists, the returned result is 0 if the update was successful, or 1 if the update is unsuccessful.
config-backend-pull
This command forces an immediate update of the server using Config Backends. This command does not take any parameters.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.7.1 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see config-backend-pull command
Command syntax:
{
"command": "config-backend-pull"
}
Response syntax:
{
"result": 0,
"text": "On demand configuration update successful."
}
When no Config Backends are configured this command returns empty (3); If an error occurs error (1) is returned with the error details; otherwise success (0) is returned.
config-get
This command retrieves the current configuration used by the server. The configuration is essentially the same as the contents of the configuration file, but includes additional changes made by other commands and due to parameters' inheritance.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see config-get command
Command syntax:
{
"command": "config-get"
}
This command takes no parameters.
Response syntax:
{
"result": <integer>,
"arguments": {
<Dhcp4, Dhcp6, or Control-agent object>: <JSON configuration here>
}
}
Starting with Kea 2.4.0, the successful response contains an SHA256 digest of the configuration that was just retrieved. It might be used to determine if a configuration has been modified or not, possibly with the use of config-hash-get.
config-hash-get
This command retrieves the hash of the current configuration used by the server. The configuration is essentially the same as the contents of the configuration file, but includes additional changes made by other commands and due to parameters' inheritance. Currently it is SHA256, but the algorithm may change in the future.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 2.4.0 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see config-hash-get command
Command syntax:
{
"command": "config-hash-get"
}
This command takes no parameters.
Response syntax:
{
"result": <integer>,
"arguments": {
"hash": <SHA256 hash of the config in hexa>
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
config-reload
This command instructs Kea to reload the configuration file that was used previously.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see config-reload command
Command syntax:
{
"command": "config-reload"
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
config-set
This command instructs the server to replace its current configuration with the new configuration supplied in the command's arguments.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see config-set command
Command syntax:
{
"command": "config-set",
"arguments": {
"'<server>'": {
}
}
}
In the example below, '<server>' is the configuration element name for a given server such as "Dhcp4" or "Dhcp6".
Response syntax:
{
"arguments": {
"hash": "8B5F5822E93178B65CE658304C37EA511BDE7D29F792AA5E88012FC741F2BE32"
},
"result": 0,
"text": "Configuration successful."
}
or
{ "result": 1, "text": "unsupported parameter: BOGUS (<string>:16:26)" }
Starting with Kea 2.4.0, the successful response from a DHCPv4, DHCPv6, or DHCP-DDNS daemons also contain a SHA-256 digest of the newly set configuration. The digest can be used to easily determine if a configuration has been modified or not, possibly with the use of config-hash-get.
config-test
This command instructs the server to check whether the new configuration supplied in the command's arguments can be loaded.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see config-test command
Command syntax:
{
"command": "config-test",
"arguments": {
"'<server>'": {
}
}
}
In the example below, '<server>' is the configuration element name for a given server such as "Dhcp4" or "Dhcp6".
Response syntax:
{ "result": 0, "text": "Configuration seems sane." }
or
{ "result": 1, "text": "unsupported parameter: BOGUS (<string>:16:26)" }
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
config-write
This command instructs the Kea server to write its current configuration to a file on disk.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see config-write command
Command syntax:
{
"command": "config-write",
"arguments": {
"filename": "config-modified-2017-03-15.json"
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
dhcp-disable
This command disables the DHCP service.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see dhcp-disable command
Command syntax:
{
"command": "dhcp-disable",
"arguments": {
"max-period": 20,
"origin": "ha-partner",
"origin-id": 2002
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
dhcp-enable
This command enables the DHCP service.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see dhcp-enable command
Command syntax:
{
"command": "dhcp-enable",
"arguments": {
"origin": "ha-partner",
"origin-id": 2002
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
extended-info4-upgrade
This command sanitizes extended info of all IPv4 leases and fills relay and remote ID columns in the SQL lease database.
Supported by: kea-dhcp4
Availability: 2.3.8 (lease_query hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see extended-info4-upgrade command
Command syntax:
{
"command": "extended-info4-upgrade"
}
Response syntax:
{
"arguments": {
},
"result": 0,
"text": "Upgraded 1000 leases"
}
This command should be used when some old IPv4 leases are present in the lease database using a SQL backend.
extended-info6-upgrade
This command sanitizes extended info of all IPv6 leases and rebuilds when they are enabled relay and remote ID tables in the SQL lease database.
Supported by: kea-dhcp6
Availability: 2.5.0 (lease_query hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see extended-info6-upgrade command
Command syntax:
{
"command": "extended-info6-upgrade"
}
Response syntax:
{
"arguments": {
},
"result": 0,
"text": "Upgraded 1000 leases"
}
This command should be used when some old IPv6 leases are present in the lease database using a SQL backend to make them visible to the .
gss-tsig-get
This command retrieves information about the specified GSS-TSIG server.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see gss-tsig-get command
Command syntax:
{
"command": "gss-tsig-get",
"arguments": {
"server-id": "foo"
}
}
Response syntax:
{
"result": 0,
"text": "GSS-TSIG server[foo] found",
"arguments": {
"id": "foo",
"ip-address": "192.1.2.3",
"port": 53,
"server-principal": "DNS/foo.com@FOO.COM",
"key-name-suffix": "foo.com.",
"tkey-lifetime": 3600,
"tkey-protocol": "TCP",
"keys": [
{
"name": "1234.sig-foo.com.",
"server-id": "foo",
"inception-date": "2021-09-05 12:23:36.281176",
"expire-date": "2021-09-05 13:23:36.281176",
"status": "not yet ready",
"tkey-exchange": true
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-get-all
This command lists GSS-TSIG servers and keys.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see gss-tsig-get-all command
Command syntax:
{
"command": "gss-tsig-get-all"
}
Response syntax:
{
"result": 0,
"text": "1 GSS-TSIG servers and 1 keys",
"arguments": {
"gss-tsig-servers": [
{
"id": "foo",
"ip-address": "192.1.2.3",
"port": 53,
"server-principal": "DNS/foo.com@FOO.COM",
"key-name-suffix": "foo.com.",
"tkey-lifetime": 3600,
"tkey-protocol": "TCP",
"keys": [
{
"name": "1234.sig-foo.com.",
"inception-date": "2021-09-05 12:23:36.281176",
"server-id": "foo",
"expire-date": "2021-09-05 13:23:36.281176",
"status": "not yet ready",
"tkey-exchange": true
}
]
},
{
"id": "bar",
"ip-address": "192.1.2.4",
"port": 53,
"server-principal": "DNS/bar.com@FOO.COM",
"key-name-suffix": "bar.com.",
"tkey-lifetime": 7200,
"tkey-protocol": "UDP",
"keys": [ ]
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-key-del
This command deletes the specified GSS-TSIG key.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see gss-tsig-key-del command
Command syntax:
{
"command": "gss-tsig-key-del",
"arguments": {
"key-name": "1234.sig-foo.com."
}
}
Response syntax:
{
"result": 0,
"text": "GSS-TSIG key '1234.sig-foo.com.' deleted"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-key-expire
This command expires the specified GSS-TSIG key.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see gss-tsig-key-expire command
Command syntax:
{
"command": "gss-tsig-key-expire",
"arguments": {
"key-name": "1234.sig-foo.com."
}
}
Response syntax:
{
"result": 0,
"text": "GSS-TSIG key '1234.sig-foo.com.' expired"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-key-get
This command retrieves information about the specified GSS-TSIG key.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see gss-tsig-key-get command
Command syntax:
{
"command": "gss-tsig-key-get",
"arguments": {
"key-name": "1234.sig-foo.com."
}
}
Response syntax:
{
"result": 0,
"text": "GSS-TSIG key '1234.sig-foo.com.' found",
"arguments": {
"name": "1234.sig-foo.com.",
"server-id": "foo",
"inception-date": "2021-09-05 12:23:36.281176",
"expire-date": "2021-09-05 13:23:36.281176",
"status": "not yet ready",
"tkey-exchange": true
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-list
This command lists GSS-TSIG server IDs and key names.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see gss-tsig-list command
Command syntax:
{
"command": "gss-tsig-list"
}
Response syntax:
{
"result": 0,
"text": "2 GSS-TSIG servers and 3 keys",
"arguments": {
"gss-tsig-servers": [
"foo",
"bar"
],
"gss-tsig-keys": [
"1234.example.com.",
"5678.example.com.",
"43888.example.org."
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-purge
This command removes not usable GSS-TSIG keys for the specified server.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see gss-tsig-purge command
Command syntax:
{
"command": "gss-tsig-purge",
"arguments": {
"server-id": "foo"
}
}
Response syntax:
{
"result": 0,
"text": "2 purged keys for GSS-TSIG server[foo]"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-purge-all
This command removes not usable GSS-TSIG keys.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see gss-tsig-purge-all command
Command syntax:
{
"command": "gss-tsig-purge-all"
}
Response syntax:
{
"result": 0,
"text": "2 purged GSS-TSIG keys"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-rekey
The command unconditionally creates new GSS-TSIG keys for (rekeys) a specified DNS server.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see gss-tsig-rekey command
Command syntax:
{
"command": "gss-tsig-rekey",
"arguments": {
"server-id": "foo"
}
}
Response syntax:
{
"result": 0,
"text": "GSS-TSIG server[foo] rekeyed"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
gss-tsig-rekey-all
This command unconditionally creates new GSS-TSIG keys (rekeys) for all DNS servers.
Supported by: kea-dhcp-ddns
Availability: 2.0.0 (gss_tsig hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see gss-tsig-rekey-all command
Command syntax:
{
"command": "gss-tsig-rekey-all"
}
Response syntax:
{
"result": 0,
"text": "rekeyed"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
ha-continue
This command resumes the operation of a paused HA state machine.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-continue command
Command syntax:
{
"command": "ha-continue",
"arguments": {
"server-name": "server1"
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
ha-heartbeat
This command is sent internally by a Kea partner when operating in High Availability (HA) mode or by the system administrator to verify the state of the servers with regards to the High Availability. It retrieves the server's HA state and clock value.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-heartbeat command
Command syntax:
{
"command": "ha-heartbeat",
"arguments": {
"server-name": "server1"
}
}
Response syntax:
{
"result": 0,
"text": "HA peer status returned.",
"arguments": {
"state": <server state>,
"date-time": <server notion of time>,
"scopes": [ <first scope>, <second scope>, ... ],
"unsent-update-count": <total number of lease allocations in partner-down state>
}
}
The response includes a server state (see Server States), current clock value, served scopes and the counter indicating how many leases the server has allocated without sending lease updates to its partner. The partner uses this counter to determine if it should synchronize its lease database.
ha-maintenance-cancel
This command is sent to instruct a server in the partner-in-maintenance state to transition back to the previous state, effectively canceling the maintenance.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.7.4 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-maintenance-cancel command
Command syntax:
{
"command": "ha-maintenance-cancel"
}
This command takes no arguments.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
ha-maintenance-notify
This command is sent by the server receiving the ha-maintenance-start to its partner to cause the partner to transition to the in-maintenance state or to revert it from the in-maintenance state as a result of receiving the ha-maintenance-cancel command.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.7.4 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-maintenance-notify command
Command syntax:
{
"command": "ha-maintenance-notify",
"arguments": {
"cancel": true
}
}
This command includes a boolean argument which, if false, indicates that the server should transition to the in-maintenance state. If the argument is set to true it instructs the server to revert from the in-maintenance state to its previous state. This command is not meant to be used by the administrator. It is merely used for internal communication between the HA partners.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
The response may include a special error code of 1001 to indicate that the partner refused to enter the maintenance state.
ha-maintenance-start
This command is sent to instruct one of the servers to transition to the partner-in-maintenance state in which it will be responding to all DHCP queries. The server receiving this command sends the ha-maintenance-notify to its partner to cause the partner to transition to the in-maintenance state.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.7.4 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-maintenance-start command
Command syntax:
{
"command": "ha-maintenance-start"
}
This command takes no arguments.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
ha-reset
This command resets the HA state machine of the server by transitioning it to the waiting state.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.9.4 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-reset command
Command syntax:
{
"command": "ha-reset",
"arguments": {
"server-name": "server1"
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
ha-scopes
This command modifies the scope that the server is responsible for serving when operating in High Availability (HA) mode.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-scopes command
Command syntax:
{
"command": "ha-scopes",
"arguments": {
"scopes": [ "HA_server1", "HA_server2" ],
"server-name": "server1"
}
}
In the example below, the arguments configure the server to handle traffic from both the HA_server1 and HA_server2 scopes.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
ha-sync
This command instructs the server running in HA mode to synchronize its local lease database with the selected peer.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.4.0 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-sync command
Command syntax:
{
"command": "ha-sync",
"arguments": {
"server-name": "server1",
"max-period": 60
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
ha-sync-complete-notify
A server notifies its partner with this command that it has finished the lease database synchronization. If the partner is in the partner-down state it temporarily stops allocating new leases until it transitions to a normal operation state (e.g. load-balancing). If the partner observes a failing heartbeat it can resume allocating new leases in the partner-down state.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.9.11 (high_availability hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see ha-sync-complete-notify command
Command syntax:
{
"command": "ha-sync-complete-notify",
"arguments": {
"server-name": "server1",
"origin": 2001,
"max-period": 60
}
}
This command takes no arguments.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
lease4-add
This command administratively adds a new IPv4 lease.
Supported by: kea-dhcp4
Availability: 1.3.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease4-add command
Command syntax:
{
"command": "lease4-add",
"arguments": {
"ip-address": "192.0.2.202",
"hw-address": "1a:1b:1c:1d:1e:1f"
}
}
Note that Kea 1.4 requires an additional argument, subnet-ID, which is optional as of Kea 1.5. A number of other, more-detailed, optional arguments are also supported.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
If the returned result is equal to 4, it indicates that the lease could not be created because it was in conflict with the server's state or its notion of the configuration. The High Availability hook library can handle such a result differently than a general error. A general error of 1 can indicate issues with processing the command, database availability etc.
lease4-del
This command deletes a lease from the lease database.
Supported by: kea-dhcp4
Availability: 1.3.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease4-del command
Command syntax:
{
"command": "lease4-del",
"arguments": {
"ip-address": "192.0.2.202"
}
}
The lease to be deleted can be specified either by IP address or by identifier-type and identifier value. The currently supported identifiers are "hw-address" and "client-id".
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
lease4-get
This command queries the lease database and retrieves existing leases.
Supported by: kea-dhcp4
Availability: 1.3.0 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease4-get command
Command syntax:
{
"command": "lease4-get",
"arguments": {
"ip-address": "192.0.2.1"
}
}
Response syntax:
{
"arguments": {
"client-id": "42:42:42:42:42:42:42:42",
"cltt": 12345678,
"fqdn-fwd": false,
"fqdn-rev": true,
"hostname": "myhost.example.com.",
"hw-address": "08:08:08:08:08:08",
"ip-address": "192.0.2.1",
"state": 0,
"subnet-id": 44,
"valid-lft": 3600
},
"result": 0,
"text": "IPv4 lease found."
}
lease4-get returns a result that indicates the outcome of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error), or 3 (empty). Result 3 is returned if no leases are found with specified IP address.
lease4-get-all
This command retrieves all IPv4 leases or all leases for the specified set of subnets.
Supported by: kea-dhcp4
Availability: 1.4.0 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease4-get-all command
Command syntax:
{
"command": "lease4-get-all",
"arguments": {
"subnets": [ 1, 2, 3, ... ]
}
}
The lease4-get-all
command may result in very large responses. Please consider using
lease4-get-page
to get them in chunks. The subnets
parameter is optional. If not
specified, leases from all subnets are returned.
Response syntax:
{
"arguments": {
"leases": [
{
"client-id": "01:00:0c:01:02:03:04",
"cltt": 1600432232,
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "",
"hw-address": "00:0c:01:02:03:04",
"ip-address": "192.168.1.150",
"state": 0,
"subnet-id": 1,
"valid-lft": 4000
},
{
"client-id": "01:00:0c:01:02:03:05",
"cltt": 1600432234,
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "",
"hw-address": "00:0c:01:02:03:05",
"ip-address": "192.168.1.151",
"state": 0,
"subnet-id": 1,
"valid-lft": 4000
}
]
},
"result": 0,
"text": "2 IPv4 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found with specified parameter.
lease4-get-by-client-id
This command retrieves all IPv4 leases with the specified client id.
Supported by: kea-dhcp4
Availability: 1.7.1 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease4-get-by-client-id command
Command syntax:
{
"command": "lease4-get-by-client-id",
"arguments": {
"client-id": "01:00:0c:01:02:03:04"
}
}
Response syntax:
{
"arguments": {
"leases": [
{
"client-id": "01:00:0c:01:02:03:04",
"cltt": 1600432232,
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "",
"hw-address": "00:0c:01:02:03:04",
"ip-address": "192.168.1.150",
"state": 0,
"subnet-id": 1,
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv4 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found.
lease4-get-by-hostname
This command retrieves all IPv4 leases with the specified hostname.
Supported by: kea-dhcp4
Availability: 1.7.1 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease4-get-by-hostname command
Command syntax:
{
"command": "lease4-get-by-hostname",
"arguments": {
"hostname": "myhost.example.com."
}
}
Response syntax:
{
"arguments": {
"leases": [
{
"client-id": "01:00:0c:01:02:03:04",
"cltt": 1600432232,
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "myhost.example.com.",
"hw-address": "00:0c:01:02:03:04",
"ip-address": "192.168.1.150",
"state": 0,
"subnet-id": 1,
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv4 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found.
lease4-get-by-hw-address
This command retrieves all IPv4 leases with the specified hardware address.
Supported by: kea-dhcp4
Availability: 1.7.1 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease4-get-by-hw-address command
Command syntax:
{
"command": "lease4-get-by-hw-address",
"arguments": {
"hw-address": "00:0c:01:02:03:04"
}
}
Response syntax:
{
"arguments": {
"leases": [
{
"client-id": "01:00:0c:01:02:03:04",
"cltt": 1600432232,
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "myhost.example.com.",
"hw-address": "00:0c:01:02:03:04",
"ip-address": "192.168.1.150",
"state": 0,
"subnet-id": 1,
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv4 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found.
lease4-get-page
This command retrieves all IPv4 leases by page.
Supported by: kea-dhcp4
Availability: 1.5.0 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease4-get-page command
Command syntax:
{
"command": "lease4-get-page",
"arguments": {
"limit": <integer>,
"from": <IPv4 address or 'start'>
}
}
The from address and the page size limit are mandatory.
Response syntax:
{
"arguments": {
"leases": [
{
"client-id": "01:00:0c:01:02:03:04",
"cltt": 1600432232,
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "",
"hw-address": "00:0c:01:02:03:04",
"ip-address": "192.168.1.150",
"state": 0,
"subnet-id": 1,
"valid-lft": 4000
},
{
"client-id": "01:00:0c:01:02:03:05",
"cltt": 1600432234,
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "",
"hw-address": "00:0c:01:02:03:05",
"ip-address": "192.168.1.151",
"state": 0,
"subnet-id": 1,
"valid-lft": 4000
}
]
},
"result": 0,
"text": "2 IPv4 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found with specified parameters.
lease4-resend-ddns
This command resends a request to kea-dhcp-ddns to update DNS for an existing lease.
Supported by: kea-dhcp4
Availability: 1.7.6 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease4-resend-ddns command
Command syntax:
{
"command": "lease4-resend-ddns",
"arguments": {
"ip-address": "192.0.2.1"
}
}
Response syntax:
{
"arguments": {
},
"result": 0,
"text": "NCR generated for: 192.0.2.1, hostname: example.com."
}
lease4-resend-ddns returns a result that indicates the outcome of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error), or 3 (empty).
lease4-update
This command updates existing leases.
Supported by: kea-dhcp4
Availability: 1.3.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease4-update command
Command syntax:
{
"command": "lease4-update",
"arguments": {
"ip-address": "192.0.2.1",
"hostname": "newhostname.example.org",
"hw-address": "1a:1b:1c:1d:1e:1f",
"subnet-id": 44,
"force-create": true
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
If the returned result is equal to 4, it indicates that the lease could not be updated because it was in conflict with the server's state or its notion of the configuration. The High Availability hook library can handle such a result differently than a general error. A general error of 1 can indicate issues with processing the command, database availability etc.
lease4-wipe
This command removes all leases associated with a given subnet. This command is deprecated and it will be removed in the future.
Supported by: kea-dhcp4
Availability: 1.3.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease4-wipe command
Command syntax:
{
"command": "lease4-wipe",
"arguments": {
"subnet-id": 44
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
lease4-write
This command writes the IPv4 memfile lease database into a CSV file.
Supported by: kea-dhcp4
Availability: 2.3.1 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease4-write command
Command syntax:
{
"command": "lease4-write",
"arguments": {
"filename": "a_file.csv"
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
lease6-add
This command administratively creates a new lease.
Supported by: kea-dhcp6
Availability: 1.3.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease6-add command
Command syntax:
{
"command": "lease6-add",
"arguments": {
"subnet-id": 66,
"ip-address": "2001:db8::3",
"duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24",
"iaid": 1234
}
}
lease6-add can be also used to add leases for IPv6 prefixes.
Response syntax:
{ "result": 0, "text": "Lease added." }
or
{ "result": 1, "text": "missing parameter 'ip-address' (<string>:3:19)" }
If the returned result is equal to 4, it indicates that the lease could not be created because it was in conflict with the server's state or its notion of the configuration. The High Availability hook library can handle such a result differently than a general error. A general error of 1 can indicate issues with processing the command, database availability etc.
lease6-bulk-apply
This command creates, updates, or deletes multiple IPv6 leases in a single transaction. It communicates lease changes between HA peers, but may be used in all cases where it is desirable to apply multiple lease updates in a single transaction.
Supported by: kea-dhcp6
Availability: 1.6.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease6-bulk-apply command
Command syntax:
{
"command": "lease6-bulk-apply",
"arguments": {
"deleted-leases": [
{
"ip-address": "2001:db8:abcd::",
"type": "IA_PD",
...
},
{
"ip-address": "2001:db8:abcd::234",
"type": "IA_NA",
...
}
],
"leases": [
{
"subnet-id": 66,
"ip-address": "2001:db8:cafe::",
"type": "IA_PD",
...
},
{
"subnet-id": 66,
"ip-address": "2001:db8:abcd::333",
"type": "IA_NA",
...
}
]
}
}
If any of the leases is malformed, all changes are rolled back. If the leases are well-formed but the operation fails for one or more leases, these leases are listed in the response; however, the changes are preserved for all leases for which the operation was successful. The "deleted-leases" and "leases" are optional parameters, but one of them must be specified.
Response syntax:
{
"result": 0,
"text": "IPv6 leases bulk apply completed.",
"arguments": {
"failed-deleted-leases": [
{
"ip-address": "2001:db8:abcd::",
"type": "IA_PD",
"result": <control result>,
"error-message": <error message>
}
],
"failed-leases": [
{
"ip-address": "2001:db8:cafe::",
"type": "IA_PD",
"result": <control result>,
"error-message": <error message>
}
]
}
}
The "failed-deleted-leases" holds the list of leases which failed to delete; this includes leases which were not found in the database. The "failed-leases" includes the list of leases which failed to create or update. For each lease for which there was an error during processing, insertion into the database, etc., the result is set to 1. If an error occurs due to a conflict between the lease and the server's configuration or state, the result of 4 is returned instead of 1. For each lease which was not deleted because the server did not find it in the database, the result of 3 is returned.
lease6-del
This command deletes a lease from the lease database.
Supported by: kea-dhcp6
Availability: 1.3.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease6-del command
Command syntax:
{
"command": "lease6-del",
"arguments": {
"ip-address": "2001:db8::3"
}
}
lease6-del returns a result that indicates the outcome of the operation. It has one of the following values: 0 (success), 1 (error), or 3 (empty).
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
lease6-get
This command queries the lease database and retrieves existing leases.
Supported by: kea-dhcp6
Availability: 1.3.0 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease6-get command
Command syntax:
{
"command": "lease6-get",
"arguments": {
"ip-address": "2001:db8:1234:ab::",
"type": "IA_PD"
}
}
lease6-get returns a result that indicates the outcome of the operation and lease details, if found.
Response syntax:
{
"arguments": {
"leases": [
{
"cltt": 1600439560,
"duid": "00:01:00:01:26:f7:81:88:00:0c:01:02:03:04",
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "foobar.example.org",
"hw-address": "00:0c:01:02:03:04",
"iaid": 1,
"ip-address": "2001:db8:1::",
"preferred-lft": 3000,
"state": 0,
"subnet-id": 1,
"type": "IA_NA",
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv6 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found with specified parameter.
lease6-get-all
This command retrieves all IPv6 leases or all leases for the specified set of subnets.
Supported by: kea-dhcp6
Availability: 1.3.0 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease6-get-all command
Command syntax:
{
"command": "lease6-get-all",
"arguments": {
"subnets": [ 1, 2, 3, 4 ]
}
}
The lease6-get-all
command may result in very large responses. Please consider using
lease6-get-page
to get them in chunks. the subnets
parameter is optional. If not
specified, leases from all subnets are returned.
Response syntax:
{
"arguments": {
"leases": [
{
"cltt": 12345678,
"duid": "42:42:42:42:42:42:42:42",
"fqdn-fwd": false,
"fqdn-rev": true,
"hostname": "myhost.example.com.",
"hw-address": "08:08:08:08:08:08",
"iaid": 1,
"ip-address": "2001:db8:2::1",
"preferred-lft": 500,
"state": 0,
"subnet-id": 44,
"type": "IA_NA",
"valid-lft": 3600
},
{
"cltt": 12345678,
"duid": "21:21:21:21:21:21:21:21",
"fqdn-fwd": false,
"fqdn-rev": true,
"hostname": "",
"iaid": 1,
"ip-address": "2001:db8:0:0:2::",
"preferred-lft": 500,
"prefix-len": 80,
"state": 0,
"subnet-id": 44,
"type": "IA_PD",
"valid-lft": 3600
}
]
},
"result": 0,
"text": "2 IPv6 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found with specified parameter.
lease6-get-by-duid
This command retrieves all IPv6 leases with the specified DUID.
Supported by: kea-dhcp6
Availability: 1.7.1 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease6-get-by-duid command
Command syntax:
{
"command": "lease6-get-by-duid",
"arguments": {
"duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24"
}
}
Response syntax:
{
"arguments": {
"leases": [
{
"cltt": 1600439560,
"duid": "00:01:00:01:26:f7:81:88:00:0c:01:02:03:04",
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "foobar.example.org",
"hw-address": "00:0c:01:02:03:04",
"iaid": 1,
"ip-address": "2001:db8:1::",
"preferred-lft": 3000,
"state": 0,
"subnet-id": 1,
"type": "IA_NA",
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv6 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found with specified parameter.
lease6-get-by-hostname
This command retrieves all IPv6 leases with the specified hostname.
Supported by: kea-dhcp6
Availability: 1.7.1 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease6-get-by-hostname command
Command syntax:
{
"command": "lease6-get-by-hostname",
"arguments": {
"hostname": "myhost.example.com."
}
}
Response syntax:
{
"arguments": {
"leases": [
{
"cltt": 1600439560,
"duid": "00:01:00:01:26:f7:81:88:00:0c:01:02:03:04",
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "foobar.example.org",
"hw-address": "00:0c:01:02:03:04",
"iaid": 1,
"ip-address": "2001:db8:1::",
"preferred-lft": 3000,
"state": 0,
"subnet-id": 1,
"type": "IA_NA",
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv6 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found with specified parameter.
lease6-get-page
This command retrieves all IPv6 leases by page.
Supported by: kea-dhcp6
Availability: 1.5.0 (lease_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see lease6-get-page command
Command syntax:
{
"command": "lease6-get-page",
"arguments": {
"limit": <integer>,
"from": <IPv6 address or 'start'>
}
}
The from address and the page size limit are mandatory.
Response syntax:
{
"arguments": {
"leases": [
{
"cltt": 1600439560,
"duid": "00:01:00:01:26:f7:81:88:00:0c:01:02:03:04",
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "foo.example.org",
"hw-address": "00:0c:01:02:03:04",
"iaid": 1,
"ip-address": "2001:db8:1::1",
"preferred-lft": 3000,
"state": 0,
"subnet-id": 1,
"type": "IA_NA",
"valid-lft": 4000
},
{
"cltt": 1600439570,
"duid": "00:01:00:01:26:f7:81:88:00:0c:01:02:03:05",
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "bar.example.org",
"hw-address": "00:0c:01:02:03:05",
"iaid": 1,
"ip-address": "2001:db8:1::2",
"preferred-lft": 3000,
"state": 0,
"subnet-id": 1,
"type": "IA_NA",
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv6 lease(s) found."
}
Result 0 is returned when at least one lease is found, 1 when parameters are malformed or missing, 3 is returned if no leases are found.
lease6-resend-ddns
This command resends a request to kea-dhcp-ddns to update DNS for an existing lease.
Supported by: kea-dhcp6
Availability: 1.7.6 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease6-resend-ddns command
Command syntax:
{
"command": "lease6-resend-ddns",
"arguments": {
"ip-address": "2001:db8::1"
}
}
Response syntax:
{
"arguments": {
},
"result": 0,
"text": "NCR generated for: 2001:db8::1, hostname: example.com."
}
lease6-resend-ddns returns a result that indicates the outcome of the operation and lease details, if found. It has one of the following values: 0 (success), 1 (error), or 3 (empty).
lease6-update
This command updates existing leases.
Supported by: kea-dhcp6
Availability: 1.3.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease6-update command
Command syntax:
{
"command": "lease6-update",
"arguments": {
"ip-address": "2001:db8::1",
"duid": "88:88:88:88:88:88:88:88",
"iaid": 7654321,
"hostname": "newhostname.example.org",
"subnet-id": 66,
"force-create": false
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
If the returned result is equal to 4, it indicates that the lease could not be updated because it was in conflict with the server's state or its notion of the configuration. The High Availability hook library can handle such a result differently than a general error. A general error of 1 can indicate issues with processing the command, database availability etc.
lease6-wipe
This command removes all leases associated with a given subnet. This command is deprecated and it will be removed in the future.
Supported by: kea-dhcp6
Availability: 1.3.0 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease6-wipe command
Command syntax:
{
"command": "lease6-wipe",
"arguments": {
"subnet-id": 66
}
}
Note: not all backends support this command.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
lease6-write
This command writes the IPv6 memfile lease database into a CSV file.
Supported by: kea-dhcp6
Availability: 2.3.1 (lease_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see lease6-write command
Command syntax:
{
"command": "lease6-write",
"arguments": {
"filename": "a_file.csv"
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
leases-reclaim
This command instructs the server to reclaim all expired leases immediately.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see leases-reclaim command
Command syntax:
{
"command": "leases-reclaim",
"arguments": {
"remove": true
}
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
list-commands
This command retrieves a list of all commands supported by the server.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see list-commands command
Command syntax:
{
"command": "list-commands",
"arguments": { }
}
The server responds with a list of all supported commands.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network4-add
This command adds a new shared network.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see network4-add command
Command syntax:
{
"command": "network4-add",
"arguments": {
"shared-networks": [ {
"name": "floor13",
"subnet4": [
{
"id": 100,
"pools": [ { "pool": "192.0.2.2-192.0.2.99" } ],
"subnet": "192.0.2.0/24",
"option-data": [
{
"name": "routers",
"data": "192.0.2.1"
}
]
},
{
"id": 101,
"pools": [ { "pool": "192.0.3.2-192.0.3.99" } ],
"subnet": "192.0.3.0/24",
"option-data": [
{
"name": "routers",
"data": "192.0.3.1"
}
]
} ]
} ]
}
}
Response syntax:
{
"arguments": {
"shared-networks": [ { "name": "floor13" } ]
},
"result": 0,
"text": "A new IPv4 shared network 'floor13' added"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network4-del
This command deletes existing shared networks.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see network4-del command
Command syntax:
{
"command": "network4-del",
"arguments": {
"name": "floor13"
}
}
Response syntax:
{
"command": "network4-del",
"arguments": {
"shared-networks": [
{
"name": "floor13"
}
]
},
"result": 0,
"text": "IPv4 shared network 'floor13' deleted"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network4-get
This command retrieves detailed information about shared networks, including subnets that are currently part of a given network.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see network4-get command
Command syntax:
{
"command": "network4-get",
"arguments": {
"name": "floor13"
}
}
Response syntax:
{
"result": 0,
"text": "Info about IPv4 shared network 'floor13' returned",
"arguments": {
"shared-networks": [
{
"match-client-id": true,
"name": "floor13",
"option-data": [ ],
"rebind-timer": 90,
"relay": {
"ip-address": "0.0.0.0"
},
"renew-timer": 60,
"subnet4": [
{
"subnet": "192.0.2.0/24",
"id": 5,
<many other subnet specific details here>
},
{
"subnet": "192.0.3.0/31",
"id": 6,
<many other subnet specific details here>
}
],
"valid-lifetime": 120
}
]
}
}
Note that the actual response contains many additional fields that are omitted here for clarity.
network4-list
This command retrieves the full list of currently configured shared networks.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see network4-list command
Command syntax:
{
"command": "network4-list"
}
Response syntax:
{
"arguments": {
"shared-networks": [
{ "name": "floor1" },
{ "name": "office" }
]
},
"result": 0,
"text": "2 IPv4 network(s) found"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network4-subnet-add
This command adds existing subnets to existing shared networks.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see network4-subnet-add command
Command syntax:
{
"command": "network4-subnet-add",
"arguments": {
"name": "floor13",
"id": 5
}
}
Response syntax:
{
"result": 0,
"text": "IPv4 subnet 10.0.0.0/8 (id 5) is now part of shared network 'floor1'"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network4-subnet-del
This command removes a subnet that is part of an existing shared network and demotes it to a plain, stand-alone subnet.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see network4-subnet-del command
Command syntax:
{
"command": "network4-subnet-del",
"arguments": {
"name": "floor13",
"id": 5
}
}
Response syntax:
{
"result": 0,
"text": "IPv4 subnet 10.0.0.0/8 (id 5) is now removed from shared network 'floor13'"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network6-add
This command adds a new shared network.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see network6-add command
Command syntax:
{
"command": "network6-add",
"arguments": {
"shared-networks": [ {
"name": "floor13",
"subnet6": [
{
"id": 100,
"pools": [ { "pool": "2003:db8:1::1-2003:db8:1::ff" } ],
"subnet": "2003:db8:1::/64",
"option-data": [
{
"name": "dns-servers",
"data": "2005:db8:1::1"
}
]
},
{
"id": 101,
"pools": [ { "pool": "2003:db8:2::1-2003:db8:2::ff" } ],
"subnet": "2003:db8:2::/64",
"option-data": [
{
"name": "dns-servers",
"data": "2006:db8:1::1"
}
]
} ]
} ]
}
}
Response syntax:
{
"arguments": {
"shared-networks": [ { "name": "floor13" } ]
},
"result": 0,
"text": "A new IPv6 shared network 'floor13' added"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network6-del
This command deletes existing shared networks.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see network6-del command
Command syntax:
{
"command": "network6-del",
"arguments": {
"name": "floor13"
}
}
Response syntax:
{
"command": "network6-del",
"arguments": {
"shared-networks": [
{
"name": "floor13"
}
]
},
"result": 0,
"text": "IPv6 shared network 'floor13' deleted"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network6-get
This command retrieves detailed information about shared networks, including subnets that are currently part of a given network.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see network6-get command
Command syntax:
{
"command": "network4-get",
"arguments": {
"name": "floor13"
}
}
Response syntax:
{
"result": 0,
"text": "Info about IPv6 shared network 'floor13' returned",
"arguments": {
"shared-networks": [
{
"match-client-id": true,
"name": "floor13",
"option-data": [ ],
"rebind-timer": 90,
"relay": {
"ip-address": "::"
},
"renew-timer": 60,
"subnet6": [
{
"subnet": "2003:db8:1::/64",
"id": 5,
<many other subnet specific details here>
},
{
"subnet": "2003:db8:2::/71",
"id": 6,
<many other subnet specific details here>
}
],
"valid-lifetime": 120
}
]
}
}
Note that the actual response contains many additional fields that are omitted here for clarity.
network6-list
This command retrieves the full list of currently configured shared networks.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see network6-list command
Command syntax:
{
"command": "network6-list"
}
Response syntax:
{
"arguments": {
"shared-networks": [
{ "name": "floor1" },
{ "name": "office" }
]
},
"result": 0,
"text": "2 IPv6 network(s) found"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network6-subnet-add
This command adds existing subnets to existing shared networks.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see network6-subnet-add command
Command syntax:
{
"command": "network6-subnet-add",
"arguments": {
"name": "floor13",
"id": 5
}
}
Response syntax:
{
"result": 0,
"text": "IPv6 subnet 2003:db8::/64 (id 5) is now part of shared network 'floor1'"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
network6-subnet-del
This command removes a subnet that is part of an existing shared network and demotes it to a plain, stand-alone subnet.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see network6-subnet-del command
Command syntax:
{
"command": "network6-subnet-del",
"arguments": {
"name": "floor13",
"id": 5
}
}
Response syntax:
{
"result": 0,
"text": "IPv6 subnet 2003:db8::/64 (id 5) is now removed from shared network 'floor13'"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-class4-del
This command deletes a DHCPv4 client class from the configuration database.
Supported by: kea-dhcp4
Availability: 1.9.10 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-class4-del command
Command syntax:
{
"command": "remote-class4-del",
"arguments": {
"client-classes": [
{
"name": <client class name>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one name of the client class to be deleted. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "1 DHCPv4 client class(es) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-class4-get
This command fetches a selected DHCPv4 client class by name from the specified database.
Supported by: kea-dhcp4
Availability: 1.9.10 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-class4-get command
Command syntax:
{
"command": "remote-class4-get",
"arguments": {
"client-classes": [
{
"name": <client class name>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one name of the client class to be returned. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "DHCPv4 client class found.",
"arguments": {
"client-classes": [
{
"name": <client class name>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
},
<the rest of the client class information>
}
],
"count": 1
}
}
The metadata is included in the returned shared network definition and provides the database-specific information associated with the returned object.
remote-class4-get-all
This command fetches all DHCPv4 client classes for specified servers from the configuration database.
Supported by: kea-dhcp4
Availability: 1.9.10 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-class4-get-all command
Command syntax:
{
"command": "remote-class4-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The server-tags
list is required for this command, and must not be empty.
Response syntax:
{
"result": 0,
"text": "2 DHCPv4 client class(es) found.",
"arguments": {
"client-classes": [
{
<first client class specification>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
},
{
<second client class specification>,
"metadata": {
"server-tags": [ <first server tag>, ... ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains a client class name and the metadata, which provides database-specific information associated with the client class.
remote-class4-set
This command creates or replaces a DHCPv4 client class in the configuration database.
Supported by: kea-dhcp4
Availability: 1.9.10 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-class4-set command
Command syntax:
{
"command": "remote-class4-set",
"arguments": {
"client-class": [
{
<client class specification>,
"follow-class-name": <existing class name>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The provided list must contain exactly one client class specification. It may contain an optional parameter "follow-class-name" which can specify an existing class name to indicate that the class from the command is placed right after this existing class in the hierarchy. This parameter can be omitted or set to "null" to indicate that the new client class should be appended at the end of the hierarchy or an updated class should remain at the current position. The server-tags
list is mandatory and must contain one or more server tags as strings to explicitly associate the client class with one or more user-defined servers. It may include the special server tag "all" to associate the class with all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv4 shared network successfully set.",
"arguments": {
"client-classes": [
{
"name": <set client class name>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-class6-del
This command deletes a DHCPv6 client class from the configuration database.
Supported by: kea-dhcp6
Availability: 1.9.10 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-class6-del command
Command syntax:
{
"command": "remote-class6-del",
"arguments": {
"client-classes": [
{
"name": <client class name>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one name of the client class to be deleted. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "1 DHCPv6 client class(es) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-class6-get
This command fetches a selected DHCPv6 client class by name from the specified database.
Supported by: kea-dhcp6
Availability: 1.9.10 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-class6-get command
Command syntax:
{
"command": "remote-class6-get",
"arguments": {
"client-classes": [
{
"name": <client class name>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one name of the client class to be returned. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "DHCPv6 client class found.",
"arguments": {
"client-classes": [
{
"name": <client class name>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
},
<the rest of the client class information>
}
],
"count": 1
}
}
The metadata is included in the returned shared network definition and provides the database-specific information associated with the returned object.
remote-class6-get-all
This command fetches all DHCPv6 client classes for specified servers from the configuration database.
Supported by: kea-dhcp6
Availability: 1.9.10 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-class6-get-all command
Command syntax:
{
"command": "remote-class6-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The server-tags
list is required for this command, and must not be empty.
Response syntax:
{
"result": 0,
"text": "2 DHCPv6 client class(es) found.",
"arguments": {
"client-classes": [
{
<first client class specification>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
},
{
<second client class specification>,
"metadata": {
"server-tags": [ <first server tag>, ... ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains a client class name and the metadata, which provides database-specific information associated with the client class.
remote-class6-set
This command creates or replaces a DHCPv6 client class in the configuration database.
Supported by: kea-dhcp6
Availability: 1.9.10 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-class6-set command
Command syntax:
{
"command": "remote-class6-set",
"arguments": {
"client-class": [
{
<client class specification>,
"follow-class-name": <existing class name>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The provided list must contain exactly one client class specification. It may contain an optional parameter "follow-class-name" which can specify an existing class name to indicate that the class from the command is placed right after this existing class in the hierarchy. This parameter can be omitted or set to "null" to indicate that the new client class should be appended at the end of the hierarchy or an updated class should remain at the current position. The server-tags
list is mandatory and must contain one or more server tags as strings to explicitly associate the client class with one or more user-defined servers. It may include the special server tag "all" to associate the class with all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv6 shared network successfully set.",
"arguments": {
"client-classes": [
{
"name": <set client class name>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-global-parameter4-del
This command deletes a global DHCPv4 parameter from the configuration database. The server uses the value specified in the configuration file, or a default value if the parameter is not specified, after deleting the parameter from the database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-global-parameter4-del command
Command syntax:
{
"command": "remote-global-parameter4-del",
"arguments": {
"parameters": [ <parameter name as string> ],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command carries the list including exactly one name of the parameter to be deleted. If deleting a map parameter, the map-name.parameter-name
format must be used. The server-tags
list is mandatory and it must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv4 global parameter(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-global-parameter4-get
This command fetches the selected global parameter for the server from the specified database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-global-parameter4-get command
Command syntax:
{
"command": "remote-global-parameter4-get",
"arguments": {
"parameters": [ <parameter name as string> ],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command carries a list including exactly one name of the parameter to be fetched. If retrieving a map parameter, the map-name.parameter-name
format must be used. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed; it fetches the global parameter value shared by all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv4 global parameter found.",
"arguments": {
"parameters": {
<parameter name>: <parameter value>,
"metadata": {
"server-tags": [ <server tag> ]
}
},
"count": 1
}
}
The returned response contains a map with a global parameter name:value pair. The value may be a JSON string, integer, real, boolean or a map containing only one of these types. The metadata is included and provides database-specific information associated with the returned object. If the "all" server tag is specified, the command attempts to fetch the global parameter value associated with all servers. If the explicit server tag is specified, the command fetches the value associated with the given server. If the server-specific value does not exist, the remote-global-parameter4-get
command fetches the value associated with all servers.
remote-global-parameter4-get-all
This command fetches all global parameters for the server from the specified database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-global-parameter4-get-all command
Command syntax:
{
"command": "remote-global-parameter4-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The special server tag "all" is allowed; it fetches the global parameters shared by all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv4 global parameters found.",
"arguments": {
"parameters": [
{
<first parameter name>: <first parameter value>,
"metadata": {
"server-tags": [ <server tag> ]
}
},
{
<second parameter name>: <second parameter value>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains a global parameter name:value pair. The value may be a JSON string, integer, real, boolean or a map containing only one of these types. The metadata is appended to each parameter and provides database-specific information associated with the returned objects. If the server tag "all" is included in the command, the response contains the global parameters shared among all servers. It excludes server-specific global parameters. If an explicit server tag is included in the command, the response contains all global parameters directly associated with the given server, and the global parameters associated with all servers when server-specific values are not present.
remote-global-parameter4-set
This command creates or updates one or more global parameters in the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-global-parameter4-set command
Command syntax:
{
"command": "remote-global-parameter4-set",
"arguments": {
"parameters": {
<first parameter name>: <first parameter value>,
<second parameter name>: <second parameter value>
},
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command carries multiple global parameters with their values (including maps with scalar parameters). Care should be taken when specifying more than one parameter; in some cases, only a subset of the parameters may be successfully stored in the database and other parameters may fail to be stored. In such cases the remote-global-parameter4-get-all
command may be useful to verify the contents of the database after the update. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed; it associates the specified parameters with all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv4 global parameter(s) successfully set.",
"arguments": {
"parameters": {
<first parameter name>: <first parameter value>,
<second parameter name>: <second parameter value>
},
"count": 2
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-global-parameter6-del
This command deletes a global DHCPv6 parameter from the configuration database. The server uses the value specified in the configuration file, or a default value if the parameter is not specified in the configuration file, after deleting the parameter from the database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-global-parameter6-del command
Command syntax:
{
"command": "remote-global-parameter6-del",
"arguments": {
"parameters": [ <parameter name as string> ],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command carries the list including exactly one name of the parameter to be deleted. If deleting a map parameter, the map-name.parameter-name
format must be used. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv6 global parameter(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-global-parameter6-get
This command fetches the selected global parameter for the server from the specified database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-global-parameter6-get command
Command syntax:
{
"command": "remote-global-parameter6-get",
"arguments": {
"parameters": [ <parameter name as string> ],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command carries a list including exactly one name of the parameter to be fetched. If retrieving a map parameter, the map-name.parameter-name
format must be used. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed; it fetches the global parameter value shared by all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv6 global parameter found.",
"arguments": {
"parameters": {
<parameter name>: <parameter value>,
"metadata": {
"server-tags": [ <server tag> ]
}
},
"count": 1
}
}
The returned response contains a map with a global parameter name:value pair. The value may be a JSON string, integer, real, boolean or a map containing only one of these types. The metadata is included and provides database-specific information associated with the returned object. If the "all" server tag is specified, the command attempts to fetch the global parameter value associated with all servers. If the explicit server tag is specified, the command fetches the value associated with the given server. If the server-specific value does not exist, the remote-global-parameter6-get
fetches the value associated with all servers.
remote-global-parameter6-get-all
This command fetches all global parameters for the server from the specified database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-global-parameter6-get-all command
Command syntax:
{
"command": "remote-global-parameter6-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The special server tag "all" is allowed; it fetches the global parameters shared by all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv6 global parameters found.",
"arguments": {
"parameters": [
{
<first parameter name>: <first parameter value>,
"metadata": {
"server-tags": [ <server tag> ]
}
},
{
<second parameter name>: <second parameter value>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains a global parameter name:value pair. The value may be a JSON string, integer, real, boolean or a map containing only one of these types. The metadata is appended to each parameter and provides database-specific information associated with the returned objects. If the server tag "all" is included in the command, the response contains the global parameters shared among all servers. It excludes server-specific global parameters. If an explicit server tag is included in the command, the response contains all global parameters directly associated with the given server, and the global parameters associated with all servers when server-specific values are not present.
remote-global-parameter6-set
This command creates or updates one or more global parameters in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-global-parameter6-set command
Command syntax:
{
"command": "remote-global-parameter6-set",
"arguments": {
"parameters": {
<first parameter name>: <first parameter value>,
<second parameter name>: <second parameter value>
},
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command carries multiple global parameters with their values (including maps with scalar parameters). Care should be taken when specifying more than one parameter; in some cases, only a subset of the parameters may be successfully stored in the database and other parameters may fail to be stored. In such cases the remote-global-parameter6-get-all
command may be useful to verify the contents of the database after the update. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed; it associates the specified parameters with all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv6 global parameter(s) successfully set.",
"arguments": {
"parameters": {
<first parameter name>: <first parameter value>,
<second parameter name>: <second parameter value>
},
"count": 2
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-network4-del
This command deletes an IPv4 shared network from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-network4-del command
Command syntax:
{
"command": "remote-network4-del",
"arguments": {
"shared-networks": [
{
"name": <shared network name>
}
],
"subnets-action": <'keep' | 'delete'>,
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one name of the shared network to be deleted. The subnets-action
parameter denotes whether the subnets in this shared network should be deleted. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "1 IPv4 shared network(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-network4-get
This command fetches the selected IPv4 shared network for the server from the specified database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-network4-get command
Command syntax:
{
"command": "remote-network4-get",
"arguments": {
"shared-networks": [
{
"name": <shared network name>
}
],
"subnets-include": <'full' | 'no'>,
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one name of the shared network to be returned. The subnets-include
optional parameter allows for specifying whether the subnets belonging to the shared network should also be returned. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "IPv4 shared network found.",
"arguments": {
"shared-networks": [
{
"name": <shared network name>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
},
<the rest of the shared network information, potentially including subnets>
}
],
"count": 1
}
}
If the subnets are returned with the shared network, they are carried in the subnet4
list within the shared network definition. The metadata is included in the returned shared network definition and provides the database-specific information associated with the returned object.
remote-network4-list
This command fetches a list of all IPv4 shared networks from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-network4-list command
Command syntax:
{
"command": "remote-network4-list",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The server-tags
list is required for this command, and must not be empty. It may either contain one or multiple server tags as strings, or a single null
value.
Response syntax:
{
"result": 0,
"text": "2 IPv4 shared network(s) found.",
"arguments": {
"shared-networks": [
{
"name": <first shared network name>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
},
{
"name": <second shared network name>,
"metadata": {
"server-tags": [ <first server tag>, ... ]
}
}
],
"count": 2
}
}
The returned response contains the list of maps. Each map contains the shared network name and the metadata, which provides database-specific information associated with the shared network. The returned list does not contain full definitions of the shared networks; use remote-network4-get
to fetch the full information about the selected shared networks. If the command includes explicit server tags as strings (including the special server tag "all"), the list contains all shared networks which are associated with any of the specified tags. A network is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the null
value in the server-tags
list, the response contains all shared networks which are assigned to no servers (unassigned).
remote-network4-set
This command creates or replaces an IPv4 shared network in the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-network4-set command
Command syntax:
{
"command": "remote-network4-set",
"arguments": {
"shared-networks": [
{
<shared network specification excluding subnets list>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The provided list must contain exactly one shared network specification, and must not contain subnets (the "subnet4" parameter). The subnets are added to the shared network using the remote-subnet4-set
command. The server-tags
list is mandatory and must contain one or more server tags as strings to explicitly associate the shared network with one or more user-defined servers. It may include the special server tag "all" to associate the network with all servers.
Response syntax:
{
"result": 0,
"text": "IPv4 shared network successfully set."
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-network6-del
This command deletes an IPv6 shared network from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-network6-del command
Command syntax:
{
"command": "remote-network6-del",
"arguments": {
"shared-networks": [
{
"name": <shared network name>
}
],
"subnets-action": <'keep' | 'delete'>,
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one name of the shared network to be deleted. The subnets-action
parameter indicates whether the subnets in this shared network should be deleted. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "1 IPv6 shared network(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-network6-get
This command fetches the selected IPv6 shared network for the server from the specified database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-network6-get command
Command syntax:
{
"command": "remote-network6-get",
"arguments": {
"shared-networks": [
{
"name": <shared network name>
}
],
"subnets-include": <'full' | 'no'>,
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one name of the shared network to be returned. The subnets-include
optional parameter allows for specifying whether the subnets belonging to the shared network should also be returned. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "IPv6 shared network found.",
"arguments": {
"shared-networks": [
{
"name": <shared network name>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
},
<the rest of the shared network information, potentially including subnets>
}
],
"count": 1
}
}
If the subnets are returned with the shared network, they are carried in the subnet6
list within the shared network definition. The metadata is included in the returned shared network definition and provides the database-specific information associated with the returned object.
remote-network6-list
This command fetches a list of all IPv6 shared networks from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-network6-list command
Command syntax:
{
"command": "remote-network6-list",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The server-tags
list is required for this command, and must not be empty. It may either contain one or multiple server tags as strings, or a single null
value.
Response syntax:
{
"result": 0,
"text": "2 IPv6 shared network(s) found.",
"arguments": {
"shared-networks": [
{
"name": <first shared network name>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
},
{
"name": <second shared network name>,
"metadata": {
"server-tags": [ <first server tag>, ... ]
}
}
],
"count": 2
}
}
The returned response contains the list of maps. Each map contains the shared network name and the metadata, which provides database-specific information associated with the shared network. The returned list does not contain full definitions of the shared networks; use remote-network6-get
to fetch the full information about the selected shared networks. If the command includes explicit server tags as strings (including the special server tag "all"), the list contains all shared networks which are associated with any of the specified tags. A network is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the null
value in the server-tags
list, the response contains all shared networks which are assigned to no servers (unassigned).
remote-network6-set
This command creates or replaces an IPv6 shared network in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-network6-set command
Command syntax:
{
"command": "remote-network6-set",
"arguments": {
"shared-networks": [
{
<shared network specification excluding subnets list>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The provided list must contain exactly one shared network specification, and must not contain subnets (the "subnet6" parameter). The subnets are added to the shared network using the remote-subnet6-set
command. The server-tags
list is mandatory and must contain one or more server tags as strings to explicitly associate the shared network with one or more user-defined servers. It may include the special server tag "all" to associate the network with all servers.
Response syntax:
{
"result": 0,
"text": "IPv6 shared network successfully set."
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option-def4-del
This command deletes a DHCPv4 option definition from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option-def4-del command
Command syntax:
{
"command": "remote-option-def4-del",
"arguments": {
"option-defs": [ {
"code": <option code>,
"space": <option space>
} ],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command includes a list with exactly one option definition specification, comprising an option name and code. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv4 option definition(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option-def4-get
This command fetches a DHCPv4 option definition from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-option-def4-get command
Command syntax:
{
"command": "remote-option-def4-get",
"arguments": {
"option-defs": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The desired option definition is identified by the pair of option code/space values. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed, to fetch the option definition instance shared by all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv4 option definition found.",
"arguments": {
"option-defs": [
{
<option definition>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
],
"count": 1
}
}
The metadata is included and provides database-specific information associated with the returned object. If the "all" server tag is specified, the command attempts to fetch the option definition associated with all servers. If the explicit server tag is specified, the command fetches the option definition associated with the given server. If the server-specific option definition does not exist, the remote-option-def4-get
command fetches the option definition associated with all servers.
remote-option-def4-get-all
This command fetches all DHCPv4 option definitions from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-option-def4-get-all command
Command syntax:
{
"command": "remote-option-def4-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The special server tag "all" is allowed, to fetch the option definitions shared by all servers.
Response syntax:
{
"result": 0,
"text": "2 DHCPv4 option definition(s) found.",
"arguments": {
"option-defs": [
{
<first option definition>,
"metadata": {
"server-tags": [ <server tag> ]
}
},
{
<second option definition>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains an option definition specification and the metadata, including database-specific information associated with the returned objects. If the server tag "all" is included in the command, the response contains the option definitions shared among all servers. It excludes server-specific option definitions. If an explicit server tag is included in the command, the response contains all option definitions directly associated with the given server, and the option definitions associated with all servers when server-specific option definitions are not present.
remote-option-def4-set
This command creates or replaces a DHCPv4 option definition in the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option-def4-set command
Command syntax:
{
"command": "remote-option-def4-set",
"arguments": {
"option-defs": [
{
<option definition specification>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The provided list must contain exactly one option definition specification. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed; it associates the specified option definition with all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv4 option definition set."
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option-def6-del
This command deletes a DHCPv6 option definition from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option-def6-del command
Command syntax:
{
"command": "remote-option-def6-del",
"arguments": {
"option-defs": [ {
"code": <option code>,
"space": <option space>
} ],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command includes a list with exactly one option definition specification, comprising an option name and code. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv6 option definition(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option-def6-get
This command fetches a DHCPv6 option definition from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-option-def6-get command
Command syntax:
{
"command": "remote-option-def6-get",
"arguments": {
"option-defs": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The desired option definition is identified by the pair of option code/space values. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed, to fetch the option definition instance shared by all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv6 option definition found.",
"arguments": {
"option-defs": [
{
<option definition>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
],
"count": 1
}
}
The metadata is included and provides database-specific information associated with the returned object. If the "all" server tag is specified, the command fetches the option definition associated with all servers. If the explicit server tag is specified, the command fetches the option definition associated with the given server. If the server-specific option definition does not exist, the remote-option-def6-get
command fetches the option definition associated with all servers.
remote-option-def6-get-all
This command fetches all DHCPv6 option definitions from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-option-def6-get-all command
Command syntax:
{
"command": "remote-option-def6-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The special server tag "all" is allowed, to fetch the option definitions shared by all servers.
Response syntax:
{
"result": 0,
"text": "2 DHCPv6 option definition(s) found.",
"arguments": {
"option-defs": [
{
<first option definition>,
"metadata": {
"server-tags": [ <server tag> ]
}
},
{
<second option definition>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains an option definition specification and the metadata, including database-specific information associated with the returned objects. If the server tag "all" is included in the command, the response contains the option definitions shared among all servers. It excludes server-specific option definitions. If an explicit server tag is included in the command, the response contains all option definitions directly associated with the given server, and the option definitions associated with all servers when server-specific option definitions are not present.
remote-option-def6-set
This command creates or replaces a DHCPv6 option definition in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option-def6-set command
Command syntax:
{
"command": "remote-option-def6-set",
"arguments": {
"option-defs": [
{
<option definition specification>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The provided list must contain exactly one option definition specification. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed; it associates the specified option definition with all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv6 option definition set."
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option4-global-del
This command deletes a DHCPv4 global option from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option4-global-del command
Command syntax:
{
"command": "remote-option4-global-del",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command includes a list with exactly one option specification, comprising an option name and code. Specifying an empty list, a value of null
, or multiple server tags will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv4 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option4-global-get
This command fetches a global DHCPv4 option for the server from the specified database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-option4-global-get command
Command syntax:
{
"command": "remote-option4-global-get",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The option is identified by the pair of option code/space values. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed, to fetch the global option instance shared by all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv4 option is found.",
"arguments": {
"options": [
{
<option information>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
]
}
}
The metadata is included and provides database specific information associated with the returned object. If the "all" server tag is specified, the command fetches the global option associated with all servers. If the explicit server tag is specified, the command fetches the global option associated with the given server. If the server specific option does not exist, it fetches the option associated with all servers.
remote-option4-global-get-all
This command fetches all DHCPv4 global options for the server from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-option4-global-get-all command
Command syntax:
{
"command": "remote-option4-global-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The special server tag "all" is allowed, to fetch the global options shared by all servers.
Response syntax:
{
"result": 0,
"text": "2 DHCPv4 option(s) found.",
"arguments": {
"options": [
{
<first option specification>,
"metadata": {
"server-tags": [ <server tag> ]
}
},
{
<second option specification>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains a global option specification and the metadata, including database-specific information associated with the returned object. If the server tag "all" is included in the command, the response contains the global options shared among all servers. It excludes server-specific global options. If an explicit server tag is included in the command, the response contains all global options directly associated with the given server, and the options associated with all servers when server-specific options are not present.
remote-option4-global-set
This command creates or replaces a DHCPv4 global option in the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option4-global-set command
Command syntax:
{
"command": "remote-option4-global-set",
"arguments": {
"options": [
{
<global option specification>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The provided list must contain exactly one option specification. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed; it associates the specified option with all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv4 option set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option4-network-del
This command deletes a DHCPv4 option from a shared network from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option4-network-del command
Command syntax:
{
"command": "remote-option4-network-del",
"arguments": {
"shared-networks": [
{
"name": <shared network name>
}
],
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly one name of the shared network and exactly one option specification, comprising an option name and code. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv4 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option4-network-set
This command creates or replaces a DHCPv4 option in a shared network in the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option4-network-set command
Command syntax:
{
"command": "remote-option4-network-set",
"arguments": {
"shared-networks": [
{
"name": <shared network name>
}
],
"options": [
{
<shared network option specification>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
The provided lists must contain exactly one name of the shared network and one option specification. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv4 option successfully set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option4-pool-del
This command deletes a DHCPv4 option from an address pool from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option4-pool-del command
Command syntax:
{
"command": "remote-option4-pool-del",
"arguments": {
"pools": [
{
"pool": <pool range or prefix>
}
],
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly one address pool specification and exactly one option specification comprising an option space name and code. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv4 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option4-pool-set
This command creates or replaces a DHCPv4 option in an address pool in the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option4-pool-set command
Command syntax:
{
"command": "remote-option4-pool-set",
"arguments": {
"pools": [
{
"pool": <pool range or prefix>
}
],
"options": [
{
<address pool option specification>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly address pool specification and exactly one option specification. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv4 option successfully set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option4-subnet-del
This command deletes a DHCPv4 option from a subnet from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option4-subnet-del command
Command syntax:
{
"command": "remote-option4-subnet-del",
"arguments": {
"subnets": [
{
"id": <subnet identifier>
}
],
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly one ID of the subnet and exactly one option specification, comprising an option name and code. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv4 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option4-subnet-set
This command creates or replaces a DHCPv4 option in a subnet in the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option4-subnet-set command
Command syntax:
{
"command": "remote-option4-subnet-set",
"arguments": {
"subnets": [
{
"id": <subnet identifier>
}
],
"options": [
{
<subnet option specification>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
The provided lists must contain exactly one ID of the subnet and one option specification. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv4 option successfully set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-global-del
This command deletes a DHCPv6 global option from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-global-del command
Command syntax:
{
"command": "remote-option6-global-del",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
This command includes a list with exactly one option specification, comprising an option name and code. Specifying an empty list, a value of null
, or multiple server tags will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv6 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-global-get
This command fetches a global DHCPv6 option for the server from the specified database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-option6-global-get command
Command syntax:
{
"command": "remote-option6-global-get",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The option is identified by the pair of option code/space values. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed, to fetch the global option instance shared by all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv6 option is found.",
"arguments": {
"options": [
{
<option information>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
]
}
}
The metadata is included and provides database-specific information associated with the returned object. If the "all" server tag is specified, the command attempts to fetch the global option associated with all servers. If the explicit server tag is specified, the command will fetch the global option associated with the given server. If the server-specific option does not exist, it fetches the option associated with all servers.
remote-option6-global-get-all
This command fetches all DHCPv6 global options for the server from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-option6-global-get-all command
Command syntax:
{
"command": "remote-option6-global-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The special server tag "all" is allowed, to fetch the global options shared by all servers.
Response syntax:
{
"result": 0,
"text": "2 DHCPv6 option(s) found.",
"arguments": {
"options": [
{
<first option specification>,
"metadata": {
"server-tags": [ <server tag> ]
}
},
{
<second option specification>,
"metadata": {
"server-tags": [ <server tag> ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains a global option specification and the metadata, including database-specific information associated with the returned object. If the server tag "all" is included in the command, the response contains the global options shared between all servers. It excludes server-specific global options. If an explicit server tag is included in the command, the response contains all global options directly associated with the given server, and the options associated with all servers when server-specific options are not present.
remote-option6-global-set
This command creates or replaces a DHCPv6 global option in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-global-set command
Command syntax:
{
"command": "remote-option6-global-set",
"arguments": {
"options": [
{
<global option specification>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <single server tag as string> ]
}
}
The provided list must contain exactly one option specification. The server-tags
list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of null
, or multiple server tags will result in an error. The server tag "all" is allowed; it associates the specified option with all servers.
Response syntax:
{
"result": 0,
"text": "DHCPv6 option set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-network-del
This command deletes a DHCPv6 option from a shared network from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-network-del command
Command syntax:
{
"command": "remote-option6-network-del",
"arguments": {
"shared-networks": [
{
"name": <shared network name>
}
],
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly one name of the shared network and exactly one option specification, comprising an option name and code. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv6 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-network-set
This command creates or replaces a DHCPv6 option in a shared network in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-network-set command
Command syntax:
{
"command": "remote-option6-network-set",
"arguments": {
"shared-networks": [
{
"name": <shared network name>
}
],
"options": [
{
<shared network option specification>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
The provided lists must contain exactly one name of the shared network and one option specification. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv6 option successfully set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-pd-pool-del
This command deletes a DHCPv6 option from a prefix delegation pool from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-pd-pool-del command
Command syntax:
{
"command": "remote-option6-pd-pool-del",
"arguments": {
"pd-pools": [
{
"prefix": <pool prefix (address part)>,
"prefix-len": <pool prefix (length part)>
}
],
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly one prefix delegation pool specification and exactly one option specification, comprising an option name and code. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv6 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-pd-pool-set
This command creates or replaces a DHCPv6 option in a prefix delegation pool in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-pd-pool-set command
Command syntax:
{
"command": "remote-option6-pd-pool-set",
"arguments": {
"pd-pools": [
{
"prefix": <pool prefix (address part)>,
"prefix-len": <pool prefix (length part)>
}
],
"options": [
{
<prefix delegation pool option specification>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly one prefix delegation pool specification and exactly one option specification. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv6 option successfully set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-pool-del
This command deletes a DHCPv6 option from an address pool from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-pool-del command
Command syntax:
{
"command": "remote-option6-pool-del",
"arguments": {
"pools": [
{
"pool": <pool range or prefix>
}
],
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly one address pool specification and exactly one option specification, comprising an option name and code. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv6 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-pool-set
This command creates or replaces a DHCPv6 option in an address pool in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-pool-set command
Command syntax:
{
"command": "remote-option6-pool-set",
"arguments": {
"pools": [
{
"pool": <pool range or prefix>
}
],
"options": [
{
<address pool option specification>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly address pool specification and exactly one option specification. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv6 option successfully set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-subnet-del
This command deletes a DHCPv6 option from a subnet from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-subnet-del command
Command syntax:
{
"command": "remote-option6-subnet-del",
"arguments": {
"subnets": [
{
"id": <subnet identifier>
}
],
"options": [
{
"code": <option code>,
"space": <option space>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes two lists with exactly one ID of the subnet and exactly one option specification, comprising an option name and code. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "1 DHCPv6 option(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-option6-subnet-set
This command creates or replaces a DHCPv6 option in a subnet in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-option6-subnet-set command
Command syntax:
{
"command": "remote-option6-subnet-set",
"arguments": {
"subnets": [
{
"id": <subnet identifier>
}
],
"options": [
{
<subnet option specification>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
The provided lists must contain exactly one ID of the subnet and one option specification. Specifying an empty list, a value of null
, or a server tag will result in an error.
Response syntax:
{
"result": 0,
"text": "DHCPv6 option successfully set.",
"arguments": {
"options": [
{
"code": <option code>,
"space": <option space>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-server4-del
This command deletes information about a DHCPv4 server from the configuration database. Any configuration explicitly associated with the deleted server is automatically disassociated. In addition, configuration elements not shareable with other servers (e.g. global DHCP parameters) are deleted. Shareable configuration elements (e.g. subnets, shared networks) are not deleted as they may be used by other servers.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-server4-del command
Command syntax:
{
"command": "remote-server4-del",
"arguments": {
"servers": [
{
"server-tag": <server name>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command carries the list including exactly one map with the tag of the server to be deleted.
Response syntax:
{
"result": 0,
"text": "1 DHCPv4 server(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-server4-get
This command fetches information about the DHCPv4 server, such as the server tag and description.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-server4-get command
Command syntax:
{
"command": "remote-server4-get",
"arguments": {
"servers": [
{
"server-tag": <server tag>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command carries the list including exactly one map with the tag of the server to be fetched.
Response syntax:
{
"result": 0,
"text": "DHCP server 'server tag' found.",
"arguments": {
"servers": [
{
"server-tag": <server tag>,
"description": <server description>
}
],
"count": 1
}
}
The server tag is the unique identifier of the server, used to associate the configuration elements in the database with the particular server instance. The returned server description is specified by the user when setting the server information.
remote-server4-get-all
This command fetches information about all DHCPv4 servers specified by the user.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-server4-get-all command
Command syntax:
{
"command": "remote-server4-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
}
}
}
This command contains no arguments besides the optional remote
.
Response syntax:
{
"result": 0,
"text": "DHCPv4 servers found.",
"arguments": {
"servers": [
{
"server-tag": <first server tag>,
"description": <first server description>
},
{
"server-tag": <second server tag>,
"description": <second server description>
}
],
"count": 2
}
}
The returned response contain a list of maps. Each map contains a server tag uniquely identifying a server, and the user-defined description of the server. The Kea Configuration Backend uses the keyword all
to associate parts of the configuration with all servers. Internally, it creates the logical server all
for this purpose. However, this logical server is not returned as a result of the remote-server4-get-all
command; only the user-defined servers are returned.
remote-server4-set
This command creates or replaces information about the DHCPv4 server in the database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-server4-set command
Command syntax:
{
"command": "remote-server4-set",
"arguments": {
"servers": [
{
"server-tag": <server tag>,
"description": <server description>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
The provided list must contain exactly one server specification. The server-tag
must be unique across all servers within the configuration database. The description
is the arbitrary text describing the server, its location within the network, etc.
Response syntax:
{
"result": 0,
"text": "DHCPv4 server successfully set.",
"arguments": {
"servers": [
{
"server-tag": <server tag>,
"description": <server description>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-server6-del
This command deletes information about a DHCPv6 server from the configuration database. Any configuration explicitly associated with the deleted server is automatically disassociated. In addition, configuration elements not shareable with other servers (e.g. global DHCP parameters) are deleted. Shareable configuration elements (e.g. subnets, shared networks) are not deleted as they may be used by other servers.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-server6-del command
Command syntax:
{
"command": "remote-server6-del",
"arguments": {
"servers": [
{
"server-tag": <server name>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command carries the list including exactly one map with the tag of the server to be deleted.
Response syntax:
{
"result": 0,
"text": "1 DHCPv6 server(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-server6-get
This command fetches information about the DHCPv6 server, such as the server tag and description.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-server6-get command
Command syntax:
{
"command": "remote-server6-get",
"arguments": {
"servers": [
{
"server-tag": <server tag>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command carries the list including exactly one map with the tag of the server to be fetched.
Response syntax:
{
"result": 0,
"text": "DHCP server 'server tag' found.",
"arguments": {
"servers": [
{
"server-tag": <server tag>,
"description": <server description>
}
],
"count": 1
}
}
The server tag is the unique identifier of the server, used to associate the configuration elements in the database with the particular server instance. The returned server description is specified by the user when setting the server information.
remote-server6-get-all
This command fetches information about all DHCPv6 servers specified by the user.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-server6-get-all command
Command syntax:
{
"command": "remote-server6-get-all",
"arguments": {
"remote": {
<specification of the database to connect to>
}
}
}
This command contains no arguments besides the optional remote
.
Response syntax:
{
"result": 0,
"text": "DHCPv6 servers found.",
"arguments": {
"servers": [
{
"server-tag": <first server tag>,
"description": <first server description>
},
{
"server-tag": <second server tag>,
"description": <second server description>
}
],
"count": 2
}
}
The returned response contain a list of maps. Each map contains a server tag uniquely identifying a server, and the user-defined description of the server. The Kea Configuration Backend uses the keyword all
to associate parts of the configuration with all servers. Internally, it creates the logical server all
for this purpose. However, this logical server is not returned as a result of the remote-server6-get-all
command; only the user-defined servers are returned.
remote-server6-set
This command creates or replaces information about the DHCPv6 server in the database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-server6-set command
Command syntax:
{
"command": "remote-server6-set",
"arguments": {
"servers": [
{
"server-tag": <server tag>,
"description": <server description>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
The provided list must contain exactly one server specification. The server-tag
must be unique across all servers within the configuration database. The description
is the arbitrary text describing the server, its location within the network, etc.
Response syntax:
{
"result": 0,
"text": "DHCPv6 server successfully set.",
"arguments": {
"servers": [
{
"server-tag": <server tag>,
"description": <server description>
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-subnet4-del-by-id
This command deletes an IPv4 subnet by ID from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-subnet4-del-by-id command
Command syntax:
{
"command": "remote-subnet4-del-by-id",
"arguments": {
"subnets": [
{
"id": <subnet identifier>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one ID of the subnet to be deleted. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "1 IPv4 subnet(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-subnet4-del-by-prefix
This command deletes an IPv4 subnet by prefix from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-subnet4-del-by-prefix command
Command syntax:
{
"command": "remote-subnet4-del-by-prefix",
"arguments": {
"subnets": [
{
"subnet": <subnet prefix>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one prefix of the subnet to be deleted. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "1 IPv4 subnet(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-subnet4-get-by-id
This command fetches the selected IPv4 subnet by ID from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-subnet4-get-by-id command
Command syntax:
{
"command": "remote-subnet4-get-by-id",
"arguments": {
"subnets": [ {
"id": <subnet identifier>
} ],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one ID of the subnet to be returned. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "IPv4 subnet found.",
"arguments": {
"subnets": [ {
"id": <subnet identifier>,
"subnet": <subnet prefix>,
"shared-network-name": <shared network name or null>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
},
<the rest of the subnet specification here>
} ],
"count": 1
}
}
If the shared network name is null, it means that the returned subnet does not belong to any shared network (a global subnet). The metadata is included in the returned subnet definition and provides database-specific information associated with the returned object.
remote-subnet4-get-by-prefix
This command fetches the selected IPv4 subnet by prefix from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-subnet4-get-by-prefix command
Command syntax:
{
"command": "remote-subnet4-get-by-prefix",
"arguments": {
"subnets": [ {
"subnet": <subnet prefix>
} ],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one prefix of the subnet to be returned. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "IPv4 subnet found.",
"arguments": {
"subnets": [
{
"id": <subnet identifier>,
"subnet": <subnet prefix>,
"shared-network-name": <shared network name or null>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
},
<the rest of the subnet specification here>
}
],
"count": 1
}
}
If the shared network name is null, it means that the returned subnet does not belong to any shared network (global subnet). The metadata is included in the returned subnet definition and provides database-specific information associated with the returned object.
remote-subnet4-list
This command fetches a list of all IPv4 subnets from the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-subnet4-list command
Command syntax:
{
"command": "remote-subnet4-list",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The server-tags
list is required for this command, and must not be empty. It may either contain one or multiple server tags as strings, or a single null
value.
Response syntax:
{
"result": 0,
"text": "2 IPv4 subnets found.",
"arguments": {
"subnets": [
{
"id": <first subnet identifier>,
"subnet": <first subnet prefix>,
"shared-network-name": <shared network name or null>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
},
{
"id": <second subnet identifier>,
"subnet": <second subnet prefix>,
"shared-network-name": <shared network name or null>,
"metadata": {
"server-tags": [ <first server tag>, ... ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains a subnet identifier, prefix, and shared network name to which the subnet belongs. If the subnet does not belong to a shared network, the name is null. The metadata includes database-specific information associated with the subnets. The returned list does not contain full subnet definitions; use remote-subnet4-get
to fetch the full information about the selected subnets. If the command includes explicit server tags as strings (including the special server tag "all"), the list contains all subnets which are associated with any of the specified tags. A subnet is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the null
value in the server-tags
list, the response contains all subnets which are assigned to no servers (unassigned).
remote-subnet4-set
This command creates or replaces an IPv4 subnet in the configuration database.
Supported by: kea-dhcp4
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-subnet4-set command
Command syntax:
{
"command": "remote-subnet4-set",
"arguments": {
"subnets": [
{
"id": <subnet identifier>,
"subnet": <subnet prefix>,
"shared-network-name": <shared network name or null>,
<the rest of the subnet specification here>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The provided list must contain exactly one subnet specification. The shared-network-name
parameter is required for these commands; it associates the subnet with the shared network by its name. If the subnet must not belong to any shared network (a global subnet), the null
value must be specified for the shared network name. The server-tags
list is mandatory and must contain one or more server tags as strings to explicitly associate the subnet with one or more user-defined servers. The remote-subnet4-set
command may include the special server tag "all" to associate the subnet with all servers.
Response syntax:
{
"result": 0,
"text": "IPv4 subnet successfully set.",
"arguments": {
"id": <subnet identifier>,
"subnet": <subnet prefix>
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-subnet6-del-by-id
This command deletes an IPv6 subnet by ID from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-subnet6-del-by-id command
Command syntax:
{
"command": "remote-subnet6-del-by-id",
"arguments": {
"subnets": [
{
"id": <subnet identifier>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one ID of the subnet to be deleted. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "1 IPv6 subnet(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-subnet6-del-by-prefix
This command deletes an IPv6 subnet by prefix from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-subnet6-del-by-prefix command
Command syntax:
{
"command": "remote-subnet6-del-by-prefix",
"arguments": {
"subnets": [
{
"subnet": <subnet prefix>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one prefix of the subnet to be deleted. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "1 IPv6 subnet(s) deleted.",
"arguments": {
"count": 1
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
remote-subnet6-get-by-id
This command fetches the selected IPv6 subnet by ID from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-subnet6-get-by-id command
Command syntax:
{
"command": "remote-subnet6-get-by-id",
"arguments": {
"subnets": [
{
"id": <subnet identifier>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one ID of the subnet to be returned. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "IPv6 subnet found.",
"arguments": {
"subnets": [
{
"id": <subnet identifier>,
"subnet": <subnet prefix>,
"shared-network-name": <shared network name or null>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
},
<the rest of the subnet specification here>
}
],
"count": 1
}
}
If the shared network name is null, it means that the returned subnet does not belong to any shared network (a global subnet). The metadata is included in the returned subnet definition and provides database-specific information associated with the returned object.
remote-subnet6-get-by-prefix
This command fetches the selected IPv6 subnet by prefix from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-subnet6-get-by-prefix command
Command syntax:
{
"command": "remote-subnet6-get-by-prefix",
"arguments": {
"subnets": [
{
"subnet": <subnet prefix>
}
],
"remote": {
<specification of the database to connect to>
}
}
}
This command includes a list with exactly one prefix of the subnet to be returned. The server-tags
parameter must not be specified for this command.
Response syntax:
{
"result": 0,
"text": "IPv6 subnet found.",
"arguments": {
"subnets": [ {
"id": <subnet identifier>,
"subnet": <subnet prefix>,
"shared-network-name": <shared network name or null>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
},
<the rest of the subnet specification here>
} ],
"count": 1
}
}
If the shared network name is null, it means that the returned subnet does not belong to any shared network (global subnet). The metadata is included in the returned subnet definition and provides database-specific information associated with the returned object.
remote-subnet6-list
This command fetches a list of all IPv6 subnets from the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see remote-subnet6-list command
Command syntax:
{
"command": "remote-subnet6-list",
"arguments": {
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The server-tags
list is required for this command, and must not be empty. It may either contain one or multiple server tags as strings, or a single null
value.
Response syntax:
{
"result": 0,
"text": "2 IPv6 subnets found.",
"arguments": {
"subnets": [
{
"id": <first subnet identifier>,
"subnet": <first subnet prefix>,
"shared-network-name": <shared network name or null>,
"metadata": {
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
},
{
"id": <second subnet identifier>,
"subnet": <second subnet prefix>,
"shared-network-name": <shared network name or null>,
"metadata": {
"server-tags": [ <first server tag>, ... ]
}
}
],
"count": 2
}
}
The returned response contains a list of maps. Each map contains a subnet identifier, prefix, and shared network name to which the subnet belongs. If the subnet does not belong to a shared network, the name is null. The metadata includes database-specific information associated with the subnets. The returned list does not contain full subnet definitions; use remote-subnet6-get
to fetch the full information about the selected subnets. If the command includes explicit server tags as strings (including the special server tag "all"), the list contains all subnets which are associated with any of the specified tags. A subnet is returned even if it is associated with multiple servers and only one of the specified tags matches. If the command includes the null
value in the server-tags
list, the response contains all subnets which are assigned to no servers (unassigned).
remote-subnet6-set
This command creates or replaces an IPv6 subnet in the configuration database.
Supported by: kea-dhcp6
Availability: 1.6.0 (cb_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see remote-subnet6-set command
Command syntax:
{
"command": "remote-subnet6-set",
"arguments": {
"subnets": [
{
"id": <subnet identifier>,
"subnet": <subnet prefix>,
"shared-network-name": <shared network name or null>,
<the rest of the subnet specification here>
}
],
"remote": {
<specification of the database to connect to>
},
"server-tags": [ <first server tag>, <second server tag>, ... ]
}
}
The provided list must contain exactly one subnet specification. The shared-network-name
parameter is required for these commands; it associates the subnet with the shared network by its name. If the subnet must not belong to any shared network (a global subnet), the null
value must be specified for the shared network name. The server-tags
list is mandatory and must contain one or more server tags as strings to explicitly associate the subnet with one or more user-defined servers. The remote-subnet6-set
command may include the special server tag "all" to associate the subnet with all servers.
Response syntax:
{
"result": 0,
"text": "IPv6 subnet successfully set.",
"arguments": {
"id": <subnet identifier>,
"subnet": <subnet prefix>
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
reservation-add
This command adds a new host reservation. The reservation may include IPv4 addresses, IPv6 addresses, IPv6 prefixes, various identifiers, a class the client will be assigned to, DHCPv4 and DHCPv6 options, and more.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (host_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see reservation-add command
Command syntax:
{
"command": "reservation-add",
"arguments": {
"reservation": {
"boot-file-name": <string>,
"client-id": <string>,
"circuit-id": <string>,
"duid": <string>,
"flex-id": <string>,
"ip-address": <string (IPv4 address)>,
"ip-addresses": [ <comma-separated strings> ],
"hw-address": <string>,
"hostname": <string>,
"next-server": <string (IPv4 address)>,
"option-data": [ <comma-separated structures defining options> ],
"prefixes": [ <comma-separated IPv6 prefixes> ],
"client-classes": [ <comma-separated strings> ],
"server-hostname": <string>,
"subnet-id": <integer>,
"user-context": <any valid JSON>
},
"operation-target": <string (memory, database, all, default)>
}
}
Note that boot-file-name, circuit-id, client-id, ip-address, next-server, and server-hostname are IPv4-specific. ip-addresses, and prefixes are IPv6-specific. Operation-target is optional; default is 'alternate'.
Response syntax:
{
"result": <integer>,
"text": <string>
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
reservation-del
This command deletes an existing host reservation.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (host_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see reservation-del command
Command syntax:
{
"command": "reservation-del",
"arguments": {
"subnet-id": <integer>,
"ip-address": <string>,
"identifier-type": <one of 'hw-address', 'duid', 'circuit-id', 'client-id' and 'flex-id'>,
"identifier": <string>,
"operation-target": <string (memory, database, all, default)>
}
}
The host reservation can be identified by either the (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier). Operation-target is optional; default is 'alternate'.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
reservation-get
This command retrieves an existing host reservation.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (host_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see reservation-get command
Command syntax:
{
"command": "reservation-get",
"arguments": {
"subnet-id": <integer>,
"identifier-type": <one of 'hw-address', 'duid', 'circuit-id', 'client-id' and 'flex-id'>,
"identifier": <string>,
"operation-target": <string (memory, database, all, default)>
}
}
The host reservation can be identified by either the (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier). Operation-target is optional; default is 'all'.
Response syntax:
{
"result": <integer>,
"text": <string>,
"arguments": {
"boot-file-name": <string>,
"comment": <string>,
"client-id": <string>,
"circuit-id": <string>,
"duid": <string>,
"flex-id": <string>,
"ip-address": <string (IPv4 address)>,
"ip-addresses": [ <comma-separated strings> ],
"hw-address": <string>,
"hostname": <string>,
"next-server": <string (IPv4 address)>,
"option-data": [ <comma-separated structures defining options> ],
"prefixes": [ <comma-separated IPv6 prefixes> ],
"client-classes": [ <comma-separated strings> ],
"server-hostname": <string>,
"subnet-id": <integer>,
"user-context": <any valid JSON>
}
}
The arguments object appears only if a host is found. Many fields in the arguments object appear only if a specific field is set.
reservation-get-all
This command retrieves all host reservations for a specified subnet.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (host_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see reservation-get-all command
Command syntax:
{
"command": "reservation-get-all",
"arguments": {
"subnet-id": <integer>,
"operation-target": <string (memory, database, all, default)>
}
}
Operation-target is optional; default is 'all'.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
The reservation-get-all command may result in very large responses.
reservation-get-by-address
This command retrieves all host reservations for given ip-address and optionally a specified subnet.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 2.4.0 (host_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see reservation-get-by-address command
Command syntax:
{
"command": "reservation-get-by-address",
"arguments": {
"ip-address": <string>,
"subnet-id": <integer>,
"operation-target": <string (memory, database, all, default)>
}
}
The host reservations can be identified by a pair of 'ip-address' and 'subnet-id'. 'subnet-id' is optional. 'operation-target' is optional; default is 'all'.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
The reservation-get-by-address may return many reservations for the same ip-address. This command may be useful in case ip-reservations-unique configuration flag is set to false.
reservation-get-by-hostname
This command retrieves all host reservations for a specified hostname and optionally a specified subnet.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.7.1 (host_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see reservation-get-by-hostname command
Command syntax:
{
"command": "reservation-get-by-hostname",
"arguments": {
"hostname": <hostname>,
"subnet-id": <integer>,
"operation-target": <string (memory, database, all, default)>
}
}
Operation-target is optional; default is 'all'.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
The reservation-get-by-hostname command may result in large responses.
reservation-get-by-id
This command retrieves all host reservations for a specified identifier (type and value).
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.9.0 (host_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see reservation-get-by-id command
Command syntax:
{
"command": "reservation-get-by-id",
"arguments": {
"identifier-type": <one of 'hw-address', 'duid', 'circuit-id', 'client-id' and 'flex-id'>,
"identifier": <string>,
"operation-target": <string (memory, database, all, default)>
}
}
Operation-target is optional; default is 'all'.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
The reservation-get-by-id command may result in large responses.
reservation-get-page
This command retrieves all host reservations or host reservations for a specified subnet by page.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (host_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see reservation-get-page command
Command syntax:
{
"command": "reservation-get-page",
"arguments": {
"subnet-id": <integer>,
"limit": <integer>,
"source-index": <integer>,
"from": <integer>
}
}
The page size limit is mandatory. The subnet-id is optional since version 1.9.0. The source-index and from host-id are optional and default to 0. Values to use to load the next page are returned in responses in a next map.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
reservation-update
This command updates an existing host reservation. The reservation has to include host identifiers and a subnet identifier and may include IPv4 addresses, IPv6 addresses, IPv6 prefixes, various identifiers, a class the client will be assigned to, DHCPv4 and DHCPv6 options, and more.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 2.3.7 (host_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see reservation-update command
Command syntax:
{
"command": "reservation-update",
"arguments": {
"reservation": {
"boot-file-name": <string>,
"client-id": <string>,
"circuit-id": <string>,
"duid": <string>,
"flex-id": <string>,
"ip-address": <string (IPv4 address)>,
"ip-addresses": [ <comma-separated strings> ],
"hw-address": <string>,
"hostname": <string>,
"next-server": <string (IPv4 address)>,
"option-data": [ <comma-separated structures defining options> ],
"prefixes": [ <comma-separated IPv6 prefixes> ],
"client-classes": [ <comma-separated strings> ],
"server-hostname": <string>,
"subnet-id": <integer>,
"user-context": <any valid JSON>
},
"operation-target": <string (memory, database, all, default)>
}
}
Note that boot-file-name, circuit-id, client-id, ip-address, next-server, and server-hostname are IPv4-specific. ip-addresses, and prefixes are IPv6-specific. Operation-target is optional; default is 'alternate'.
Response syntax:
{
"result": <integer>,
"text": <string>
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
server-tag-get
This command returns the server tag used by the server. Server tag is essential configuration parameter in the Config Backend configuration. This parameter is configured in the local config file. This command does not take any parameters.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see server-tag-get command
Command syntax:
{
"command": "server-tag-get"
}
Response syntax:
{
"result": 0,
"arguments": {
"server-tag": "office1"
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
shutdown
This command instructs the server to initiate its shutdown procedure.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see shutdown command
Command syntax:
{
"command": "shutdown",
"arguments": {
"exit-value": 123
}
}
The server responds with a confirmation that the shutdown procedure has been initiated.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
stat-lease4-get
This command fetches lease statistics for a range of known IPv4 subnets.
Supported by: kea-dhcp4
Availability: 1.4.0 (stat_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see stat-lease4-get command
Command syntax:
{
"command": "stat-lease4-get"
}
Response syntax:
{
"result": 0,
"text": "stat-lease4-get: 2 rows found",
"arguments": {
"result-set": {
"columns": [ "subnet-id", "total-addresses", "cumulative-assigned-addresses", "assigned-addresses", "declined-addresses" ],
"rows": [
[ 10, 256, 200, 111, 0 ],
[ 20, 4098, 5000, 2034, 4 ]
],
"timestamp": "2018-05-04 15:03:37.000000"
}
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
stat-lease6-get
This command fetches lease statistics for a range of known IPv6 subnets.
Supported by: kea-dhcp6
Availability: 1.4.0 (stat_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see stat-lease6-get command
Command syntax:
{
"command": "stat-lease6-get",
"arguments": {
"subnet-id" : 10
}
}
Response syntax:
{
"result": 0,
"text": "stat-lease6-get: 2 rows found",
"arguments": {
"result-set": {
"columns": [ "subnet-id", "total-nas", "cumulative-assigned-nas", "assigned-nas", "declined-addresses", "total-pds", "cumulative-assigned-pds", "assigned-pds" ],
"rows": [
[ 10, 4096, 3000, 2400, 3, 0, 0],
[ 20, 0, 0, 0, 1048, 500, 233 ],
[ 30, 256, 300, 60, 0, 1048, 15, 15 ]
],
"timestamp": "2018-05-04 15:03:37.000000"
}
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-get
This command retrieves a single statistic. It takes a single string parameter called name that specifies the statistic name.
Supported by: kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see statistic-get command
Command syntax:
{
"command": "statistic-get",
"arguments": {
"name": "pkt4-received"
}
}
The server responds with the details of the requested statistic, with a result of 0 indicating success, and the specified statistic as the value of the "arguments" parameter.
Response syntax:
{
"result": 0,
"arguments": {
"pkt4-received": [ [ "first_value", "2019-07-30 10:11:19.498739" ], [ "second_value", "2019-07-30 10:11:19.498662" ] ]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-get-all
This command retrieves all recorded statistics.
Supported by: kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see statistic-get-all command
Command syntax:
{
"command": "statistic-get-all",
"arguments": { }
}
The server responds with the details of all recorded statistics, with a result of 0 indicating that it iterated over all statistics (even when the total number of statistics is zero).
Response syntax:
{
"result": 0,
"arguments": {
"cumulative-assigned-addresses": [
[
0,
"2023-06-13 20:42:46.836166"
]
],
"declined-addresses": [
[
0,
"2023-06-13 20:42:46.836156"
]
],
"pkt4-ack-received": [
[
0,
"2023-06-13 20:42:46.616247"
]
],
"pkt4-ack-sent": [
[
0,
"2023-06-13 20:42:46.616290"
]
],
"pkt4-decline-received": [
[
0,
"2023-06-13 20:42:46.616296"
]
],
"pkt4-discover-received": [
[
0,
"2023-06-13 20:42:46.616303"
]
],
"pkt4-inform-received": [
[
0,
"2023-06-13 20:42:46.616308"
]
],
"pkt4-nak-received": [
[
0,
"2023-06-13 20:42:46.616312"
]
],
"pkt4-nak-sent": [
[
0,
"2023-06-13 20:42:46.616314"
]
],
"pkt4-offer-received": [
[
0,
"2023-06-13 20:42:46.616318"
]
],
"pkt4-offer-sent": [
[
0,
"2023-06-13 20:42:46.616323"
]
],
"pkt4-parse-failed": [
[
0,
"2023-06-13 20:42:46.616326"
]
],
"pkt4-receive-drop": [
[
0,
"2023-06-13 20:42:46.616330"
]
],
"pkt4-received": [
[
0,
"2023-06-13 20:42:46.616335"
]
],
"pkt4-release-received": [
[
0,
"2023-06-13 20:42:46.616339"
]
],
"pkt4-request-received": [
[
0,
"2023-06-13 20:42:46.616343"
]
],
"pkt4-sent": [
[
0,
"2023-06-13 20:42:46.616348"
]
],
"pkt4-unknown-received": [
[
0,
"2023-06-13 20:42:46.616354"
]
],
"reclaimed-declined-addresses": [
[
0,
"2023-06-13 20:42:46.836159"
]
],
"reclaimed-leases": [
[
0,
"2023-06-13 20:42:46.836163"
]
],
"subnet[1].assigned-addresses": [
[
0,
"2023-06-13 20:42:46.836173"
]
],
"subnet[1].cumulative-assigned-addresses": [
[
0,
"2023-06-13 20:42:46.836098"
]
],
"subnet[1].declined-addresses": [
[
0,
"2023-06-13 20:42:46.836178"
]
],
"subnet[1].pool[0].assigned-addresses": [
[
0,
"2023-06-13 20:42:46.836205"
]
],
"subnet[1].pool[0].cumulative-assigned-addresses": [
[
0,
"2023-06-13 20:42:46.836137"
]
],
"subnet[1].pool[0].declined-addresses": [
[
0,
"2023-06-13 20:42:46.836213"
]
],
"subnet[1].pool[0].reclaimed-declined-addresses": [
[
0,
"2023-06-13 20:42:46.836225"
]
],
"subnet[1].pool[0].reclaimed-leases": [
[
0,
"2023-06-13 20:42:46.836236"
]
],
"subnet[1].pool[0].total-addresses": [
[
11010049,
"2023-06-13 20:42:46.836128"
]
],
"subnet[1].reclaimed-declined-addresses": [
[
0,
"2023-06-13 20:42:46.836186"
]
],
"subnet[1].reclaimed-leases": [
[
0,
"2023-06-13 20:42:46.836194"
]
],
"subnet[1].total-addresses": [
[
11010049,
"2023-06-13 20:42:46.836083"
]
],
"subnet[1].v4-lease-reuses": [
[
0,
"2023-06-13 20:42:46.836105"
]
],
"subnet[1].v4-reservation-conflicts": [
[
0,
"2023-06-13 20:42:46.836111"
]
],
"v4-allocation-fail": [
[
0,
"2023-06-13 20:42:46.616358"
]
],
"v4-allocation-fail-classes": [
[
0,
"2023-06-13 20:42:46.616363"
]
],
"v4-allocation-fail-no-pools": [
[
0,
"2023-06-13 20:42:46.616368"
]
],
"v4-allocation-fail-shared-network": [
[
0,
"2023-06-13 20:42:46.616372"
]
],
"v4-allocation-fail-subnet": [
[
0,
"2023-06-13 20:42:46.616376"
]
],
"v4-lease-reuses": [
[
0,
"2023-06-13 20:42:46.616410"
]
],
"v4-reservation-conflicts": [
[
0,
"2023-06-13 20:42:46.616412"
]
]
}
}
or
{
"result": 0,
"arguments": {
"cumulative-assigned-nas": [
[
0,
"2023-06-13 21:28:57.196757"
]
],
"cumulative-assigned-pds": [
[
0,
"2023-06-13 21:28:57.196758"
]
],
"declined-addresses": [
[
0,
"2023-06-13 21:28:57.196754"
]
],
"pkt6-advertise-received": [
[
0,
"2023-06-13 21:28:57.177731"
]
],
"pkt6-advertise-sent": [
[
0,
"2023-06-13 21:28:57.177739"
]
],
"pkt6-decline-received": [
[
0,
"2023-06-13 21:28:57.177739"
]
],
"pkt6-dhcpv4-query-received": [
[
0,
"2023-06-13 21:28:57.177740"
]
],
"pkt6-dhcpv4-response-received": [
[
0,
"2023-06-13 21:28:57.177740"
]
],
"pkt6-dhcpv4-response-sent": [
[
0,
"2023-06-13 21:28:57.177741"
]
],
"pkt6-infrequest-received": [
[
0,
"2023-06-13 21:28:57.177742"
]
],
"pkt6-parse-failed": [
[
0,
"2023-06-13 21:28:57.177742"
]
],
"pkt6-rebind-received": [
[
0,
"2023-06-13 21:28:57.177743"
]
],
"pkt6-receive-drop": [
[
0,
"2023-06-13 21:28:57.177743"
]
],
"pkt6-received": [
[
0,
"2023-06-13 21:28:57.177744"
]
],
"pkt6-release-received": [
[
0,
"2023-06-13 21:28:57.177744"
]
],
"pkt6-renew-received": [
[
0,
"2023-06-13 21:28:57.177745"
]
],
"pkt6-reply-received": [
[
0,
"2023-06-13 21:28:57.177745"
]
],
"pkt6-reply-sent": [
[
0,
"2023-06-13 21:28:57.177746"
]
],
"pkt6-request-received": [
[
0,
"2023-06-13 21:28:57.177747"
]
],
"pkt6-sent": [
[
0,
"2023-06-13 21:28:57.177747"
]
],
"pkt6-solicit-received": [
[
0,
"2023-06-13 21:28:57.177748"
]
],
"pkt6-unknown-received": [
[
0,
"2023-06-13 21:28:57.177748"
]
],
"reclaimed-declined-addresses": [
[
0,
"2023-06-13 21:28:57.196755"
]
],
"reclaimed-leases": [
[
0,
"2023-06-13 21:28:57.196756"
]
],
"subnet[1].assigned-nas": [
[
0,
"2023-06-13 21:28:57.196760"
]
],
"subnet[1].assigned-pds": [
[
0,
"2023-06-13 21:28:57.196761"
]
],
"subnet[1].cumulative-assigned-nas": [
[
0,
"2023-06-13 21:28:57.196727"
]
],
"subnet[1].cumulative-assigned-pds": [
[
0,
"2023-06-13 21:28:57.196729"
]
],
"subnet[1].declined-addresses": [
[
0,
"2023-06-13 21:28:57.196763"
]
],
"subnet[1].pd-pool[0].assigned-pds": [
[
0,
"2023-06-13 21:28:57.196785"
]
],
"subnet[1].pd-pool[0].cumulative-assigned-pds": [
[
0,
"2023-06-13 21:28:57.196744"
]
],
"subnet[1].pd-pool[0].reclaimed-leases": [
[
0,
"2023-06-13 21:28:57.196789"
]
],
"subnet[1].pd-pool[0].total-pds": [
[
256,
"2023-06-13 21:28:57.196741"
]
],
"subnet[1].pool[0].assigned-nas": [
[
0,
"2023-06-13 21:28:57.196773"
]
],
"subnet[1].pool[0].cumulative-assigned-nas": [
[
0,
"2023-06-13 21:28:57.196739"
]
],
"subnet[1].pool[0].declined-addresses": [
[
0,
"2023-06-13 21:28:57.196775"
]
],
"subnet[1].pool[0].reclaimed-declined-addresses": [
[
0,
"2023-06-13 21:28:57.196779"
]
],
"subnet[1].pool[0].reclaimed-leases": [
[
0,
"2023-06-13 21:28:57.196783"
]
],
"subnet[1].pool[0].total-nas": [
[
281474976710656,
"2023-06-13 21:28:57.196736"
]
],
"subnet[1].reclaimed-declined-addresses": [
[
0,
"2023-06-13 21:28:57.196766"
]
],
"subnet[1].reclaimed-leases": [
[
0,
"2023-06-13 21:28:57.196770"
]
],
"subnet[1].total-nas": [
[
281474976710656,
"2023-06-13 21:28:57.196720"
]
],
"subnet[1].total-pds": [
[
256,
"2023-06-13 21:28:57.196724"
]
],
"subnet[1].v6-ia-na-lease-reuses": [
[
0,
"2023-06-13 21:28:57.196731"
]
],
"subnet[1].v6-ia-pd-lease-reuses": [
[
0,
"2023-06-13 21:28:57.196733"
]
],
"v6-allocation-fail": [
[
0,
"2023-06-13 21:28:57.177749"
]
],
"v6-allocation-fail-classes": [
[
0,
"2023-06-13 21:28:57.177755"
]
],
"v6-allocation-fail-no-pools": [
[
0,
"2023-06-13 21:28:57.177756"
]
],
"v6-allocation-fail-shared-network": [
[
0,
"2023-06-13 21:28:57.177756"
]
],
"v6-allocation-fail-subnet": [
[
0,
"2023-06-13 21:28:57.177757"
]
],
"v6-ia-na-lease-reuses": [
[
0,
"2023-06-13 21:28:57.177757"
]
],
"v6-ia-pd-lease-reuses": [
[
0,
"2023-06-13 21:28:57.177758"
]
]
}
}
or
{
"result": 0,
"arguments": {
"ncr-error": [
[
0,
"2023-06-13 21:42:54.627751"
]
],
"ncr-invalid": [
[
0,
"2023-06-13 21:42:54.627749"
]
],
"ncr-received": [
[
0,
"2023-06-13 21:42:54.627737"
]
],
"update-error": [
[
0,
"2023-06-13 21:42:54.627759"
]
],
"update-sent": [
[
0,
"2023-06-13 21:42:54.627752"
]
],
"update-signed": [
[
0,
"2023-06-13 21:42:54.627753"
]
],
"update-success": [
[
0,
"2023-06-13 21:42:54.627755"
]
],
"update-timeout": [
[
0,
"2023-06-13 21:42:54.627757"
]
],
"update-unsigned": [
[
0,
"2023-06-13 21:42:54.627754"
]
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-remove
This command deletes a single statistic. It takes a single string parameter called name that specifies the statistic name.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see statistic-remove command
Command syntax:
{
"command": "statistic-remove",
"arguments": {
"name": "pkt4-received"
}
}
If the specific statistic is found and its removal is successful, the server responds with a status of 0, indicating success, and an empty parameters field. If an error is encountered (e.g. the requested statistic was not found), the server returns a status code of 1 (error) and the text field contains the error description.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-remove-all
(Deprecated) This command deletes all statistics.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see statistic-remove-all command
Command syntax:
{
"command": "statistic-remove-all",
"arguments": { }
}
If the removal of all statistics is successful, the server responds with a status of 0, indicating success, and an empty parameters field. If an error is encountered, the server returns a status code of 1 (error) and the text field contains the error description.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-reset
This command sets the specified statistic to its neutral value: 0 for integer, 0.0 for float, 0h0m0s0us for time duration, and "" for string type. It takes a single string parameter called name that specifies the statistic name.
Supported by: kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see statistic-reset command
Command syntax:
{
"command": "statistic-reset",
"arguments": {
"name": "pkt4-received"
}
}
If the specific statistic is found and the reset is successful, the server responds with a status of 0, indicating success, and an empty parameters field. If an error is encountered (e.g. the requested statistic was not found), the server returns a status code of 1 (error) and the text field contains the error description.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-reset-all
This command sets all statistics to their neutral values: 0 for integer, 0.0 for float, 0h0m0s0us for time duration, and "" for string type.
Supported by: kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.0.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see statistic-reset-all command
Command syntax:
{
"command": "statistic-reset-all",
"arguments": { }
}
If the operation is successful, the server responds with a status of 0, indicating success, and an empty parameters field. If an error is encountered, the server returns a status code of 1 (error) and the text field contains the error description.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-sample-age-set
This command sets a time-based limit for a single statistic. It takes two parameters: a string called name and an integer value called duration.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see statistic-sample-age-set command
Command syntax:
{
"command": "statistic-sample-age-set",
"arguments": {
"name": "pkt4-received",
"duration": 1245
}
}
The server responds with a message about a successfully set limit for the given statistic, with a result of 0 indicating success, and an empty parameters field. If an error is encountered (e.g. the requested statistic was not found), the server returns a status code of 1 (error) and the text field contains the error description.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-sample-age-set-all
This command sets a time-based limit for all statistics. It takes a single integer parameter called duration.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see statistic-sample-age-set-all command
Command syntax:
{
"command": "statistic-sample-age-set-all",
"arguments": {
"duration": 1245
}
}
The server responds with a message about successfully set limits for all statistics, with a result of 0 indicating success, and an empty parameters field. If an error is encountered, the server returns a status code of 1 (error) and the text field contains the error description.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-sample-count-set
This command sets a size-based limit for a single statistic. It takes two parameters: a string called name and an integer value called max-samples.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see statistic-sample-count-set command
Command syntax:
{
"command": "statistic-sample-count-set",
"arguments": {
"name": "pkt4-received",
"max-samples": 100
}
}
The server responds with a message about a successfully set limit for the given statistic, with a result of 0 indicating success, and an empty parameters field. If an error is encountered (e.g. the requested statistic was not found), the server returns a status code of 1 (error) and the text field contains the error description.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
statistic-sample-count-set-all
This command sets a size-based limit for all statistics. It takes a single integer parameter called max-samples.
Supported by: kea-dhcp4, kea-dhcp6
Availability: 1.6.0 (built-in)
Access: write (parameter ignored in this Kea version)
Description and examples: see statistic-sample-count-set-all command
Command syntax:
{
"command": "statistic-sample-count-set-all",
"arguments": {
"max-samples": 100
}
}
The server responds with a message about successfully set limits for all statistics, with a result of 0 indicating success, and an empty parameters field. If an error is encountered, the server returns a status code of 1 (error) and the text field contains the error description.
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
status-get
This command returns server's runtime information. It takes no arguments.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.7.3 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see status-get command
Command syntax:
{
"command": "status-get"
}
Response syntax:
{
"result": <integer>,
"arguments": {
"pid": <integer>,
"uptime": <uptime in seconds>,
"reload": <time since reload in seconds>,
"high-availability": [
{
"ha-mode": <HA mode configured for this relationship>,
"ha-servers": {
"local": {
"role": <role of this server as in the configuration file>,
"scopes": <list of scope names served by this server>,
"state": <HA state name of the server receiving the command>
},
"remote": {
"age": <the age of the remote status in seconds>,
"in-touch": <indicates if this server communicated with remote>,
"last-scopes": <list of scopes served by partner>,
"last-state": <HA state name of the partner>,
"role": <partner role>
}
}
}
],
"multi-threading-enabled": true,
"thread-pool-size": 4,
"packet-queue-size": 64,
"packet-queue-statistics": [ 1.2, 2.3, 3.4 ],
"sockets": {
"errors": [ <error received during the last attempt to open all sockets> ],
"status": <ready, retrying, or failed>
}
}
}
If the libdhcp_ha (High Availability) hooks library is loaded by the DHCP server receiving this command the response also includes the HA specific status information of the server receiving the command and its partner's status.
subnet4-add
This command creates and adds a new subnet to the existing server configuration. This operation has no impact on other subnets.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet4-add command
Command syntax:
{
"command": "subnet4-add",
"arguments": {
"subnet4": [ {
"id": 123,
"subnet": "10.20.30.0/24",
...
} ]
}
}
Response syntax:
{
"result": 0,
"text": "IPv4 subnet added",
"arguments": {
"subnets": [
{
"id": 123,
"subnet": "10.20.30.0/24"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet4-del
This command removes a subnet from the server's configuration. This command has no effect on other configured subnets, but removing a subnet has certain implications which the server's administrator should be aware of.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet4-del command
Command syntax:
{
"command": "subnet4-del",
"arguments": {
"id": 123
}
}
Response syntax:
{
"result": 0,
"text": "IPv4 subnet 192.0.2.0/24 (id 123) deleted",
"arguments": {
"subnets": [
{
"id": 123,
"subnet": "192.0.2.0/24"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet4-delta-add
This command updates (adds or overwrites) parts of a single subnet in the existing server configuration. This operation has no impact on other subnets.
Supported by: kea-dhcp4
Availability: 2.1.7 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet4-delta-add command
Command syntax:
{
"command": "subnet4-delta-add",
"arguments": {
"subnet4": [ {
"id": 123,
"subnet": "10.20.30.0/24",
...
} ]
}
}
Response syntax:
{
"result": 0,
"text": "IPv4 subnet updated",
"arguments": {
"subnets": [
{
"id": 123,
"subnet": "10.20.30.0/24"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet4-delta-del
This command updates (removes) parts of a single subnet in the existing server configuration. This operation has no impact on other subnets.
Supported by: kea-dhcp4
Availability: 2.1.7 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet4-delta-del command
Command syntax:
{
"command": "subnet4-delta-del",
"arguments": {
"subnet4": [ {
"id": 123,
"subnet": "10.20.30.0/24",
...
} ]
}
}
Response syntax:
{
"result": 0,
"text": "IPv4 subnet updated",
"arguments": {
"subnets": [
{
"id": 123,
"subnet": "10.20.30.0/24"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet4-get
This command retrieves detailed information about the specified subnet. This command usually follows subnet4-list
, which discovers available subnets with their respective subnet identifiers and prefixes.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see subnet4-get command
Command syntax:
{
"command": "subnet4-get",
"arguments": {
"id": 10
}
}
Response syntax:
{
"result": 0,
"text": "Info about IPv4 subnet 10.0.0.0/8 (id 10) returned",
"arguments": {
"subnets": [
{
"subnet": "10.0.0.0/8",
"id": 1,
"option-data": [{
...
}],
...
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet4-list
This command lists all currently configured subnets. The subnets are returned in a brief format, i.e. a subnet identifier and subnet prefix are included for each subnet.
Supported by: kea-dhcp4
Availability: 1.3.0 (subnet_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see subnet4-list command
Command syntax:
{
"command": "subnet4-list"
}
Response syntax:
{
"result": 0,
"text": "2 IPv4 subnets found",
"arguments": {
"subnets": [
{
"id": 10,
"subnet": "10.0.0.0/8"
},
{
"id": 100,
"subnet": "192.0.2.0/24"
}
]
}
}
If no IPv4 subnets are found, an error code is returned along with the error description.
subnet4-update
This command updates (overwrites) a single subnet in the existing server configuration. This operation has no impact on other subnets.
Supported by: kea-dhcp4
Availability: 1.6.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet4-update command
Command syntax:
{
"command": "subnet4-update",
"arguments": {
"subnet4": [ {
"id": 123,
"subnet": "10.20.30.0/24",
...
} ]
}
}
Response syntax:
{
"result": 0,
"text": "IPv4 subnet updated",
"arguments": {
"subnets": [
{
"id": 123,
"subnet": "10.20.30.0/24"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet6-add
This command creates and adds a new subnet to the existing server configuration. This operation has no impact on other subnets.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet6-add command
Command syntax:
{
"command": "subnet6-add",
"arguments": {
"subnet6": [ {
"id": 234,
"subnet": "2001:db8:1::/64",
...
} ]
}
}
Response syntax:
{
"result": 0,
"text": "IPv6 subnet added",
"arguments": {
"subnets": [
{
"id": 234,
"subnet": "2001:db8:1::/64"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet6-del
This command removes a subnet from the server's configuration. This command has no effect on other configured subnets, but removing a subnet has certain implications which the server's administrator should be aware of.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet6-del command
Command syntax:
{
"command": "subnet6-del",
"arguments": {
"id": 234
}
}
Response syntax:
{
"result": 0,
"text": "IPv6 subnet 2001:db8:1::/64 (id 234) deleted",
"subnets": [
{
"id": 234,
"subnet": "2001:db8:1::/64"
}
]
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet6-delta-add
This command updates (adds or overwrites) parts of a single subnet in the existing server configuration. This operation has no impact on other subnets.
Supported by: kea-dhcp6
Availability: 2.1.7 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet6-delta-add command
Command syntax:
{
"command": "subnet6-delta-add",
"arguments": {
"subnet6": [ {
"id": 234,
"subnet": "2001:db8:1::/64",
...
} ]
}
}
Response syntax:
{
"result": 0,
"text": "IPv6 subnet updated",
"arguments": {
"subnets": [
{
"id": 234,
"subnet": "2001:db8:1::/64"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet6-delta-del
This command updates (removes) parts of a single subnet in the existing server configuration. This operation has no impact on other subnets.
Supported by: kea-dhcp6
Availability: 2.1.7 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet6-delta-del command
Command syntax:
{
"command": "subnet6-delta-del",
"arguments": {
"subnet6": [ {
"id": 234,
"subnet": "2001:db8:1::/64",
...
} ]
}
}
Response syntax:
{
"result": 0,
"text": "IPv6 subnet updated",
"arguments": {
"subnets": [
{
"id": 234,
"subnet": "2001:db8:1::/64"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet6-get
This command retrieves detailed information about the specified subnet. This command usually follows subnet6-list
, which discovers available subnets with their respective subnet identifiers and prefixes.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see subnet6-get command
Command syntax:
{
"command": "subnet6-get",
"arguments": {
"id": 11
}
}
Response syntax:
{
"result": 0,
"text": "Info about IPv6 subnet 2001:db8:1::/64 (id 11) returned",
"arguments": {
"subnets": [
{
"subnet": "2001:db8:1::/64",
"id": 1,
"option-data": [{
...
}],
...
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
subnet6-list
This command lists all currently configured subnets. The subnets are returned in a brief format, i.e. a subnet identifier and subnet prefix are included for each subnet.
Supported by: kea-dhcp6
Availability: 1.3.0 (subnet_cmds hook library)
Access: read (parameter ignored in this Kea version)
Description and examples: see subnet6-list command
Command syntax:
{
"command": "subnet6-list"
}
Response syntax:
{
"result": 0,
"text": "2 IPv6 subnets found",
"arguments": {
"subnets": [
{
"id": 11,
"subnet": "2001:db8:1::/64"
},
{
"id": 233,
"subnet": "3000::/16"
}
]
}
}
If no IPv6 subnets are found, an error code is returned along with the error description.
subnet6-update
This command updates (overwrites) a single subnet in the existing server configuration. This operation has no impact on other subnets.
Supported by: kea-dhcp6
Availability: 1.6.0 (subnet_cmds hook library)
Access: write (parameter ignored in this Kea version)
Description and examples: see subnet6-update command
Command syntax:
{
"command": "subnet6-update",
"arguments": {
"subnet6": [ {
"id": 234,
"subnet": "2001:db8:1::/64",
...
} ]
}
}
Response syntax:
{
"result": 0,
"text": "IPv6 subnet updated",
"arguments": {
"subnets": [
{
"id": 234,
"subnet": "2001:db8:1::/64"
}
]
}
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)
version-get
This command returns extended information about the Kea version that is running. The returned string is the same as if Kea were run with the -V
command-line option.
Supported by: kea-ctrl-agent, kea-dhcp-ddns, kea-dhcp4, kea-dhcp6
Availability: 1.2.0 (built-in)
Access: read (parameter ignored in this Kea version)
Description and examples: see version-get command
Command syntax:
{
"command": "version-get"
}
Response syntax:
{
"result": <integer>,
"text": "<string>"
}
Result is an integer representation of the status. Currently supported statuses are:
0 - success
1 - error
2 - unsupported
3 - empty (command was completed successfully, but no data was affected or returned)
4 - conflict (command could not apply requested configuration changes because they were in conflict with the server state)