diff options
Diffstat (limited to 'doc/sphinx/arm')
-rw-r--r-- | doc/sphinx/arm/dhcp4-srv.rst | 61 | ||||
-rw-r--r-- | doc/sphinx/arm/dhcp6-srv.rst | 59 |
2 files changed, 120 insertions, 0 deletions
diff --git a/doc/sphinx/arm/dhcp4-srv.rst b/doc/sphinx/arm/dhcp4-srv.rst index 214c44bbc9..a2f021a0b5 100644 --- a/doc/sphinx/arm/dhcp4-srv.rst +++ b/doc/sphinx/arm/dhcp4-srv.rst @@ -3994,6 +3994,63 @@ enable the option for the whole subnet, the following configuration can be used: } ], +Lease Caching +------------- + +Clients that attempt renewal frequently can cause the server to update +and write the database frequently resulting in a performance impact on +the server. The cache parameters instructs the DHCP server to avoid +updating leases too frequently thus avoiding this behavior. Instead +the server assigns the same lease (i.e. reuses it) with no +modifications except for CLTT (Client Last Transmission Time) +which does not require disk operations. + +The two parameters are the ``cache-threshold`` double and the +``cache-max-age`` integer and have no default, i.e. the lease caching +feature must be explicitly enabled. These parameters can be configured +at the global, shared network and subnet levels. The subnet level has +the precedence on the shared network level, the global level is used +as last resort. For example: + +:: + + "subnet4": [ + { + "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ], + "subnet": "192.0.2.0/24", + "cache-threshold": .25, + "cache-max-age": 600, + "valid-lifetime": 2000, + ... + } + ], + +When an already assigned lease can fulfill a client query: + + - any important change e.g. for DDNS parameter, hostname or + valid lifetime reduction makes the lease not reusable + + - lease age i.e. the difference between the creation or last modification + time and the current time is computed (elapsed duration) + + - if the ``cache-max-age`` is configured, it is compared with the age + and too old leases are not reusable (this means that the value 0 + for ``cache-max-age`` disables the lease cache feature) + + - if the ``cache-threshold`` is configured and is between 0. and 1. + it expresses the percentage of the lease valid lifetime which is + allowed for the lease age. Values below and including 0. and + values greater than 1. disables the lease cache feature. + +In the example a lease with a valid lifetime of 2000 seconds can be +reused if it was committed less than 500 seconds ago. With a lifetime +of 3000 seconds the maximum age of 600 seconds applies. + +In responses the ``dhcp-lease-time`` option is set to the remaining +valid lifetime i.e. the expiration date does not change. Other options +based on the valid lifetime e.g. ``dhcp-renewal-time`` and +``dhcp-rebinding-time`` also use the remaining lifetime. + .. _host-reservation-v4: Host Reservation in DHCPv4 @@ -6749,6 +6806,10 @@ used by all servers connecting to the configuration database. +-----------------------------+----------------------------+-------------+-------------+-------------+ | boot-file-name | yes | yes | yes | n/a | +-----------------------------+----------------------------+-------------+-------------+-------------+ + | cache-max-age | yes | todo | todo | n/a | + +-----------------------------+----------------------------+-------------+-------------+-------------+ + | cache-threshold | yes | todo | todo | n/a | + +-----------------------------+----------------------------+-------------+-------------+-------------+ | calculate-tee-times | yes | yes | yes | n/a | +-----------------------------+----------------------------+-------------+-------------+-------------+ | client-class | n/a | yes | yes | yes | diff --git a/doc/sphinx/arm/dhcp6-srv.rst b/doc/sphinx/arm/dhcp6-srv.rst index efdb8310d7..1268a63f57 100644 --- a/doc/sphinx/arm/dhcp6-srv.rst +++ b/doc/sphinx/arm/dhcp6-srv.rst @@ -3467,6 +3467,61 @@ Our tests reported best results when: storing leases. In our case it's 11 * 6 = 66. +Lease Caching +------------- + +Clients that attempt renewal frequently can cause the server to update +and write the database frequently resulting in a performance impact on +the server. The cache parameters instructs the DHCP server to avoid +updating leases too frequently thus avoiding this behavior. Instead +the server assigns the same lease (i.e. reuses it) with no +modifications except for CLTT (Client Last Transmission Time) +which does not require disk operations. + +The two parameters are the ``cache-threshold`` double and the +``cache-max-age`` integer and have no default, i.e. the lease caching +feature must be explicitly enabled. These parameters can be configured +at the global, shared network and subnet levels. The subnet level has +the precedence on the shared network level, the global level is used +as last resort. For example: + +:: + + "subnet6": [ + { + "subnet": "2001:db8:1:1::/64", + "pools": [ { "pool": "2001:db8:1:1::1:0/112" } ], + "cache-threshold": .25, + "cache-max-age": 600, + "valid-lifetime": 2000, + ... + } + ], + +When an already assigned lease can fulfill a client query: + + - any important change e.g. for DDNS parameter, hostname, or + preferred or valid lifetime reduction makes the lease not reusable + + - lease age i.e. the difference between the creation or last modification + time and the current time is computed (elapsed duration) + + - if the ``cache-max-age`` is configured, it is compared with the age + and too old leases are not reusable (this means that the value 0 + for ``cache-max-age`` disables the lease cache feature) + + - if the ``cache-threshold`` is configured and is between 0. and 1. + it expresses the percentage of the lease valid lifetime which is + allowed for the lease age. Values below and including 0. and + values greater than 1. disables the lease cache feature. + +In the example a lease with a valid lifetime of 2000 seconds can be +reused if it was committed less than 500 seconds ago. With a lifetime +of 3000 seconds the maximum age of 600 seconds applies. + +In responses used preferred and valid lifetimes are the remaining +values i.e. the expiration dates do not change. + .. _host-reservation-v6: Host Reservation in DHCPv6 @@ -6731,6 +6786,10 @@ the global DHCPv6 options (``option-data``) are modified using | | | Network | | | Delegation | | | | | | | Pool | +=============================+============================+===========+===========+===========+============+ + | cache-max-age | yes | todo | todo | n/a | n/a | + +-----------------------------+----------------------------+-----------+-----------+-----------+------------+ + | cache-threshold | yes | todo | todo | n/a | n/a | + +-----------------------------+----------------------------+-----------+-----------+-----------+------------+ | calculate-tee-times | yes | yes | yes | n/a | n/a | +-----------------------------+----------------------------+-----------+-----------+-----------+------------+ | client-class | n/a | yes | yes | yes | yes | |