]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1842] document overlapping pools and subnets
authorAndrei Pavel <andrei@isc.org>
Mon, 4 Apr 2022 13:34:14 +0000 (16:34 +0300)
committerTomek Mrugalski <tomek@isc.org>
Mon, 25 Apr 2022 13:00:37 +0000 (13:00 +0000)
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
src/lib/dhcpsrv/subnet.h

index 9feabe94a7ab9d7fb5f0857307275dec8c8a1e5a..be5f90ed62ba02460b6d2acf7424283abf2cfdc7 100644 (file)
@@ -1231,6 +1231,26 @@ address) address from that pool. In the aforementioned example of pool
 assigned as well. This may be invalid in some network configurations. To
 avoid this, use the ``min-max`` notation.
 
+.. note::
+
+    Here are some liberties and limits to the values that subnets and pools can
+    take in Kea configurations that are out of the ordinary:
+
+    +-------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Kea configuration case                                      | Result        | Comment                                                                        |
+    +=============================================================+===============+================================================================================+
+    | Overlapping subnets                                         | Allowed       | Administrator consideration needs to be given to how clients are matched to    |
+    |                                                             |               | these subnets.                                                                 |
+    +-------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Overlapping pools in one subnet                             | Startup error | DHCP4_PARSER_FAIL                                                              |
+    +-------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Overlapping address pools in different subnets              | Allowed       | Can act as a substitute for a global pool mechanic. When assigning leases from |
+    |                                                             |               | one pool, Kea correctly excludes leases given under any pool that overlaps     |
+    |                                                             |               | with it such that no lease is given twice.                                     |
+    +-------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Pools that are outside the subnet they are configured under | Startup error | DHCP4_PARSER_FAIL                                                              |
+    +-------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+
 .. _dhcp4-t1-t2-times:
 
 Sending T1 (Option 58) and T2 (Option 59)
index b58e3fb2434ec3316f4268bae4908cc7e3c241c2..41d9ef9e886091e1c5ab88bf258a9e42768daa33 100644 (file)
@@ -1142,6 +1142,34 @@ and which is delegated a prefix from this pool.
        ]
    }
 
+.. note::
+
+    Here are some liberties and limits to the values that subnets and pools can
+    take in Kea configurations that are out of the ordinary:
+
+    +-------------------------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Kea configuration case                                                        | Result        | Comment                                                                        |
+    +===============================================================================+===============+================================================================================+
+    | Overlapping subnets                                                           | Allowed       | Administrator consideration needs to be given to how clients are matched to    |
+    |                                                                               |               | these subnets.                                                                 |
+    +-------------------------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Overlapping address pools in one subnet                                       | Startup error | DHCP6_PARSER_FAIL                                                              |
+    +-------------------------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Overlapping address pools in different subnets                                | Allowed       | Can act as a substitute for a global pool mechanic. When assigning leases from |
+    |                                                                               |               | one pool, Kea correctly excludes leases given under any pool that overlaps     |
+    |                                                                               |               | with it such that no lease is given twice.                                     |
+    +-------------------------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Address pools that are outside the subnet they are configured under           | Startup error | DHCP6_PARSER_FAIL                                                              |
+    +-------------------------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Overlapping prefix delegation pools in one subnet                             | Startup error | DHCP6_PARSER_FAIL                                                              |
+    +-------------------------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Overlapping prefix delegation pools in different subnets                      | Allowed       | Can act as a substitute for a global pool mechanic. When assigning leases from |
+    |                                                                               |               | one pool, Kea correctly excludes leases given under any pool that overlaps     |
+    |                                                                               |               | with it such that no lease is given twice.                                     |
+    +-------------------------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+    | Prefix delegation pools that are outside the subnet they are configured under | Allowed       |                                                                                |
+    +-------------------------------------------------------------------------------+---------------+--------------------------------------------------------------------------------+
+
 .. _dhcp6-std-options:
 
 Standard DHCPv6 Options
index 2807bd213adc6ffbc1d06b8e9900fa0dc1c68e9e..6fe9f13e404563cfc4054dd762ee021d5e5bbc41 100644 (file)
@@ -146,10 +146,9 @@ public:
     ///
     /// @param pool pool to be added
     ///
-    /// @throw isc::BadValue if the pool type is invalid, the pool
-    /// is not an IA_PD pool and the address range of this pool does not
-    /// match the subnet prefix, or the pool overlaps with an existing pool
-    /// within the subnet.
+    /// @throw isc::BadValue if the pool type is invalid, in the case of address
+    /// pools if the address range of the pool does not match the subnet prefix,
+    /// or if the pool overlaps with an existing pool within the subnet.
     void addPool(const PoolPtr& pool);
 
     /// @brief Deletes all pools of specified type.