2019-06-06 18:25:46 +02:00
|
|
|
.. _quickstart:
|
|
|
|
|
2019-06-17 17:20:36 -04:00
|
|
|
***********
|
|
|
|
Quick Start
|
|
|
|
***********
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
This section describes the basic steps needed to get Kea up and running.
|
|
|
|
For further details, full customizations, and troubleshooting, see the
|
2019-06-28 17:57:37 -04:00
|
|
|
respective chapters elsewhere in this Kea Administrator Reference Manual (ARM).
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2020-03-20 17:53:08 +01:00
|
|
|
.. _quick-start-tarball:
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
Quick Start Guide Using tarball
|
2020-11-20 16:54:00 +02:00
|
|
|
===============================
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2021-12-13 15:59:07 +00:00
|
|
|
1. Install required runtime and build dependencies. See
|
2019-06-20 08:37:00 -04:00
|
|
|
:ref:`build-requirements` for details.
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
2. Download the Kea source tarball from
|
|
|
|
`the ISC.org downloads page <https://www.isc.org/download/>`__ or
|
|
|
|
`the ISC downloads site <https://downloads.isc.org/isc/kea/>`__ or
|
|
|
|
`the ISC Cloudsmith page <https://cloudsmith.io/~isc/packages/?q=format%3Araw>`__.
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
3. Extract the tarball. For example:
|
|
|
|
|
2019-07-19 09:03:47 +02:00
|
|
|
.. parsed-literal::
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2020-11-14 00:00:37 +00:00
|
|
|
$ tar -xvzf kea-|release|.tar.gz
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
4. Go into the source directory and run the configure script:
|
|
|
|
|
2019-07-19 09:03:47 +02:00
|
|
|
.. parsed-literal::
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
$ cd kea-|release|
|
2019-06-06 18:25:46 +02:00
|
|
|
$ ./configure [your extra parameters]
|
|
|
|
|
|
|
|
5. Build it:
|
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
$ make
|
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
6. Install it (by default it will be placed in ``/usr/local/``, so
|
|
|
|
root privileges are likely required for this step):
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2020-03-20 17:53:08 +01:00
|
|
|
$ make install
|
|
|
|
|
|
|
|
.. _quick-start-repo:
|
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
Quick Start Guide Using Native Packages
|
2020-03-20 17:53:08 +01:00
|
|
|
=======================================
|
|
|
|
|
2021-12-15 18:16:09 +02:00
|
|
|
ISC provides native Alpine, deb, and RPM packages, which make Kea installation
|
2021-12-14 21:14:41 +02:00
|
|
|
much easier. Unless specific compilation options are desired, it is usually
|
|
|
|
easier to install Kea using native packages.
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
1. Go to `Kea on cloudsmith.io <https://cloudsmith.io/~isc/repos/>`__.
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
2. Choose the Cloudsmith repository e.g. |cloudsmith_repo| for Kea |version|.
|
|
|
|
|
|
|
|
3. Click on the arrow besides the ``Set Me Up`` button and select your OS flavor
|
|
|
|
out of: ``Alpine``, ``Debian``, ``RedHat``.
|
|
|
|
|
|
|
|
4. Follow the instructions written there.
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2022-10-17 13:04:08 -07:00
|
|
|
.. note::
|
2023-10-10 18:23:10 +03:00
|
|
|
For example, the Debian setup instructions for Kea 2.4 can be found here:
|
|
|
|
https://cloudsmith.io/~isc/repos/kea-2-4/setup/#formats-deb
|
2022-10-17 13:04:08 -07:00
|
|
|
|
2023-04-07 15:12:25 +00:00
|
|
|
The dropdown near the top of the page offers instructions for
|
|
|
|
other operating systems.
|
2022-10-17 13:04:08 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
5. Kea is split into various packages. The entire list is available on the
|
|
|
|
Cloudsmith repository page under ``Packages``, or it can be retrieved
|
|
|
|
using ``apk``/``apt``/``dnf``.
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tabs::
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tab:: Debian/Ubuntu
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
$ apt search isc-kea
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. note::
|
|
|
|
``isc-kea-dhcp4-server`` and ``isc-kea-dhcp6-server`` are empty
|
|
|
|
transitional packages. The working server packages are
|
|
|
|
``isc-kea-dhcp4`` and ``isc-kea-dhcp6``.
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tab:: Fedora/RedHat
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
$ dnf search 'isc-kea*'
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tab:: Alpine
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
$ apk search isc-kea
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
6. Install the metapackage containing all the tools, libraries, servers,
|
|
|
|
documentation, and open source hooks:
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tabs::
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tab:: Debian/Ubuntu
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
$ sudo apt install isc-kea
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tab:: Fedora/RedHat
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
$ sudo dnf install isc-kea
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tab:: Alpine
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
# apk add isc-kea
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
or specific packages:
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tabs::
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tab:: Debian/Ubuntu
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
$ sudo apt install isc-kea-dhcp6
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. tab:: Fedora/RedHat
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
$ sudo dnf install isc-kea-dhcp6
|
|
|
|
|
|
|
|
.. tab:: Alpine
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ apk add isc-kea-dhcp6
|
|
|
|
|
|
|
|
or every single Kea-related package, including development headers, debug
|
|
|
|
symbols, and premium hooks (if available):
|
|
|
|
|
|
|
|
.. tabs::
|
|
|
|
|
|
|
|
.. tab:: Debian/Ubuntu
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ sudo apt install 'isc-kea*'
|
|
|
|
|
|
|
|
.. tab:: Fedora/RedHat
|
2022-10-12 12:33:59 -07:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
.. code-block:: console
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
$ sudo dnf install 'isc-kea*'
|
|
|
|
|
|
|
|
.. tab:: Alpine
|
|
|
|
|
|
|
|
Installing packages via globbing (``*``) is not available for Alpine,
|
|
|
|
but it can be simulated with the following command:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# apk search isc-kea | sed 's/-[0-9].*//g' | xargs apk add
|
|
|
|
|
|
|
|
or all packages with a specified version number:
|
|
|
|
|
|
|
|
.. tabs::
|
|
|
|
|
|
|
|
.. tab:: Debian/Ubuntu
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ sudo apt install 'isc-kea*=2.4.0-isc20230921141113'
|
|
|
|
|
|
|
|
.. tab:: Fedora/RedHat
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ sudo dnf install 'isc-kea*2.4.0-isc20230921141113*'
|
|
|
|
|
|
|
|
.. tab:: Alpine
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
Installing packages via globbing (``*``) is not available for Alpine,
|
|
|
|
but it can be simulated with the following command:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# apk search isc-kea | sed 's/-[0-9].*//g' | grep r20230921141113 | xargs apk add
|
|
|
|
|
|
|
|
8. All installed packages should be now available directly.
|
|
|
|
|
|
|
|
You can start a server up manually:
|
2020-03-20 17:53:08 +01:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
# kea-dhcp6 -c /etc/kea/kea-dhcp6.conf
|
2020-03-20 17:53:08 +01:00
|
|
|
|
|
|
|
or using systemd:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2022-10-12 12:33:59 -07:00
|
|
|
# systemctl restart kea-dhcp6
|
|
|
|
|
|
|
|
or using OpenRC on Alpine:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# service kea-dhcp6 restart
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2022-10-12 13:26:44 -07:00
|
|
|
.. note::
|
2023-06-06 13:43:11 +03:00
|
|
|
:iscman:`keactrl` is not available in packages, as similar functionality is provided
|
2022-10-12 13:26:44 -07:00
|
|
|
by the native systemctl scripts.
|
2020-03-20 17:53:08 +01:00
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
9. On Debian/Ubuntu systems, the service is enabled at boot time automatically
|
|
|
|
when the package is installed. On Fedora/RHEL and Alpine, the service is not
|
|
|
|
enabled automatically, so, if desired, it must be enabled manually.
|
|
|
|
|
|
|
|
With systemd on Fedora/RedHat:
|
2022-10-12 12:33:59 -07:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# systemctl enable kea-dhcp6
|
|
|
|
|
2023-10-10 18:23:10 +03:00
|
|
|
With OpenRC on Alpine:
|
2022-10-12 12:33:59 -07:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
# rc-update add kea-dhcp6
|
|
|
|
|
2020-03-20 17:53:08 +01:00
|
|
|
.. _quick-start-services:
|
|
|
|
|
|
|
|
Quick Start Guide for DHCPv4 and DHCPv6 Services
|
|
|
|
================================================
|
2023-10-10 18:23:10 +03:00
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
1. Edit the Kea configuration files, which by default are installed in
|
2019-06-06 18:25:46 +02:00
|
|
|
the ``[kea-install-dir]/etc/kea/`` directory. These are:
|
|
|
|
``kea-dhcp4.conf``, ``kea-dhcp6.conf``, ``kea-dhcp-ddns.conf`` and
|
2020-11-20 16:54:00 +02:00
|
|
|
``kea-ctrl-agent.conf``, ``keactrl.conf`` for DHCPv4 server, DHCPv6 server,
|
2021-09-09 15:28:58 +00:00
|
|
|
D2, Control Agent, and the keactrl script, respectively.
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
2. To start the DHCPv4 server in the background, run the
|
2019-06-06 18:25:46 +02:00
|
|
|
following command (as root):
|
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
# keactrl start -s dhcp4
|
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
Or run the following command to start the DHCPv6 server:
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
# keactrl start -s dhcp6
|
|
|
|
|
|
|
|
Note that it is also possible to start all servers simultaneously:
|
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
# keactrl start
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2020-03-20 17:53:08 +01:00
|
|
|
3. Verify that the Kea server(s) is/are running:
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
# keactrl status
|
|
|
|
|
|
|
|
A server status of "inactive" may indicate a configuration error.
|
|
|
|
Please check the log file (by default named
|
2019-07-18 13:13:59 +02:00
|
|
|
``[kea-install-dir]/var/log/kea-dhcp4.log``,
|
|
|
|
``[kea-install-dir]/var/log/kea-dhcp6.log``,
|
2021-09-09 15:28:58 +00:00
|
|
|
``[kea-install-dir]/var/log/kea-ddns.log``, or
|
2019-07-18 13:13:59 +02:00
|
|
|
``[kea-install-dir]/var/log/kea-ctrl-agent.log``) for the details of
|
2021-09-09 15:28:58 +00:00
|
|
|
any errors.
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
4. If the server has started successfully, test that it is
|
2019-06-06 18:25:46 +02:00
|
|
|
responding to DHCP queries and that the client receives a
|
2019-06-20 17:08:06 -04:00
|
|
|
configuration from the server; for example, use the `ISC DHCP
|
|
|
|
client <https://www.isc.org/download/>`__.
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
5. To stop running the server(s):
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
# keactrl stop
|
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
For system-specific instructions, please read the
|
2019-06-20 17:08:06 -04:00
|
|
|
`system-specific notes <https://kb.isc.org/docs/installing-kea>`__,
|
2019-06-28 17:57:37 -04:00
|
|
|
available in the Kea section of `ISC's
|
2019-06-20 17:08:06 -04:00
|
|
|
Knowledgebase <https://kb.isc.org/docs>`__.
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2023-06-06 13:43:11 +03:00
|
|
|
The details of :iscman:`keactrl` script usage can be found in :ref:`keactrl`.
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
Once Kea services are up and running, consider deploying a dashboard solution
|
|
|
|
to monitor running services. For more details, see :ref:`stork`.
|
2020-04-24 12:24:56 +02:00
|
|
|
|
2019-06-06 18:25:46 +02:00
|
|
|
.. _quick-start-direct-run:
|
|
|
|
|
2019-06-17 17:20:36 -04:00
|
|
|
Running the Kea Servers Directly
|
|
|
|
================================
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-06-17 11:03:56 -04:00
|
|
|
The Kea servers can be started directly, without the need to use
|
2023-06-06 13:43:11 +03:00
|
|
|
:iscman:`keactrl` or ``systemctl``. To start the DHCPv4 server run the following command:
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
# kea-dhcp4 -c /path/to/your/kea4/config/file.json
|
|
|
|
|
2021-09-09 15:28:58 +00:00
|
|
|
Similarly, to start the DHCPv6 server, run the following command:
|
2019-06-06 18:25:46 +02:00
|
|
|
|
2019-07-15 08:32:02 +02:00
|
|
|
.. code-block:: console
|
2019-06-06 18:25:46 +02:00
|
|
|
|
|
|
|
# kea-dhcp6 -c /path/to/your/kea6/config/file.json
|