summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorTomek Mrugalski <tomek@isc.org>2021-09-23 15:24:33 +0200
committerTomek Mrugalski <tomek@isc.org>2021-09-24 17:24:33 +0200
commitb040a2ba0255747700c955be293f3fa524c7d347 (patch)
tree0e8101da76db807568a991de1a893167e37a0604 /doc
parent[#2050] Makefile.am now covers new examples (diff)
downloadkea-b040a2ba0255747700c955be293f3fa524c7d347.tar.xz
kea-b040a2ba0255747700c955be293f3fa524c7d347.zip
[#2050] Template home power user is now included in the ARM
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/template-power-user-home/info.md29
-rw-r--r--doc/sphinx/arm/config-templates.rst40
-rw-r--r--doc/sphinx/arm/config.rst3
3 files changed, 63 insertions, 9 deletions
diff --git a/doc/examples/template-power-user-home/info.md b/doc/examples/template-power-user-home/info.md
index d0def5699e..19c44407a9 100644
--- a/doc/examples/template-power-user-home/info.md
+++ b/doc/examples/template-power-user-home/info.md
@@ -1,5 +1,5 @@
-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:
@@ -18,16 +18,21 @@ The logical set-up consists of two hosts, each running Kea DHCPv4 server and a C
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
@@ -36,27 +41,33 @@ low maintenance. However, any Linux or FreeBSD is fine. Less popular systems, su
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:
@@ -68,7 +79,7 @@ To deploy this setup, you need to conduct the following steps:
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:
diff --git a/doc/sphinx/arm/config-templates.rst b/doc/sphinx/arm/config-templates.rst
new file mode 100644
index 0000000000..4182f706b9
--- /dev/null
+++ b/doc/sphinx/arm/config-templates.rst
@@ -0,0 +1,40 @@
+.. _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:
diff --git a/doc/sphinx/arm/config.rst b/doc/sphinx/arm/config.rst
index d21fb671cc..5ca752d394 100644
--- a/doc/sphinx/arm/config.rst
+++ b/doc/sphinx/arm/config.rst
@@ -260,3 +260,6 @@ where the content of "subnets.json" may be:
"subnet": "10.0.0.0/8"
}
],
+
+
+.. include:: config-templates.rst