Commit 4ac6e5b9 authored by Thomas Markwalder's avatar Thomas Markwalder

[#35,!517] Updated ARM and example confings

Updated:
    doc/examples/kea4/all-keys.json
    doc/examples/kea4/with-ddns.json
    doc/examples/kea6/all-keys.json
    doc/sphinx/arm/dhcp4-srv.rst
    doc/sphinx/arm/dhcp6-srv.rst

Added ChangeLogEntry
parent 1f60cb9d
1669. [func] tmark
Rather than within the 'dhcp-ddns' section, DDNS behavioral
parameters may now be specifed at global, shared-network,
and subnet scopes. Implemented for both kea-dhcp4 and
kea-dhcp6. Not yet supported by Config Backend or Netconf.
(Gitlab #35,!517, git TBD)
1668. [build] fdupont
The Kea util thread library was removed.
(Gitlab #907,!519, git 1b27dc52aae23753643461086f0950b125bf9c93)
......
......@@ -98,6 +98,46 @@
"socket-type": "unix"
},
// Specifies a prefix to be prepended to the generated Client FQDN.
"ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never",
// Boolean flag which enables or disables the DDNS updating. It
// defaults to true. It may be specified at the global, shared-
// network and subnet levels. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns..
"ddns-send-updates": true,
// Time in seconds specifying how long a declined lease should be
// excluded from DHCP assignments. The default value is 24 hours.
"decline-probation-period": 86400,
......@@ -106,23 +146,11 @@
// NCRs are sent to Kea D2 module to update DNS upon allocation of the
// DHCP leases.
"dhcp-ddns": {
// Boolean flag indicating if Kea DHCPv4 server must generate NCRs.
// By default NCRs are not generated.
// Boolean flag indicating if Kea DHCPv4 server should connect to
// kea-dhcp-ddns. This must be true for NCRs to be created and
// sent to kea-dhcp-ddns. By default NCRs are not generated.
"enable-updates": false,
// Specifies a prefix to be prepended to the generated Client FQDN.
"generated-prefix": "myhost",
// String of zero or more characters with which to replace each
// invalid character in the hostname or Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x",
// Regular expression describing the invalid character set in
// the hostname or Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]",
// Specifies maximum number of NCRs to queue waiting to be sent
// to Kea D2 server.
"max-queue-size": 1024,
......@@ -135,36 +163,6 @@
// only UDP is supported.
"ncr-protocol": "UDP",
// Boolean flag indicating that server should ignore DHCP client
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"override-client-update": false,
// Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no
// suffix is appended.
"qualifying-suffix": "",
// Enumeration specifying whether the server should honor
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"replace-client-name": "never",
// IP address that Kea DHCPv4 server should use to send
// NCRs to D2. Default value of zero indicates that Kea
// should pick suitable address.
......@@ -522,6 +520,55 @@
// empty string is provided, no restriction is applied.
"client-class": "",
// Specifies a prefix to be prepended to the generated Client FQDN.
"ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never",
// Boolean flag which enables or disables DDNS updating for
// subnets in this network. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns. The default value is "true".
"ddns-send-updates": true,
// String of zero or more characters with which to replace each
// invalid character in the hostname or Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x",
// Regular expression describing the invalid character set in
// the hostname or Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]",
// Specifies that this shared network is selected for the
// requests received on the particular interface.
"interface": "ethX",
......@@ -593,6 +640,55 @@
// provided, no restriction is applied.
"client-class": "",
// Specifies a prefix to be prepended to the generated Client FQDN.
"ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never",
// Boolean flag which enables or disables DDNS updating for
// subnets in this network. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns. The default value is "true".
"ddns-send-updates": true,
// String of zero or more characters with which to replace each
// invalid character in the hostname or Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x",
// Regular expression describing the invalid character set in
// the hostname or Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]",
// Subnet unique identifier.
"id": 1,
......
// This is an example configuration file for the DHCPv4 server in Kea.
// It is a basic scenario with one IPv4 subnet configured but with DDNS
// It is a basic scenario with one IPv4 subnet configured and with DDNS
// enabled.
{ "Dhcp4":
......@@ -39,7 +39,8 @@
}
],
// Enable dynamic DNS updates
// Enable connectivity with kea-dhcp-ddns
// (Required for dynamic DNS updates)
"dhcp-ddns" : {
"enable-updates" : true,
"server-ip" : "192.0.2.0",
......@@ -48,15 +49,18 @@
"sender-port" : 3433,
"max-queue-size" : 2048,
"ncr-protocol" : "UDP",
"ncr-format" : "JSON",
"override-no-update" : true,
"override-client-update" : true,
"replace-client-name" : "when-present",
"generated-prefix" : "test.prefix",
"qualifying-suffix" : "test.suffix.",
"hostname-char-set": "[^A-Za-z0-9.-]",
"hostname-char-replacement": "x"
},
"ncr-format" : "JSON"
},
// Enable DDNS updates and configure DDNS update behavior
"ddns-send-updates" : true,
"ddns-override-no-update" : true,
"ddns-override-client-update" : true,
"ddns-replace-client-name" : "when-present",
"ddns-generated-prefix" : "test.prefix",
"ddns-qualifying-suffix" : "test.suffix.",
"hostname-char-set": "[^A-Za-z0-9.-]",
"hostname-char-replacement": "x",
// The following configures logging. It assumes that messages with at
// least informational level (info, warn, error and fatal) should be
......
......@@ -63,6 +63,46 @@
"socket-type": "unix"
},
// Specifies a prefix to be prepended to the generated Client FQDN.
"ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never",
// Boolean flag which enables or disables the DDNS updating. It
// defaults to true. It may be specified at the global, shared-
// network and subnet levels. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns..
"ddns-send-updates": true,
// Time in seconds specifying how long a declined lease should be
// excluded from DHCP assignments. The default value is 24 hours.
"decline-probation-period": 86400,
......@@ -75,19 +115,6 @@
// By default NCRs are not generated.
"enable-updates": false,
// Specifies a prefix to be prepended to the generated Client FQDN.
"generated-prefix": "myhost",
// String of zero or more characters with which to replace each
// invalid character in the hostname or Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x",
// Regular expression describing the invalid character set in
// the hostname or Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]",
// Specifies maximum number of NCRs to queue waiting to be sent
// to Kea D2 server.
"max-queue-size": 1024,
......@@ -100,36 +127,6 @@
// only UDP is supported.
"ncr-protocol": "UDP",
// Boolean flag indicating that server should ignore DHCP client
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"override-client-update": false,
// Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no
// suffix is appended.
"qualifying-suffix": "",
// Enumeration specifying whether the server should honor
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"replace-client-name": "never",
// IP address that Kea DHCPv6 server should use to send
// NCRs to D2. Default value of zero indicates that Kea
// should pick suitable address.
......@@ -476,6 +473,55 @@
// empty string is provided, no restriction is applied.
"client-class": "",
// Specifies a prefix to be prepended to the generated Client FQDN.
"ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never",
// Boolean flag which enables or disables DDNS updating for
// subnets in this network. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns. The default value is "true".
"ddns-send-updates": true,
// String of zero or more characters with which to replace each
// invalid character in the Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x",
// Regular expression describing the invalid character set in
// the Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]",
// Specifies that this shared network is selected for the
// requests received on the particular interface.
"interface": "ethX",
......@@ -542,6 +588,55 @@
// provided, no restriction is applied.
"client-class": "",
// Specifies a prefix to be prepended to the generated Client FQDN.
"ddns-generated-prefix": "myhost",
// Boolean flag indicating that server should ignore DHCP client
// wishes to update DNS on its own. With that flag set to true
// the server will send DNS updates for both forward and
// reverse DNS data. The default value is false, which indicates
// that the server will delegate DNS update to the client when
// requested.
"ddns-override-client-update": false,
// Boolean flag indicating that the server should override DHCP
// client's wish to not update the DNS. With this parameter
// set to true the server will send DNS update even when
// the client requested no update.
"ddns-override-no-update": false,
// Suffix appended to the partial name sent to the DNS. The
// default value is an empty string which indicates that no
// suffix is appended.
"ddns-qualifying-suffix": "",
// Enumeration specifying whether the server should honor
// hostname or Client FQDN sent by the client or replace
// this name. The acceptable values are: "never" (use the
// name the client sent), "always" (replace the name the
// client sent), "when-present" (replace the name the client
// sent, but do not generate one when the client didn't sent
// the name), "when-not-present" (generate the name when
// client didn't send one, otherwise leave the name the
// client sent). The default value is "never".
"ddns-replace-client-name": "never",
// Boolean flag which enables or disables DDNS updating for
// subnets in this network. It works in conjunction with
// dhcp-ddns:enable-updates which must be true enable connectivity
// kea-dhcp-ddns. The default value is "true".
"ddns-send-updates": true,
// String of zero or more characters with which to replace each
// invalid character in the Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x",
// Regular expression describing the invalid character set in
// the or Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]",
// Subnet unique identifier.
"id": 1,
......@@ -809,13 +904,13 @@
"t2-percent": .75,
// String of zero or more characters with which to replace each
// invalid character in the hostname or Client FQDN. The default
// invalid character in the Client FQDN. The default
// value is an empty string which will cause invalid characters
// to be omitted rather than replaced.
"hostname-char-replacement": "x",
// Regular expression describing the invalid character set in
// the hostname or Client FQDN.
// the Client FQDN.
"hostname-char-set": "[^A-Za-z0-9.-]",
// List of loggers used by the servers using this configuration file.
......
......@@ -2799,9 +2799,9 @@ DDNS for DHCPv4
---------------
As mentioned earlier, kea-dhcp4 can be configured to generate requests
to the DHCP-DDNS server (referred to here as "D2") to update DNS
entries. These requests are known as Name Change Requests or NCRs. Each
NCR contains the following information:
to the DHCP-DDNS server, kea-dhcp-ddns, (referred to herein as "D2") to
update DNS entries. These requests are known as Name Change Requests or
NCRs. Each NCR contains the following information:
1. Whether it is a request to add (update) or remove DNS entries
......@@ -2811,62 +2811,108 @@ NCR contains the following information:
3. The Fully Qualified Domain Name (FQDN), lease address, and DHCID
(information identifying the client associated with the FQDN)
The parameters for controlling the generation of NCRs for submission to
D2 are contained in the ``dhcp-ddns`` section of the kea-dhcp4 server
configuration. The mandatory parameters for the DHCP DDNS configuration
are ``enable-updates``, which is unconditionally required, and
``qualifying-suffix``, which has no default value and is required when
``enable-updates`` is set to ``true``. The two (disabled and enabled)
minimal DHCP DDNS configurations are:
Prior to Kea 1.7.1, all parameters for controlling DDNS were within the
global, ``dhcp-ddns`` section of the kea-dhcp4. Beginning with Kea 1.7.1
DDNS related parameters were split into two groups:
1. Connectivity Parameters
These are parameters which specify where and how kea-dhcp4 connects to
and communicates with D2. These parameters can only be specified
within the top-level ``dhcp-ddns`` section in the kea-dhcp4
configuration. The connectivity parameters are listed below:
- ``enable-updates``
- ``server-ip``
- ``server-port``
- ``sender-ip``
- ``sender-port``
- ``max-queue-size``
- ``ncr-protocol``
- ``ncr-format"``
2. Behavioral Parameters
These parameters influence behavior such as how client host names and
FQDN options are handled. They have been moved out of the ``dhcp-ddns``
section so that they may be specified at the global, shared-network,
and/or subnet levels. Furthermore, they are inherited downward from global to
shared-network to subnet. In other words, if a parameter is not specified at
a given level, the value for that level comes from the level above it.
The behavioral parameter as follows:
- ``ddns-send-updates``
- ``ddns-override-no-update``
- ``ddns-override-client-update``
- ``ddns-replace-client-name"``
- ``ddns-generated-prefix``
- ``ddns-qualifying-suffix``
- ``hostname-char-set``
- ``hostname-char-replacement``
::
.. note::
"Dhcp4": {
"dhcp-ddns": {
"enable-updates": false
},
...
}
For backward compatibility, configuration parsing will still recognize
the original behavioral parameters specified in ``dhcp-ddns``. It will
do so by translating the parameter into its global equivalent. If a
parameter is specified both globally and in ``dhcp-ddns``, the latter
value will be ignored. In either case, a log will be emitted explaining
what has occurred. Specifying these values within ``dhcp-ddns`` is
deprecated and support for it may be removed at some future date.
and for example:
The default configuration would appear as follows:
::
"Dhcp4": {
"dhcp-ddns": {
"enable-updates": true,
"qualifying-suffix": "example."
},
...
"dhcp-ddns": {
// Connectivity parameters
"enable-updates": false,
"server-ip": "127.0.0.1",
"server-port":53001,
"sender-ip":"",
"sender-port":0,
"max-queue-size":1024,
"ncr-protocol":"UDP",
"ncr-format":"JSON"
},
// Behavioral parameters (global)
"ddns-send-updates": true,