summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-server/kea-dhcp4.conf.j2
blob: 6ab13ab27da62e0155c9563a1f1744000ea04e42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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 %}
    }
}