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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
// This is an example configuration file for the DHCPv4 server in Kea.
// It demonstrates how to enable Kea Configuration Backend using MySQL.
// It requires that libdhcp_mysql_cb.so library is available and
// optionally libdhcp_cb_cmds.so hooks library.
{ "Dhcp6":
{
// Set the server tag for the configuration backend. This instance will
// be named server2. Every configuration element that is applicable to
// either "all" or "server2" will be used by this instance.
"server-tag": "server2",
// Kea is told to listen on eth0 interface only.
"interfaces-config": {
"interfaces": [ "eth0" ]
},
// Use memfile lease database backend.
"lease-database": {
"type": "memfile",
"lfc-interval": 3600
},
// This parameter controls how the server accesses the configuration
// database. Currently only one database type is available - "mysql".
// It requires that libdhcp_mysql_cb.so hooks library is loaded.
"config-control": {
// A list of database backends to connect to. Currently, it is limited
// to a single backend.
"config-databases": [
{
"type": "mysql",
"reconnect-wait-time": 3000, // expressed in ms
"max-reconnect-tries": 3,
"name": "kea",
"user": "kea",
"password": "kea",
"host": "localhost",
"port": 3306
}
],
// Controls how often the server polls the database for the
// configuration updates. The setting below implies that it
// will take up to approx. 20 seconds for the server to
// discover and fetch configuration changes.
"config-fetch-wait-time": 20
},
// This defines a control socket. If defined, Kea will open a UNIX socket
// and will listen for incoming commands. See section 17 of the Kea ARM for
// details.
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea6-ctrl-socket"
},
// Hooks libraries that enable configuration backend are loaded.
"hooks-libraries": [
// The libdhcp_mysql_cb.so is required to use MySQL Configuration
// Backend.
{
"library": "/usr/local/lib/kea/hooks/libdhcp_mysql_cb.so"
}
// The libdhcp_cb_cmds.so is optional. It allows for managing the
// configuration in the database. If this library is not loaded,
// the configuration can be managed directly using available
// tools that work directly with the MySQL database.
//,{
// "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
//}
],
// The following configures logging. It assumes that messages with at
// least informational level (info, warn, error and fatal) should be
// logged to stdout. Alternatively, you can specify stderr here, a filename
// or 'syslog', which will store output messages via syslog.
"loggers": [
{
"name": "kea-dhcp6",
"output_options": [
{
"output": "stdout"
}
],
"debuglevel": 0,
"severity": "INFO"
}
]
}
}
|