-Kea Configuration Template: Home network of a power user
-========================================================
+Template: Home network of a power user
+--------------------------------------
This directory contains template configurations for home network of a power user. It may also be
appropriate for a small office. It makes the following assumptions:
The server connects with the CA using UNIX sockets. Each DHCPv4+CA acts as one partner of the HA
pair.
-```mermaid
-flowchart LR
+.. code-block::
-DHCPv4-1 --UNIX--- CA-1 ==http=== CA-2 --UNIX--- DHCPv4-2
-```
+ +-host-1-+ +-host-2-+
+ | | | |
+ | CA ============= CA | ===== - HTTP connection
+ | # | | # |
+ | # | | # | ##### - UNIX socket
+ | DHCPv4 | | DHCPv4 |
+ | | | |
+ +--------+ +--------+
The CA-1 and CA-2 will each open a TCP port 8000 and will connect to each other.
Deployment Considerations
--------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~
The setup is not expected to be very performant. Most modest hardware will do. There are successful
deployments on Raspberry Pi platforms. If you are running a VM, 2GB ram with one CPU core should
NetBSD should also work in principle, but they are not regularly tested.
The assumption is that there are 2 hosts that will be running the Kea setup:
+
- 192.168.1.2 - primary HA server (active, will handle all the traffic)
+
- 192.168.1.3 - secondary HA server (passive, ready to take over in case the primary fails)
The network is 192.168.1.0/24. It is assumed that 192.168.1.1 is your default router.
-The whole network is split into dynamic and static pools.
+The whole network is split into dynamic and static pools:
+
- 192.168.1.100 - 192.168.1.199 - this is the dynamic pool. When new devices appear in your network,
they will be assigned dynamic addresses from this pool.
- The reservations are done outside of this dynamic range (depending on your addressing preference,
either 192.168.1.1-192.168.1.99 or 192.168.1.200-192.168.1.254).
To deploy this setup, you need to conduct the following steps:
+
1. Install CA and DHCPv4 on host1, copy the config files to the typical locations. It's typically
/etc/kea on Linux and /usr/local/etc/kea on FreeBSD. The files are typically called
kea-ctrl-agent.conf and kea-dhcp4.conf. Please consult your start-up scripts.
+
2. At the very least alter the following to match your setup:
- the interface name which Kea should listen on
- the interface name which is used to access the subnet
- your addressing, if you use something different than 192.168.1.0/24
- tweak your router option
- tweak your DNS option
+
3. If using firewall, make sure the server1 can reach the server2. A nice way to ensure that is to
try to retrieve server2's config from the server1:
and just tweak it a little bit.
Possible extensions
--------------------
+~~~~~~~~~~~~~~~~~~~
The proposed configuration is somewhat basic, but functional. Once your setup is up and running, you
may want to consider the following changes:
--- /dev/null
+.. _config-templates:
+
+Configuration Templates
+=======================
+
+The following sections include configuration templates that are proposed configuration for
+certain deployment types. The example configuration files are also available in the Kea sources
+in the `doc/examples` directory.
+
+.. include:: template-power-user-home.md
+
+At the very least, the lines marked in yellow must be adjusted to match the actual deployment.
+
+Server1's Control Agent configuration file:
+
+.. literalinclude:: template-power-user-home-ca-1.conf
+ :language: javascript
+ :emphasize-lines: 8
+ :linenos:
+
+Server1's DHCPv4 configuration file:
+
+.. literalinclude:: template-power-user-home-dhcp4-1.conf
+ :language: javascript
+ :emphasize-lines: 25,120,132,146,150,153-157,165-179,189-198
+ :linenos:
+
+Server2's Control Agent configuration file:
+
+.. literalinclude:: template-power-user-home-ca-2.conf
+ :language: javascript
+ :emphasize-lines: 8
+ :linenos:
+
+Server2's DHCPv4 configuration file:
+
+.. literalinclude:: template-power-user-home-dhcp4-2.conf
+ :language: javascript
+ :emphasize-lines: 25,120,132,146,150,153-157,165-179,189-198
+ :linenos: