+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
Fixed a bug which was changing the multi-threading settings when
running config-test command and the settings were different from
"ddns-use-conflict-resolution": true,
// 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.
"hostname-char-replacement": "x",
"ddns-use-conflict-resolution": true,
// 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.
"hostname-char-replacement": "x",
- ``ddns-qualifying-suffix``
- ``ddns-update-on-renew``
- ``ddns-use-conflict-resolution``
+ - ``ddns-ttl-percent``
- ``hostname-char-set``
- ``hostname-char-replacement``
"ddns-qualifying-suffix": "",
"ddns-update-on-renew": false,
"ddns-use-conflict-resolution": true,
+ "ddns-ttl-percent": 0.75,
"hostname-char-set": "",
"hostname-char-replacement": ""
...
reassigning either FQDNs or IP addresses. Doing so causes ``kea-dhcp4``
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 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.
+
+Kea 2.3.6 adds a new parameter, ``ddns-ttl-percent``. When specified
+it causes the TTL to be calculated as a simple percentage of the lease's
+life time, using the parameter's value as the percentage. It is specified
+as a decimal percent (e.g. .25, .75, 1.00) and may be specified at the
+global, shared-network, and subnet levels. By default it is unspecified.
.. _dhcpv4-d2-io-config:
- ``ddns-qualifying-suffix``
- ``ddns-update-on-renew``
- ``ddns-use-conflict-resolution``
+ - ``ddns-ttl-percent``
- ``hostname-char-set``
- ``hostname-char-replacement``
"ddns-qualifying-suffix": "",
"ddns-update-on-renew": false,
"ddns-use-conflict-resolution": true,
+ "ddns-ttl-percent": 0.75,
"hostname-char-set": "",
"hostname-char-replacement": ""
...
reassigning either FQDNs or IP addresses. Doing so causes ``kea-dhcp6``
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 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.
+
+Kea 2.3.6 adds a new parameter, ``ddns-ttl-percent``. When specified
+it causes the TTL to be calculated as a simple percentage of the lease's
+life time, using the parameter's value as the percentage. It is specified
+as a decimal percent (e.g. .25, .75, 1.00) and may be specified at the
+global, shared-network, and subnet levels. By default it is unspecified.
.. _dhcpv6-d2-io-config:
-// 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
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// @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:
-/// TTL = ((lease life time / 3) < 10 minutes) ? 10 minutes : (lease life time / 3)
+/// 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)
///
-/// This function may be expanded in the future to support configurable
-/// parameters.
+/// Otherwise it is calculated as per RFC 4702 Section 5:
+///
+/// TTL = ((lease life time / 3) < 10 minutes) ? 10 minutes : (lease life time / 3)
///
/// @param lease_life_time valid life time of the lease
+/// @param ddns_ttl_percent optional percentage to use in calculation
///
/// @return the calculated TTL.
uint32_t calculateDdnsTtl(uint32_t lease_life_time,