diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-09 21:35:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-09 21:35:50 +0100 |
commit | 2778f53cc1f9f03a6c145e45082ca95ba21a1a96 (patch) | |
tree | f4d1b4e9d811447080223198b0a44cdce1d7ea75 /data/templates/dhcp-server/kea-dhcp4.conf.j2 | |
parent | bf096599e4bad8a595257654ec5a0a1c4ae2e15a (diff) | |
parent | 2787e7915c1225f05f1e07c62f7c4d1ac9dca5ac (diff) | |
download | vyos-1x-2778f53cc1f9f03a6c145e45082ca95ba21a1a96.tar.gz vyos-1x-2778f53cc1f9f03a6c145e45082ca95ba21a1a96.zip |
Merge pull request #1960 from sarthurdev/kea
dhcp: T3316: Migrate dhcp/dhcpv6 server to Kea
Diffstat (limited to 'data/templates/dhcp-server/kea-dhcp4.conf.j2')
-rw-r--r-- | data/templates/dhcp-server/kea-dhcp4.conf.j2 | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/data/templates/dhcp-server/kea-dhcp4.conf.j2 b/data/templates/dhcp-server/kea-dhcp4.conf.j2 new file mode 100644 index 000000000..6ab13ab27 --- /dev/null +++ b/data/templates/dhcp-server/kea-dhcp4.conf.j2 @@ -0,0 +1,72 @@ +{ + "Dhcp4": { + "interfaces-config": { + "interfaces": [ "*" ], + "dhcp-socket-type": "raw", + "service-sockets-max-retries": 5, + "service-sockets-retry-wait-time": 5000 + }, + "control-socket": { + "socket-type": "unix", + "socket-name": "/run/kea/dhcp4-ctrl-socket" + }, + "lease-database": { + "type": "memfile", + "persist": true, + "name": "{{ lease_file }}" + }, + "option-def": [ + { + "name": "rfc3442-static-route", + "code": 121, + "type": "record", + "array": true, + "record-types": "uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8" + }, + { + "name": "windows-static-route", + "code": 249, + "type": "record", + "array": true, + "record-types": "uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8" + }, + { + "name": "wpad-url", + "code": 252, + "type": "string" + }, + { + "name": "unifi-controller", + "code": 1, + "type": "ipv4-address", + "space": "ubnt" + } + ], + "hooks-libraries": [ +{% if failover is vyos_defined %} + { + "library": "/usr/lib/{{ machine }}-linux-gnu/kea/hooks/libdhcp_ha.so", + "parameters": { + "high-availability": [{{ failover | kea_failover_json }}] + } + }, +{% endif %} +{% if hostfile_update is vyos_defined %} + { + "library": "/usr/lib/{{ machine }}-linux-gnu/kea/hooks/libdhcp_run_script.so", + "parameters": { + "name": "/usr/libexec/vyos/system/on-dhcp-event.sh", + "sync": false + } + }, +{% endif %} + { + "library": "/usr/lib/{{ machine }}-linux-gnu/kea/hooks/libdhcp_lease_cmds.so", + "parameters": {} + } + ], +{% if shared_network_name is vyos_defined %} + "shared-networks": {{ shared_network_name | kea_shared_network_json }} +{% endif %} + } +} |