2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-02 06:55:16 +00:00

[#225] Updated arm

doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp4-srv.rst
    updated DDNS parameter doc

Added a ChangeLog entry
This commit is contained in:
Thomas Markwalder
2023-03-21 14:59:52 -04:00
parent 904f4d2611
commit 1880494948
5 changed files with 43 additions and 21 deletions

View File

@@ -1,3 +1,9 @@
2119. [func] tmark
Added a new parameter, ddns-ttl-percent, to kea-dhcp4
and kea-dhcp6, that may be used to calculate DNS TTL
as a simple percentage of the lease life time.
(Gitlab #225)
2118. [bug] razvan 2118. [bug] razvan
Fixed a bug which was changing the multi-threading settings when Fixed a bug which was changing the multi-threading settings when
running config-test command and the settings were different from running config-test command and the settings were different from

View File

@@ -776,7 +776,7 @@
"ddns-use-conflict-resolution": true, "ddns-use-conflict-resolution": true,
// Shared network level value. See description at the global level. // Shared network level value. See description at the global level.
"ddns-ttl-percent": 0.75, "ddns-ttl-percent": 0.65,
// Shared network level value. See description at the global level. // Shared network level value. See description at the global level.
"hostname-char-replacement": "x", "hostname-char-replacement": "x",
@@ -918,7 +918,7 @@
"ddns-use-conflict-resolution": true, "ddns-use-conflict-resolution": true,
// Subnet level value. See description at the global level. // Subnet level value. See description at the global level.
"ddns-ttl-percent": 0.75, "ddns-ttl-percent": 0.55,
// Subnet level value. See description at the global level. // Subnet level value. See description at the global level.
"hostname-char-replacement": "x", "hostname-char-replacement": "x",

View File

@@ -3369,6 +3369,7 @@ DDNS-related parameters are split into two groups:
- ``ddns-qualifying-suffix`` - ``ddns-qualifying-suffix``
- ``ddns-update-on-renew`` - ``ddns-update-on-renew``
- ``ddns-use-conflict-resolution`` - ``ddns-use-conflict-resolution``
- ``ddns-ttl-percent``
- ``hostname-char-set`` - ``hostname-char-set``
- ``hostname-char-replacement`` - ``hostname-char-replacement``
@@ -3408,6 +3409,7 @@ The default configuration and values would appear as follows:
"ddns-qualifying-suffix": "", "ddns-qualifying-suffix": "",
"ddns-update-on-renew": false, "ddns-update-on-renew": false,
"ddns-use-conflict-resolution": true, "ddns-use-conflict-resolution": true,
"ddns-ttl-percent": 0.75,
"hostname-char-set": "", "hostname-char-set": "",
"hostname-char-replacement": "" "hostname-char-replacement": ""
... ...
@@ -3492,14 +3494,18 @@ conflict with existing entries owned by other DHCPv4 clients.
reassigning either FQDNs or IP addresses. Doing so causes ``kea-dhcp4`` reassigning either FQDNs or IP addresses. Doing so causes ``kea-dhcp4``
to generate DNS removal requests to D2. to generate DNS removal requests to D2.
.. note:: The DNS entries Kea creates contain a value for TTL (time to live). Since
Kea 1.9.3, ``kea-dhcp4`` calculates that value based on
`RFC 4702, Section 5 <https://tools.ietf.org/html/rfc4702#section-5>`__,
which suggests that the TTL value be 1/3 of the lease's lifetime, with
a minimum value of 10 minutes. In earlier versions, the server set the
TTL value equal to the lease's valid lifetime.
The DNS entries Kea creates contain a value for TTL (time to live). Since Kea 2.3.6 adds a new parameter, ``ddns-ttl-percent``. When specified
Kea 1.9.3, ``kea-dhcp4`` calculates that value based on it causes the TTL to be calculated as a simple percentage of the lease's
`RFC 4702, Section 5 <https://tools.ietf.org/html/rfc4702#section-5>`__, life time, using the parameter's value as the percentage. It is specified
which suggests that the TTL value be 1/3 of the lease's lifetime, with as a decimal percent (e.g. .25, .75, 1.00) and may be specified at the
a minimum value of 10 minutes. In earlier versions, the server set the TTL value global, shared-network, and subnet levels. By default it is unspecified.
equal to the lease's valid lifetime.
.. _dhcpv4-d2-io-config: .. _dhcpv4-d2-io-config:

View File

@@ -2952,6 +2952,7 @@ DDNS-related parameters are split into two groups:
- ``ddns-qualifying-suffix`` - ``ddns-qualifying-suffix``
- ``ddns-update-on-renew`` - ``ddns-update-on-renew``
- ``ddns-use-conflict-resolution`` - ``ddns-use-conflict-resolution``
- ``ddns-ttl-percent``
- ``hostname-char-set`` - ``hostname-char-set``
- ``hostname-char-replacement`` - ``hostname-char-replacement``
@@ -2991,6 +2992,7 @@ The default configuration and values would appear as follows:
"ddns-qualifying-suffix": "", "ddns-qualifying-suffix": "",
"ddns-update-on-renew": false, "ddns-update-on-renew": false,
"ddns-use-conflict-resolution": true, "ddns-use-conflict-resolution": true,
"ddns-ttl-percent": 0.75,
"hostname-char-set": "", "hostname-char-set": "",
"hostname-char-replacement": "" "hostname-char-replacement": ""
... ...
@@ -3075,14 +3077,18 @@ conflict with existing entries owned by other DHCPv6 clients.
reassigning either FQDNs or IP addresses. Doing so causes ``kea-dhcp6`` reassigning either FQDNs or IP addresses. Doing so causes ``kea-dhcp6``
to generate DNS removal requests to D2. to generate DNS removal requests to D2.
.. note:: The DNS entries Kea creates contain a value for TTL (time to live). Since
Kea 1.9.3, ``kea-dhcp6`` calculates that value based on
`RFC 4702, Section 5 <https://tools.ietf.org/html/rfc4702#section-5>`__,
which suggests that the TTL value be 1/3 of the lease's lifetime, with
a minimum value of 10 minutes. In earlier versions, the server set the
TTL value equal to the lease's valid lifetime.
The DNS entries Kea creates contain a value for TTL (time to live). Since Kea 2.3.6 adds a new parameter, ``ddns-ttl-percent``. When specified
Kea 1.9.3, ``kea-dhcp6`` calculates that value based on it causes the TTL to be calculated as a simple percentage of the lease's
`RFC 4702, Section 5 <https://tools.ietf.org/html/rfc4702#section-5>`__, life time, using the parameter's value as the percentage. It is specified
which suggests that the TTL value be 1/3 of the lease's lifetime, with as a decimal percent (e.g. .25, .75, 1.00) and may be specified at the
a minimum value of 10 minutes. In earlier versions, the server set the TTL value global, shared-network, and subnet levels. By default it is unspecified.
equal to the lease's valid lifetime.
.. _dhcpv6-d2-io-config: .. _dhcpv6-d2-io-config:

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2015-2021 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2015-2023 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -44,13 +44,17 @@ void queueNCR(const dhcp_ddns::NameChangeType& chg_type, const Lease6Ptr& lease)
/// @brief Calculates TTL for a DNS resource record based on lease life time. /// @brief Calculates TTL for a DNS resource record based on lease life time.
/// ///
/// Per RFC 4702 Section 5, the RR TTL should be calculated as: /// If the parameter, ddns_ttl_percent is greater than zero, it is used to calculate
/// the TTL directly:
///
/// TTL = (lease life time * ddns-ttl-percent)
///
/// Otherwise it is calculated as per RFC 4702 Section 5:
///
/// TTL = ((lease life time / 3) < 10 minutes) ? 10 minutes : (lease life time / 3) /// TTL = ((lease life time / 3) < 10 minutes) ? 10 minutes : (lease life time / 3)
/// ///
/// This function may be expanded in the future to support configurable
/// parameters.
///
/// @param lease_life_time valid life time of the lease /// @param lease_life_time valid life time of the lease
/// @param ddns_ttl_percent optional percentage to use in calculation
/// ///
/// @return the calculated TTL. /// @return the calculated TTL.
uint32_t calculateDdnsTtl(uint32_t lease_life_time, uint32_t calculateDdnsTtl(uint32_t lease_life_time,