|type |htype| identifier |
The server stores the generated server identifier in the following
-location: ``[kea-install-dir]/var/lib/kea/kea-dhcp6-serverid``.
+location: ``"[kea-install-dir]/var/lib/kea/kea-dhcp6-serverid"``.
+
+As of Kea 2.7.9, this path may be overridden at startup by setting the
+environment variable ``KEA_DHCP_DATA_DIR`` to the desired path.
In some uncommon deployments where no stable storage is available, the
server should be configured not to try to store the server identifier.
The Kea DHCPv6 server puts the server identifier file and the default
memory lease file into its data directory. By default this directory is
-``prefix/var/lib/kea`` but this location can be changed using the
-``data-directory`` global parameter, as in:
+``"[kea-install-dir]/var/lib/kea"`` but this location can be changed
+using the ``data-directory`` global parameter, as in:
::
{
"command": "cache-write",
- "arguments": "/usr/local/var/lib/kea/kea-host-cache.json"
+ "arguments": "/var/lib/kea/kea-host-cache.json"
}
-This causes the contents to be stored in the ``/usr/local/var/lib/kea/kea-host-cache.json``
+This causes the contents to be stored in the ``/var/lib/kea/kea-host-cache.json``
file. That file can then be loaded with the :isccmd:`cache-load` command or
processed by any other tool that is able to understand JSON format.
can save logs to a text file or to a database (created using
:iscman:`kea-admin`; see :ref:`mysql-database-create` and :ref:`pgsql-database-create`).
The library is installed alongside the Kea libraries in
-``[kea-install-dir]/var/log/kea``, where ``kea-install-dir`` is determined
+``"[kea-install-dir]/var/log/kea"``, where ``kea-install-dir`` is determined
by the ``--prefix`` meson setup option which defaults to
``/usr/local``. Assuming the default value, :iscman:`kea-dhcp4` can be configured to load
:ischooklib:`libdhcp_legal_log.so` like this:
The hook library parameters for the text file configuration are:
- ``path`` - the directory in which the forensic file(s) will be written.
- The default value is ``[kea-install-dir]/var/log/kea``. The directory
+ The default value is ``"[kea-install-dir]/var/log/kea"``. The directory
must exist.
.. note::
- ``share/man/`` — manual pages (online documentation).
-- ``var/lib/kea/`` — server identification and lease database files.
+- ``var/lib/kea/`` — server identifier (DHCPv6) and lease database files.
- ``var/log/kea/`` - log files.
The optional ``-c keactrl-config-file`` switch allows specification of
an alternate :iscman:`keactrl` configuration file. (``--ctrl-config`` is a
synonym for ``-c``.) In the absence of ``-c``, :iscman:`keactrl` uses the
-default configuration file ``[kea-install-dir]/etc/kea/keactrl.conf``.
+default configuration file ``"[kea-install-dir]/etc/kea/keactrl.conf"``.
The optional ``-s server[,server,...]`` switch selects the servers to
which the command is issued. (``--server`` is a synonym for ``-s``.) If
necessary to run all of the available servers.
The :iscman:`keactrl` configuration file sets which servers are enabled and
which are disabled. The default configuration file is
-``[kea-install-dir]/etc/kea/keactrl.conf``, but this can be overridden
+``"[kea-install-dir]/etc/kea/keactrl.conf"``, but this can be overridden
on a per-command basis using the ``-c`` switch.
The contents of ``keactrl.conf`` are:
(dhcp_ddns and netconf) are disabled by default.
By default, Kea servers managed by :iscman:`keactrl` are located in
-``[kea-install-dir]/sbin``. This should work for most installations. If
+``"[kea-install-dir]/sbin"``. This should work for most installations. If
the default location needs to be altered, the paths
specified with the ``dhcp4_srv``, ``dhcp6_srv``, ``dhcp_ddns_srv``,
``ctrl_agent_srv``, and ``netconf_srv`` parameters should be modified.
================================================
1. Edit the Kea configuration files, which by default are installed in
- the ``[kea-install-dir]/etc/kea/`` directory. These are:
+ the ``"[kea-install-dir]/etc/kea/"`` directory. These are:
``kea-dhcp4.conf``, ``kea-dhcp6.conf``, ``kea-dhcp-ddns.conf`` and
``kea-ctrl-agent.conf``, ``keactrl.conf`` for the DHCPv4 server, DHCPv6 server,
D2, Control Agent, and keactrl script, respectively.
A server status of "inactive" may indicate a configuration error.
Please check the log file (by default named
- ``[kea-install-dir]/var/log/kea/kea-dhcp4.log``,
- ``[kea-install-dir]/var/log/kea/kea-dhcp6.log``,
- ``[kea-install-dir]/var/log/kea/kea-ddns.log``, or
- ``[kea-install-dir]/var/log/kea/kea-ctrl-agent.log``) for the details of
+ ``"[kea-install-dir]/var/log/kea/kea-dhcp4.log"``,
+ ``"[kea-install-dir]/var/log/kea/kea-dhcp6.log"``,
+ ``"[kea-install-dir]/var/log/kea/kea-ddns.log"``, or
+ ``"[kea-install-dir]/var/log/kea/kea-ctrl-agent.log"``) for the details of
any errors.
4. If the server has started successfully, test that it is
omit the path portion from ``filename``. Same restriction also applies to
writing cache file using ``cache-write`` command. For ease of use in
specifying a custom file name simply omit the path portion from ``filename``.
+ The ``KEA_DHCP_DATA_DIR`` environment variable is also used to change the default
+ location for the generated DHCPv6 server identifier file (kea-dhcp6-serverid).
Limiting Application Permissions
--------------------------------
+-------------------------------------+---------------------------------------+-------------------------------+
| Lease Files | ``var/lib/kea`` | ``KEA_DHCP_DATA_DIR`` |
+-------------------------------------+---------------------------------------+-------------------------------+
+| DHCPv6 Server Identifier File | ``var/lib/kea`` | ``KEA_DHCP_DATA_DIR`` |
++-------------------------------------+---------------------------------------+-------------------------------+
| Log Files | ``var/log/kea`` | ``KEA_LOG_FILE_DIR`` |
+-------------------------------------+---------------------------------------+-------------------------------+
| Forensic Log Files | ``var/log/kea`` | ``KEA_LEGAL_LOG_DIR`` |
+-------------------------------------+---------------------------------------+-------------------------------+
| Unix Sockets | ``var/run/kea`` | ``KEA_CONTROL_SOCKET_DIR`` |
+-------------------------------------+---------------------------------------+-------------------------------+
-| Scripts used by hook libraries | ``share/kea/scripts/`` | ``KEA_HOOK_SCRIPTS_PATH`` |
+| Scripts Used By Hook Libraries | ``share/kea/scripts/`` | ``KEA_HOOK_SCRIPTS_PATH`` |
+-------------------------------------+---------------------------------------+-------------------------------+
.. note:
Depending on the user's requirements, not all of the available servers need be run.
The ``keactrl`` configuration file specifies which servers are enabled and which
are disabled. By default the configuration file is
-``[kea-install-dir]/etc/kea/keactrl.conf``.
+``"[kea-install-dir]/etc/kea/keactrl.conf"``.
See the Kea Administrator Reference Manual for documentation of the
parameters in the ``keactrl`` configuration file.
``-c|--ctrl-config keactrl-config-file``
Specifies the ``keactrl`` configuration file. Without this switch,
``keactrl`` uses the file
- ``[kea-install-dir]/etc/kea/keactrl.conf``.
+ ``"[kea-install-dir]/etc/kea/keactrl.conf"``.
``-s|--server server[,server,...]``
Specifies a subset of the enabled servers to which the command should
///
/// @todo: Unfortunately, we have this test disabled, because all loaded
/// configs use memfile, which attempts to create lease file in
-/// /usr/local/var/lib/kea/kea-leases4.csv. We have couple options here:
+/// /var/lib/kea/kea-leases4.csv. We have couple options here:
/// a) disable persistence in example configs - a very bad thing to do
/// as users will forget to reenable it and then will be surprised when their
/// leases disappear