From: Andrei Pavel Date: Mon, 4 Apr 2022 13:34:14 +0000 (+0300) Subject: [#1842] document overlapping pools and subnets X-Git-Tag: Kea-2.1.5~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a035f60cf2bd4dab3a4b05effb4f28d42b258c9;p=thirdparty%2Fkea.git [#1842] document overlapping pools and subnets --- diff --git a/doc/sphinx/arm/dhcp4-srv.rst b/doc/sphinx/arm/dhcp4-srv.rst index 9feabe94a7..be5f90ed62 100644 --- a/doc/sphinx/arm/dhcp4-srv.rst +++ b/doc/sphinx/arm/dhcp4-srv.rst @@ -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) diff --git a/doc/sphinx/arm/dhcp6-srv.rst b/doc/sphinx/arm/dhcp6-srv.rst index b58e3fb243..41d9ef9e88 100644 --- a/doc/sphinx/arm/dhcp6-srv.rst +++ b/doc/sphinx/arm/dhcp6-srv.rst @@ -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 diff --git a/src/lib/dhcpsrv/subnet.h b/src/lib/dhcpsrv/subnet.h index 2807bd213a..6fe9f13e40 100644 --- a/src/lib/dhcpsrv/subnet.h +++ b/src/lib/dhcpsrv/subnet.h @@ -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.