Configuration file format

This describes the configuration file for DHCPKit. The syntax of this file is loosely based on the Apache configuration style. It is implemented using ZConfig.

The configuration file consists of basic server settings, Listeners that receive messages from the network and some Handlers that process the request and generate the response (possibly surrounded by Filters that determine which handlers get applies to which request).


# Logging to console and syslog
        level debug-packets
        level info

# Run as user 'demo' with group 'nogroup'
user demo
group nogroup

# Listen to this unicast address (to receive messages from a relay)
<listen-unicast 2001:db8::1>
    interface en0

# Handlers that are only applied to this /48
<subnet 2001:db8:1::/48>
    # Ignore requests from this /64
    <subnet 2001:db8:1:2::/64>

    # Everybody else: assign static address/prefix from this CSV
    <static-csv static.csv />

Configuration options


The user name the server should run as.

Default: “nobody”


The group name the server should run as.

Default: The primary group of the user.


Save the PID of the main process to this file.

Example: “/var/run/”

Default: “/var/run/”


Create a domain socket in this location to control the server.

Example: “/var/run/ipv6-dhcpd.sock”

Default: “/var/run/ipv6-dhcpd.sock”

User that owns the control-socket.
Group that owns the control-socket.

The number of worker processes that will be started.

Default: The number of CPUs detected in your system.


Whether to allow DHCPv6 rapid commit if the client requests it.

Default: “no”


Whether to allow DHCPv6 rapid commit for responses that reject a request.

Default: “no”

server-id (section of type Duid)

The DUID to use as the server-identifier.


<duid-ll server-id>
    hardware-type 1
    link-layer-address 00:24:36:ef:1d:89

The length of the exceptions window.

Default: “10.0”


The number of exceptions that can occur in the exception window before the server stops itself. This prevents the server from spinning in circles when something unexpected goes wrong.

Default: “5”

Possible sub-section types

This section contains the logging configuration. It contains a list of log-handlers that specify where to send the log entries.
By default the DHCPv6 server only keeps global statistics. Provide categories to collect statistics more granularly.
Listeners (multiple allowed)
Configuration sections that define listeners. These are usually the network interfaces that a DHCPv6 server listens on, like the well-known multicast address on an interface, or a unicast address where a DHCPv6 relay can send its requests to.
Filters (multiple allowed)
Configuration sections that specify filters. A filter limits which handlers get applied to which messages. Everything inside a filter gets ignored if the filter condition doesn’t match. That way you can configure the server to only apply certain handlers to certain messages, for example to return different information options to different clients.
Handlers (multiple allowed)

Configuration sections that specify a handler. Handlers process requests, build the response etc. Some of them add information options to the response, others look up the client in a CSV file and assign addresses and prefixes, and others can abort the processing and tell the server not to answer at all.

You can make the server do whatever you want by configuring the appropriate handlers.