]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2050] Template home power user is now included in the ARM
authorTomek Mrugalski <tomek@isc.org>
Thu, 23 Sep 2021 13:24:33 +0000 (15:24 +0200)
committerTomek Mrugalski <tomek@isc.org>
Fri, 24 Sep 2021 15:24:33 +0000 (17:24 +0200)
doc/examples/template-power-user-home/info.md
doc/sphinx/arm/config-templates.rst [new file with mode: 0644]
doc/sphinx/arm/config.rst

index d0def5699ebf5bc04e1bb4cf478b20599678c87a..19c44407a957c9761712500008c20b3ba392fb0a 100644 (file)
@@ -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 (file)
index 0000000..4182f70
--- /dev/null
@@ -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:
index d21fb671cc1b2626535d8d6a04f38c1cdc971841..5ca752d394832b8d96b941fddbce6732652ad771 100644 (file)
@@ -260,3 +260,6 @@ where the content of "subnets.json" may be:
          "subnet": "10.0.0.0/8"
       }
    ],
+
+
+.. include:: config-templates.rst