Provide sample ('complete') json configuration files with all the keys present, demonstrating their usage
A Support customer asked (in ticket https://support.isc.org/Ticket/Display.html?id=13388):
I would like to have a complete json configuration file with all the "keys" present. Is this something you can help me with?
i have searched but not found a complete configuration for kea 1.3 & 1.4
The engineering response was to craft a v4 configuration containing all keys or almost all keys. It comes with the following warning:
Note that this configuration may not be valid, even though it is valid JSON, because usually we don't specify all keys. It is meant to be an example of what parameters can be specified at what level.
This feature request is to formalise the need for such a document, and to extend it to cover other areas of Kea Configuration, starting with v6, and potentially extending to the control agent.
Meanwhile, here is what was generated for v4:
{
"Dhcp4": {
"next-server": "192.0.2.123",
"boot-file-name": "/dev/null",
"client-classes": [
{
"boot-file-name": "",
"name": "phones_server1",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('HA_server1')"
},
{
"boot-file-name": "",
"name": "phones_server2",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('HA_server2')"
},
{
"boot-file-name": "",
"name": "laptops_server1",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('HA_server1')"
},
{
"boot-file-name": "",
"name": "laptops_server2",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('HA_server2')"
}
],
"control-socket": {
"socket-name": "/tmp/kea-dhcp4-ctrl.sock",
"socket-type": "unix"
},
"decline-probation-period": 86400,
"dhcp-ddns": {
"always-include-fqdn": false,
"enable-updates": false,
"generated-prefix": "myhost",
"hostname-char-replacement": "",
"hostname-char-set": "",
"max-queue-size": 1024,
"ncr-format": "JSON",
"ncr-protocol": "UDP",
"override-client-update": false,
"override-no-update": false,
"qualifying-suffix": "",
"replace-client-name": "never",
"sender-ip": "0.0.0.0",
"sender-port": 0,
"server-ip": "127.0.0.1",
"server-port": 53001
},
"dhcp4o6-port": 0,
"echo-client-id": true,
"expired-leases-processing": {
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 3600,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"reclaim-timer-wait-time": 10,
"unwarned-reclaim-cycles": 5
},
"hooks-libraries": [
{
"library": "/home/marcin/devel/kea-build/lib/hooks/libdhcp_lease_cmds.so",
"parameters": {}
},
{
"library": "/home/marcin/devel/kea-build/lib/hooks/libdhcp_ha.so",
"parameters": {
"high-availability": [
{
"heartbeat-delay": 10000,
"max-ack-delay": 5000,
"max-response-delay": 10000,
"max-unacked-clients": 0,
"mode": "load-balancing",
"peers": [
{
"auto-failover": true,
"name": "server1",
"role": "primary",
"url": "http://192.168.56.33:8080/"
},
{
"auto-failover": true,
"name": "server2",
"role": "secondary",
"url": "http://192.168.56.66:8080/"
}
],
"send-lease-updates": true,
"state-machine": {
"states": [
{
"pause": "always",
"state": "waiting"
},
{
"pause": "once",
"state": "partner-down"
}
]
},
"sync-leases": true,
"sync-timeout": 60000,
"this-server-name": "server1"
}
]
}
}
],
"host-reservation-identifiers": [
"hw-address",
"duid",
"circuit-id",
"client-id"
],
"interfaces-config": {
"dhcp-socket-type": "udp",
"interfaces": [
"enp0s8"
],
"re-detect": true
},
"lease-database": {
"lfc-interval": 3600,
"name": "/home/marcin/devel/kea-build/kea-dhcp4.csv",
"persist": true,
"type": "memfile"
},
"option-data": [
{
"always-send": false,
"code": 6,
"csv-format": true,
"data": "192.0.3.1, 192.0.3.2",
"name": "domain-name-servers",
"space": "dhcp4"
}
],
"option-def": [],
"rebind-timer": 40,
"renew-timer": 30,
"sanity-checks": {
"lease-checks": "warn"
},
"shared-networks": [
{
"match-client-id": true,
"name": "my-secret-network",
"option-data": [],
"relay": {
"ip-addresses": []
},
"reservation-mode": "all",
"require-client-classes": [ "Client_foo" ],
"subnet4": [
{
"4o6-interface": "",
"4o6-interface-id": "",
"4o6-subnet": "",
"boot-file-name": "",
"id": 1,
"match-client-id": true,
"next-server": "0.0.0.0",
"option-data": [
{
"always-send": false,
"code": 3,
"csv-format": true,
"data": "192.0.3.1",
"name": "routers",
"space": "dhcp4"
}
],
"pools": [
{
"client-class": "phones_server1",
"option-data": [],
"pool": "192.1.0.1/16"
},
{
"client-class": "laptops_server1",
"option-data": [],
"pool": "192.2.0.1/16"
},
{
"client-class": "phones_server2",
"option-data": [],
"pool": "192.3.0.1/16"
},
{
"client-class": "laptops_server2",
"option-data": [],
"pool": "192.4.0.1/16"
}
],
"rebind-timer": 40,
"relay": {
"ip-addresses": [
"192.168.56.1"
]
},
"renew-timer": 30,
"reservation-mode": "all",
"reservations": [],
"require-client-classes": [ "Client_foo" ],
"server-hostname": "",
"subnet": "192.0.0.0/8",
"valid-lifetime": 6000
}
]
}
],
"subnet4": [],
"valid-lifetime": 6000
},
"Logging": {
"loggers": [
{
"debuglevel": 99,
"name": "kea-dhcp4",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "stdout"
}
],
"severity": "INFO"
},
{
"debuglevel": 99,
"name": "kea-dhcp4.ha_hooks",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "stdout"
}
],
"severity": "INFO"
},
{
"debuglevel": 99,
"name": "kea-dhcp4.commands",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "stdout"
}
],
"severity": "INFO"
},
{
"debuglevel": 99,
"name": "kea-dhcp4.http",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "stdout"
}
],
"severity": "INFO"
}
]
}
}
Edited by Francis Dupont