From: Tomek Mrugalski Date: Mon, 4 Aug 2014 17:52:00 +0000 (+0200) Subject: [3468] DHCPv6 chapter converted to JSON format. X-Git-Tag: trac3482_base~57^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e3a09b38f6e875fa7c65d13b2debe67520a4607;p=thirdparty%2Fkea.git [3468] DHCPv6 chapter converted to JSON format. --- diff --git a/doc/guide/dhcp4-srv.xml b/doc/guide/dhcp4-srv.xml index 56ae11abb0..36bb93878e 100644 --- a/doc/guide/dhcp4-srv.xml +++ b/doc/guide/dhcp4-srv.xml @@ -148,7 +148,7 @@ look like this: "interfaces": [ "eth0", "eth1" ], As "interfaces" is not the last parameter in the configuration, -a trailing comma is required.i +a trailing comma is required. A number of other parameters follow. valid-lifetime defines how long the addresses (leases) given out by the server are valid. If nothing changes, client that got the address is allowed to @@ -1463,10 +1463,10 @@ temporarily override a list of interface names and listen on all interfaces.
kea-dhcp4 name generation for DDNS update requests - Each NameChangeRequest must of course include the fully qualified domain + Each NameChangeRequest must of course include the fully qualified domain name whose DNS entries are to be affected. kea-dhcp4 can be configured to supply a portion or all of that name based upon what it receives from - the client in the DHCP REQUEST. + the client in the DHCP REQUEST. The rules for determining the FQDN option are as follows: @@ -1520,10 +1520,9 @@ temporarily override a list of interface names and listen on all interfaces. } - The suffix used when generating a FQDN or when qualifying a partial - name is specified by the qualifying-suffix parameter. The default - value is "example.com". To alter its value simply set it to the desired - string: + The suffix used when generating a FQDN or when qualifying a partial name + is specified by the qualifying-suffix parameter. There + is no default value. To set its value simply set it to the desired string: "Dhcp4": { diff --git a/doc/guide/dhcp6-srv.xml b/doc/guide/dhcp6-srv.xml index 8d1984178c..022159f89b 100644 --- a/doc/guide/dhcp6-srv.xml +++ b/doc/guide/dhcp6-srv.xml @@ -154,7 +154,7 @@ look like this: As "interfaces" is not the last parameter in the -configuration, a trailing comma is required.i +configuration, a trailing comma is required. A number of other parameters follow. valid-lifetime defines how long the addresses (leases) given out by the server are valid. If nothing changes, client that got the address is allowed to use it for 4000 @@ -212,8 +212,11 @@ syntax would be used: } ] +Note that indentation is optional and is used for aesthetic purposes only. +In some cases in may be preferable to use more compact notation. + After all parameters are specified, we have two contexts open: global and Dhcp6, hence we need two closing curly brackets to close them. In a real life configuration file there likely would be additional @@ -400,9 +403,12 @@ temporarily override a list of interface names and listen on all interfaces. configured on the eth1 interface. - -> config set Dhcp6/interfaces[0] eth1/2001:db8::1 -> config commit + +"Dhcp6": { + "interfaces": [ "eth1/2001:db8::1"], + ... +} + When configuration gets committed, the server will start to listen on eth1 on link-local address, multicast group (ff02::1:2) and 2001:db8::1. @@ -430,10 +436,20 @@ temporarily override a list of interface names and listen on all interfaces. 2001:db8:1::1 to 2001:db8:1::ffff are going to be managed by the Dhcp6 server. Such a configuration can be achieved in the following way: -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[0]/subnet "2001:db8:1::/64" -> config set Dhcp6/subnet6[0]/pool [ "2001:db8:1::0 - 2001:db8:1::ffff" ] -> config commit +"Dhcp6": { + "subnet6": [ + { + "subnet": "2001:db8:1::/64", + "pools": [ + { + pool: "2001:db8:1::1-2001:db8:1::ff" + } + ], + ... + } + ] +} + Note that subnet is defined as a simple string, but the pool parameter is actually a list of pools: for this reason, the pool definition is enclosed in square brackets, even though only one range of addresses @@ -446,8 +462,18 @@ temporarily override a list of interface names and listen on all interfaces. formats are supported by Dhcp6 and can be mixed in the pool list. For example, one could define the following pools: -> config set Dhcp6/subnet6[0]/pool [ "2001:db8:1::1 - 2001:db8:1::ffff", "2001:db8:1:0:5::/80" ] -> config commit +"Dhcp6": { + "subnet6": [ + { + "subnet": "2001:db8:1::/64", + "pools": [ + { pool: "2001:db8:1::1-2001:db8:1::ffff" }, + { pool: "2001:db8:1:05::/80" } + ], + ... + } + ] +} The number of pools is not limited, but for performance reasons it is recommended to use as few as possible. @@ -455,17 +481,29 @@ temporarily override a list of interface names and listen on all interfaces. The server may be configured to serve more than one subnet. To add a second subnet, use a command similar to the following: -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[1]/subnet "2001:db8:beef::/48" -> config set Dhcp6/subnet6[1]/pool [ "2001:db8:beef::/48" ] -> config commit - Arrays are counted from 0. subnet[0] refers to the subnet defined in the - previous example. The config add Dhcp6/subnet6 command adds - another (second) subnet. It can be referred to as - Dhcp6/subnet6[1]. In this example, we allow server to +"Dhcp6": { + "subnet6": [ + { + "subnet": "2001:db8:1::/64", + "pools": [ + { pool: "2001:db8:1::1-2001:db8:1::ffff" } + ] + }, + { + "subnet": "2001:db8:2::/64", + "pools": [ + { pool: "2001:db8:2::/64" } + ] + }, + + ... + ] +} + In this example, we allow server to dynamically assign all addresses available in the whole subnet. Although - very wasteful, it is certainly a valid configuration to dedicate the - whole /48 subnet for that purpose. + rather wasteful, it is certainly a valid configuration to dedicate the + whole /64 subnet for that purpose. Note that Kea server does not preallocate + the leases, so there is no danger of using gigantic address pools. When configuring a DHCPv6 server using prefix/length notation, please pay @@ -481,20 +519,31 @@ temporarily override a list of interface names and listen on all interfaces. Subnet and Prefix Delegation Pools - Subnets may also be configured to delegate address prefixes.... + Subnets may also be configured to delegate prefixes, as defined in + RFC 3633. A subnet may have one or more prefix delegation pools. Each pool has a prefixed address, which is specified as a prefix and a prefix length, - as well as a delegated prefix length. A sample configuration is shown - below: + as well as a delegated prefix length. delegated-len + must not be shorter (numerically greater) than + prefix-len. If both delegated-len + and prefix-len are equal, the server will be able to + delegate only one prefix. A sample configuration is shown below: -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[0]/subnet "2001:db8:1::/64" -> config show Dhcp6/subnet6[0] -> config add Dhcp6/subnet6[0]/pd-pools -> config set Dhcp6/subnet6[0]/pd-pools[0]/prefix "2001:db8:1::" -> config set Dhcp6/subnet6[0]/pd-pools[0]/prefix-len 64 -> config set Dhcp6/subnet6[0]/pd-pools[0]/delegated-len 96 -> config commit +"Dhcp6": { + "subnet6": [ + { + "subnet": "2001:d8b:1::/64", + "pd-pools": [ + { + "prefix": "2001:db8:1::", + "prefix-len": 64, + "delegated-len": 96 + } + ] + } + ], + ... +}
@@ -511,32 +560,36 @@ temporarily override a list of interface names and listen on all interfaces. global and apply to all configured subnets. -1. > config add Dhcp6/option-data -2. > config set Dhcp6/option-data[0]/name "dns-servers" -3. > config set Dhcp6/option-data[0]/code 23 -4. > config set Dhcp6/option-data[0]/space "dhcp6" -5. > config set Dhcp6/option-data[0]/csv-format true -6. > config set Dhcp6/option-data[0]/data "2001:db8::cafe, 2001:db8::babe" -7. > config commit +"Dhcp4": { + "option-data": [ + { + "name": "dns-servers", + "code": 23, + "space": "dhcp6", + "csv-format": true, + "data": "2001:db8::cafe, 2001:db8::babe" + }, + ... + ] +}
+ - The first line creates new entry in option-data table. It - contains information on all global options that the server is - supposed to configure in all subnets. The second line specifies - option name. For a complete list of currently supported names, - see . - The third line specifies option code, which must match one of the - values from that - list. Line 4 specifies option space, which must always - be set to "dhcp6" as these are standard DHCPv6 options. For - other name spaces, including custom option spaces, see . The third line specifies option code, + which must match one of the values from that list. Line beginning with + space specifies option space, which must always be set + to "dhcp6" as these are standard DHCPv6 options. For other name spaces, + including custom option spaces, see . The fifth line specifies the format in - which the data will be entered: use of CSV (comma - separated values) is recommended. The sixth line gives the actual value to - be sent to clients. Data is specified as a normal text, with - values separated by commas if more than one value is - allowed. + which the data will be entered: use of CSV (comma separated values) is + recommended. The sixth line gives the actual value to be sent to + clients. Data is specified as a normal text, with values separated by + commas if more than one value is allowed. @@ -546,19 +599,27 @@ temporarily override a list of interface names and listen on all interfaces. following commands configure the DNS-SERVERS option for all subnets with the following addresses: 2001:db8:1::cafe and 2001:db8:1::babe. - -> config add Dhcp6/option-data -> config set Dhcp6/option-data[0]/name "dns-servers" -> config set Dhcp6/option-data[0]/code 23 -> config set Dhcp6/option-data[0]/space "dhcp6" -> config set Dhcp6/option-data[0]/csv-format false -> config set Dhcp6/option-data[0]/data "2001 0DB8 0001 0000 0000 0000 - 0000 CAFE 2001 0DB8 0001 0000 0000 0000 0000 BABE" -> config commit - - (The value for the setting of the "data" element is split across two - lines in this document for clarity: when entering the command, the - whole string should be entered on the same line.) + +"Dhcp4": { + "option-data": [ + { + "name": "dns-servers", + "code": 23, + "space": "dhcp6", + "csv-format": false, + "data": "2001 0DB8 0001 0000 0000 0000 0000 CAFE + 2001 0DB8 0001 0000 0000 0000 0000 BABE" + }, + ... + ] +} + + + The value for the setting of the "data" element is split across two + lines in this document for clarity: when entering the command, the + whole string should be entered on the same line. Care should be taken + to use proper encoding when using hex format as Kea ability to validate + data correctness in hex format is limited. @@ -575,20 +636,33 @@ temporarily override a list of interface names and listen on all interfaces. The following commands override the global DNS servers option for a particular subnet, setting a single DNS server with address 2001:db8:1::3. - -> config add Dhcp6/subnet6[0]/option-data -> config set Dhcp6/subnet6[0]/option-data[0]/name "dns-servers" -> config set Dhcp6/subnet6[0]/option-data[0]/code 23 -> config set Dhcp6/subnet6[0]/option-data[0]/space "dhcp6" -> config set Dhcp6/subnet6[0]/option-data[0]/csv-format true -> config set Dhcp6/subnet6[0]/option-data[0]/data "2001:db8:1::3" -> config commit + +"Dhcp6": { + "subnet6": [ + { + "option-data": [ + { + "name": "dns-servers", + "code": 23, + "space: "dhcp6", + "csv-format": true, + "data": "2001:db8:1::3" + }, + ... + ], + ... + }, + ... + ], + ... +} + - In future versions of BIND 10 DHCP, it will not be necessary to specify - option code, space and csv-format fields, as those fields will be set + In future versions of Kea, it will not be necessary to specify option + code, space and csv-format fields, as those fields will be set automatically. @@ -699,39 +773,51 @@ temporarily override a list of interface names and listen on all interfaces. Assume that we want to define a new DHCPv6 option called "foo" which will have code 100 and will convey a single unsigned 32 bit integer value. We can define such an option by using the following commands: - -> config add Dhcp6/option-def -> config set Dhcp6/option-def[0]/name "foo" -> config set Dhcp6/option-def[0]/code 100 -> config set Dhcp6/option-def[0]/type "uint32" -> config set Dhcp6/option-def[0]/array false -> config set Dhcp6/option-def[0]/record-types "" -> config set Dhcp6/option-def[0]/space "dhcp6" -> config set Dhcp6/option-def[0]/encapsulate "" -> config commit - The "false" value of the "array" parameter determines that the option - does NOT comprise an array of "uint32" values but rather a single value. - Two other parameters have been left blank: "record-types" and "encapsulate". + +"Dhcp6": { + "option-def": [ + { + "name": "foo", + "code": 100, + "type": "uint32", + "array": false, + "record-types": "", + "space": "dhcp6", + "encapsulate": "" + }, ... + ], + ... +} + + The "false" value of the "array" parameter determines that the option does + NOT comprise an array of "uint32" values but rather a single value. Two + other parameters have been left blank: "record-types" and "encapsulate". The former specifies the comma separated list of option data fields if the option comprises a record of data fields. The "record-fields" value should be non-empty if the "type" is set to "record". Otherwise it must be left blank. The latter parameter specifies the name of the option space being encapsulated by the particular option. If the particular option does not - encapsulate any option space it should be left blank. - Note that the above set of comments define the format of the new option and do not - set its values. + encapsulate any option space it should be left blank. Note that the above + set of comments define the format of the new option and do not set its + values. Once the new option format is defined, its value is set in the same way as for a standard option. For example the following commands set a global value that applies to all subnets. - -> config add Dhcp6/option-data -> config set Dhcp6/option-data[0]/name "foo" -> config set Dhcp6/option-data[0]/code 100 -> config set Dhcp6/option-data[0]/space "dhcp6" -> config set Dhcp6/option-data[0]/csv-format true -> config set Dhcp6/option-data[0]/data "12345" -> config commit + +"Dhcp6": { + "option-data": [ + { + name "foo", + "code": 100, + "space": "dhcp6", + "csv-format": true, + "data": "12345" + }, ... + ], + ... +} + New options can take more complex forms than simple use of @@ -744,14 +830,20 @@ temporarily override a list of interface names and listen on all interfaces. boolean value, followed by a text string. Such an option could be defined in the following way: -> config add Dhcp6/option-def -> config set Dhcp6/option-def[0]/name "bar" -> config set Dhcp6/option-def[0]/code 101 -> config set Dhcp6/option-def[0]/space "dhcp6" -> config set Dhcp6/option-def[0]/type "record" -> config set Dhcp6/option-def[0]/array false -> config set Dhcp6/option-def[0]/record-types "ipv6-address, uint16, boolean, string" -> config set Dhcp6/option-def[0]/encapsulate "" +"Dhcp6": { + "option-def": [ + { + "name": "bar", + "code": 101, + "space": "dhcp6", + "type": "record", + "array": false, + "record-types": "ipv4-address, uint16, boolean, string", + "encapsulate": "" + }, ... + ], + ... +} The "type" is set to "record" to indicate that the option contains multiple values of different types. These types are given as a comma-separated @@ -760,13 +852,18 @@ temporarily override a list of interface names and listen on all interfaces. The values of the option are set as follows: -> config add Dhcp6/option-data -> config set Dhcp6/option-data[0]/name "bar" -> config set Dhcp6/option-data[0]/space "dhcp6" -> config set Dhcp6/option-data[0]/code 101 -> config set Dhcp6/option-data[0]/csv-format true -> config set Dhcp6/option-data[0]/data "2001:db8:1::10, 123, false, Hello World" -> config commit +"Dhcp6": { + "option-data": [ + { + "name": "bar", + "space": "dhcp6", + "code": 101, + "csv-format": true, + "data": "2001:db8:1::10, 123, false, Hello World" + } + ], + ... +} "csv-format" is set "true" to indicate that the "data" field comprises a command-separated list of values. The values in the "data" must correspond to the types set in the "record-types" field of the option definition. @@ -798,36 +895,53 @@ temporarily override a list of interface names and listen on all interfaces. that is set to "12345". The sub-option "foo" follows the data field holding this value. -> config add Dhcp6/option-def -> config set Dhcp6/option-def[0]/name "foo" -> config set Dhcp6/option-def[0]/code 1 -> config set Dhcp6/option-def[0]/space "vendor-opts-space" -> config set Dhcp6/option-def[0]/type "record" -> config set Dhcp6/option-def[0]/array false -> config set Dhcp6/option-def[0]/record-types "ipv6-address, uint16, string" -> config set Dhcp6/option-def[0]/encapsulates "" -> config commit - - (Note that the option space is set to "vendor-opts-space".) +"Dhcp6": { + "option-def": [ + { + "name": "foo", + "code": 1, + "space": "vendor-encapsulated-options-space", + "type": "record", + "array: false, + "record-types": "ipv6-address, uint16, string", + "encapsulates": "" + } + ], + ... +} + (Note that the option space is set to vendor-opts-space.) Once the option format is defined, the next step is to define actual values for that option: - -> config add Dhcp6/option-data -> config set Dhcp6/option-data[0]/name "foo" -> config set Dhcp6/option-data[0]/space "vendor-opts-space" -> config set Dhcp6/option-data[0]/code 1 -> config set Dhcp6/option-data[0]/csv-format true -> config set Dhcp6/option-data[0]/data "2001:db8:1::10, 123, Hello World" -> config commit - We should also define values for the vendor-opts, that will convey our option foo. - -> config add Dhcp6/option-data -> config set Dhcp6/option-data[1]/name "vendor-opts" -> config set Dhcp6/option-data[1]/space "dhcp6" -> config set Dhcp6/option-data[1]/code 17 -> config set Dhcp6/option-data[1]/csv-format true -> config set Dhcp6/option-data[1]/data "12345" -> config commit + +"Dhcp6": { + "option-data": [ + { + "name": "foo" + "space": "vendor-encapsulated-options-space", + "code": 1, + "csv-format": true, + "data": "2001:db8:1::10, 123, Hello World" + }, + ... + ], + ... +} + We should also define values for the vendor-opts, that will convey our + option foo. + +"Dhcp6": { + "option-data": [ + ..., + { + "name": "vendor-encapsulated-options" + "space": "dhcp6", + "code": 17, + "csv-format": true, + "data: "12345" + } + ], + ... +} @@ -850,26 +964,29 @@ temporarily override a list of interface names and listen on all interfaces. with code 102 that conveys two sub-options with codes 1 and 2. First we need to define the new sub-options: -> config add Dhcp6/option-def -> config set Dhcp6/option-def[0]/name "subopt1" -> config set Dhcp6/option-def[0]/code 1 -> config set Dhcp6/option-def[0]/space "isc" -> config set Dhcp6/option-def[0]/type "ipv6-address" -> config set Dhcp6/option-def[0]/record-types "" -> config set Dhcp6/option-def[0]/array false -> config set Dhcp6/option-def[0]/encapsulate "" -> config commit -> -> config add Dhcp6/option-def -> config set Dhcp6/option-def[1]/name "subopt2" -> config set Dhcp6/option-def[1]/code 2 -> config set Dhcp6/option-def[1]/space "isc" -> config set Dhcp6/option-def[1]/type "string" -> config set Dhcp6/option-def[1]/record-types "" -> config set Dhcp6/option-def[1]/array false -> config set Dhcp6/option-def[1]/encapsulate "" -> config commit - +"Dhcp6": { + "option-def": [ + { + "name": "subopt1", + "code": 1, + "space": "isc", + "type": "ipv6-address". + "record-types": "", + "array": false, + "encapsulate "" + }, + { + "name": "subopt2", + "code": 2, + "space": "isc", + "type": "string", + "record-types": "", + "array": false + "encapsulate": "" + } + ], + ... +} Note that we have defined the options to belong to a new option space (in this case, "isc"). @@ -877,91 +994,112 @@ temporarily override a list of interface names and listen on all interfaces. The next step is to define a regular DHCPv6 option and specify that it should include options from the isc option space: -> config add Dhcp6/option-def -> config set Dhcp6/option-def[2]/name "container" -> config set Dhcp6/option-def[2]/code 102 -> config set Dhcp6/option-def[2]/space "dhcp6" -> config set Dhcp6/option-def[2]/type "empty" -> config set Dhcp6/option-def[2]/array false -> config set Dhcp6/option-def[2]/record-types "" -> config set Dhcp6/option-def[2]/encapsulate "isc" -> config commit - - The name of the option space in which the sub-options are defined - is set in the "encapsulate" field. The "type" field is set to "empty" - which imposes that this option does not carry any data other than - sub-options. +"Dhcp4": { + "option-def": [ + ..., + { + "name": "container", + "code": 102, + "space": "dhcp6", + "type": "empty", + "array": false, + "record-types": "", + "encapsulate": "isc" + } + ], + ... +} + + The name of the option space in which the sub-options are defined is set in + the encapsulate field. The type field + is set to empty which imposes that this option does not + carry any data other than sub-options. Finally, we can set values for the new options: -> config add Dhcp6/option-data -> config set Dhcp6/option-data[0]/name "subopt1" -> config set Dhcp6/option-data[0]/space "isc" -> config set Dhcp6/option-data[0]/code 1 -> config set Dhcp6/option-data[0]/csv-format true -> config set Dhcp6/option-data[0]/data "2001:db8::abcd" -> config commit -> -> config add Dhcp6/option-data -> config set Dhcp6/option-data[1]/name "subopt2" -> config set Dhcp6/option-data[1]/space "isc" -> config set Dhcp6/option-data[1]/code 2 -> config set Dhcp6/option-data[1]/csv-format true -> config set Dhcp6/option-data[1]/data "Hello world" -> config commit -> -> config add Dhcp6/option-data -> config set Dhcp6/option-data[2]/name "container" -> config set Dhcp6/option-data[2]/space "dhcp6" -> config set Dhcp6/option-data[2]/code 102 -> config set Dhcp6/option-data[2]/csv-format true -> config set Dhcp6/option-data[2]/data "" -> config commit +"Dhcp6": { + "option-data": [ + { + "name": "subopt1", + "space": "isc", + "code": 1, + "csv-format": true, + "data": "2001:db8::abcd" + }, + } + "name": "subopt2", + "space": "isc", + "code": 2, + "csv-format": true, + "data": "Hello world" + }, + { + "name": "container", + "space": "dhcp6", + "code": 102, + "csv-format": true, + "data": "" + } + ], + ... +} + Even though the "container" option does not carry any data except sub-options, the "data" field must be explicitly set to an empty value. - This is required because in the current version of BIND 10 DHCP, the - default configuration values are not propagated to the configuration parsers: - if the "data" is not set the parser will assume that this - parameter is not specified and an error will be reported. + This is required because in the current version of BIND 10 DHCP, the default + configuration values are not propagated to the configuration parsers: if the + "data" is not set the parser will assume that this parameter is not + specified and an error will be reported. + Note that it is possible to create an option which carries some data - in addition to the sub-options defined in the encapsulated option space. For example, - if the "container" option from the previous example was required to carry an uint16 - value as well as the sub-options, the "type" value would have to be set to "uint16" in - the option definition. (Such an option would then have the following - data structure: DHCP header, uint16 value, sub-options.) The value specified - with the "data" parameter - which should be a valid integer enclosed in quotes, - e.g. "123" - would then be assigned to the uint16 field in the "container" option. + in addition to the sub-options defined in the encapsulated option space. + For example, if the "container" option from the previous example was + required to carry an uint16 value as well as the sub-options, the "type" + value would have to be set to "uint16" in the option definition. (Such an + option would then have the following data structure: DHCP header, uint16 + value, sub-options.) The value specified with the "data" parameter - which + should be a valid integer enclosed in quotes, e.g. "123" - would then be + assigned to the uint16 field in the "container" option. -
- IPv6 Subnet Selection - - The DHCPv6 server may receive requests from local (connected to the - same subnet as the server) and remote (connecting via relays) clients. - As server may have many subnet configurations defined, it must select - appropriate subnet for a given request. - - - The server can not assume which of configured subnets are local. It is - possible in IPv4, where there is reasonable expectation that the - server will have a (global) IPv4 address configured on the interface, - and can use that information to detect whether a subnet is local or - not. That assumption is not true in IPv6, as the DHCPv6 must be able - to operate with having link-local addresses only. Therefore an optional - "interface" parameter is available within a subnet definition - to designate that a given subnet is local, i.e. reachable directly over - specified interface. For example the server that is intended to serve - a local subnet over eth0 may be configured as follows: - -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[1]/subnet "2001:db8:beef::/48" -> config set Dhcp6/subnet6[1]/pool [ "2001:db8:beef::/48" ] -> config set Dhcp6/subnet6[1]/interface "eth0" -> config commit +
+ IPv6 Subnet Selection + + The DHCPv6 server may receive requests from local (connected to the + same subnet as the server) and remote (connecting via relays) clients. + As server may have many subnet configurations defined, it must select + appropriate subnet for a given request. + + + The server can not assume which of configured subnets are local. It is + possible in IPv4, where there is reasonable expectation that the + server will have a (global) IPv4 address configured on the interface, + and can use that information to detect whether a subnet is local or + not. That assumption is not true in IPv6, as the DHCPv6 must be able + to operate with having link-local addresses only. Therefore an optional + "interface" parameter is available within a subnet definition + to designate that a given subnet is local, i.e. reachable directly over + specified interface. For example the server that is intended to serve + a local subnet over eth0 may be configured as follows: + +"Dhcp6": { + "subnet6": [ + { + "subnet": "2001:db8:beef::/48", + "pools": [ + { + "pool": "2001:db8:beef::/48" + } + ], + "interface": "eth0" + } + ], + ... +}
@@ -1017,11 +1155,20 @@ should include options from the isc option space: To specify interface-id with value "vlan123", the following commands can be used: -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[0]/subnet "2001:db8:beef::/48" -> config set Dhcp6/subnet6[0]/pool [ "2001:db8:beef::/48" ] -> config set Dhcp6/subnet6[0]/interface-id "vland123" -> config commit +"Dhcp6": { + "subnet6": [ + { + "subnet": "2001:db8:beef::/48", + "pools": [ + { + "pool": "2001:db8:beef::/48" + } + ], + "interface-id": "vlan123" + } + ], + ... +}
@@ -1084,11 +1231,21 @@ should include options from the isc option space: configuration can be achieved in the following way: -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[0]/subnet "2001:db8:1::/64" -> config set Dhcp6/subnet6[0]/pool [ "2001:db8:1::0 - 2001:db8:1::ffff" ] -> config set Dhcp6/subnet6[0]/client-class "eRouter1.0" -> config commit +"Dhcp6": { + "subnet6": [ + { + "subnet": "2001:db8:1::/64", + "pools": [ + { + "pool": "2001:db8:1::-2001:db8:1::ffff" + } + ], + "client-class": "VENDOR_CLASS_eRouter1.0" + } + ], + ... +} + @@ -1121,31 +1278,33 @@ should include options from the isc option space: are contained in the "dhcp-ddns" section of kea-dhcp6 configuration. The default values for this section appears as follows: -> config show Dhcp6/dhcp-ddns -Dhcp6/dhcp-ddns/enable-updates true boolean -Dhcp6/dhcp-ddns/server-ip "127.0.0.1" string -Dhcp6/dhcp-ddns/server-port 53001 integer -Dhcp6/dhcp-ddns/sender-ip "" string -Dhcp6/dhcp-ddns/sender-port 0 integer -Dhcp6/dhcp-ddns/max-queue-size 1024 integer -Dhcp6/dhcp-ddns/ncr-protocol "UDP" string -Dhcp6/dhcp-ddns/ncr-format "JSON" string -Dhcp6/dhcp-ddns/override-no-update false boolean -Dhcp6/dhcp-ddns/override-client-update false boolean -Dhcp6/dhcp-ddns/replace-client-name false boolean -Dhcp6/dhcp-ddns/generated-prefix "myhost" string -Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string +"Dhcp6": { + "dhcp-ddns": { + "enable-updates": true, + "server-ip": "127.0.0.1", + "server-port": 53001, + "sender-ip": "", + "sender-port: 0, + "max-queue-size": 1024, + "ncr-protocol": "UDP", + "ncr-format": "JSON", + "override-no-update": false, + "override-client-update": false, + "replace-client-name": false, + "generated-prefix": "myhost", + "qualifying-suffix": "example.com" + }, + ... +} + The "enable-updates" parameter determines whether or not kea-dhcp6 will - generate NCRs. By default, this value is false hence DDNS updates are - disabled. To enable DDNS updates set this value to true as follows: + generate NCRs. If missing, this value is assumed false hence DDNS updates are + disabled. - -> config set Dhcp6/dhcp-ddns/enable-updates true -> config commit - +
DHCP-DDNS Server Connectivity @@ -1194,22 +1353,32 @@ Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string all of the default values mentioned above should be sufficient. If, however, D2 has been configured to listen on a different address or port, these values must altered accordingly. For example, if D2 has been - configured to listen on 3001::5 port 900, the following commands + configured to listen on 2001:db8::5 port 900, the following commands would be required: -> config set Dhcp6/dhcp-ddns/server-ip "3001::5" -> config set Dhcp6/dhcp-ddns/server-port 900 -> config commit +"Dhcp6": { + "dhcp-ddns: { + "server-ip": "2001:db8::5", + "server-port": 900, + ... + }, + ... +}
When does kea-dhcp6 generate DDNS request - kea-dhcp6 follows the behavior prescribed for DHCP servers in RFC 4704. - It is important to keep in mind that kea-dhcp6 provides the initial decision - making of when and what to update and forwards that information to D2 in - the form of NCRs. Carrying out the actual DNS updates and dealing with - such things as conflict resolution are the purview of D2 (). + + + kea-dhcp6 follows the behavior prescribed for DHCP servers + in RFC 4704. It is important to keep in mind that kea-dhcp6 + provides the initial decision making of when and what to update + and forwards that information to D2 in the form of + NCRs. Carrying out the actual DNS updates and dealing with such + things as conflict resolution are the purview of D2 (). + This section describes when kea-dhcp6 will generate NCRs and the configuration parameters that can be used to influence this decision. @@ -1311,8 +1480,13 @@ Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string To override client delegation, issue the following commands: -> config set Dhcp6/dhcp-ddns/override-client-update true -> config commit +"Dhcp6": { + "dhcp-ddns": { + "override-client-update": true, + ... + }, + ... +} The third row in the table above describes the case in which the client @@ -1326,18 +1500,24 @@ Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string To override client delegation, issue the following commands: -> config set Dhcp6/dhcp-ddns/override-no-update true -> config commit +"Dhcp6": { + "dhcp-ddns": { + "override-no-update": true, + ... + }, + ... +}
kea-dhcp6 name generation for DDNS update requests - Each NameChangeRequest must of course include the fully qualified domain + + Each NameChangeRequest must of course include the fully qualified domain name whose DNS entries are to be affected. kea-dhcp6 can be configured to supply a portion or all of that name based upon what it receives from - the client in the DHCP REQUEST. - - The rules for determining the FQDN option are as follows: + the client in the DHCP REQUEST. + + The rules for determining the FQDN option are as follows: If configured to do so ignore the REQUEST contents and generate a @@ -1365,8 +1545,13 @@ Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string "replace-client-name" to true: -> config set Dhcp6/dhcp-ddns/replace-client-name true -> config commit +"Dhcp6": { + "dhcp-ddns": { + "replace-client-name": true, + ... + }, + ... +} The prefix used when generating a FQDN is specified by the @@ -1374,18 +1559,27 @@ Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string its value, simply set it to the desired string: -> config set Dhcp6/dhcp-ddns/generated-prefix "another.host" -> config commit +"Dhcp6": { + "dhcp-ddns": { + "generated-prefix": "another.host", + ... + }, + ... +} - The suffix used when generating a FQDN or when qualifying a partial - name is specified by the "qualifying-suffix" parameter. The default - value is "example.com". To alter its value simply set it to the desired - string: + The suffix used when generating a FQDN or when qualifying a partial name + is specified by the qualifying-suffix parameter. There + is no default value. To set its value simply set it to the desired string: -> config set Dhcp6/dhcp-ddns/generated-prefix "our.net" -> config commit +"Dhcp4": { + "dhcp-ddns": { + "qualifying-suffix": "foo.example.org", + ... + }, + ... +}
@@ -1480,11 +1674,22 @@ Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string that came from a relay that has an address in 2001:db8:1::/64 subnet. It will also select that subnet for a relay with address 3000::1. -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[0]/subnet "2001:db8:1::/64" -> config set Dhcp6/subnet6[0]/pool [ "2001:db8:1::2 - 2001:db8:1::ffff" ] -> config set Dhcp6/subnet6[0]/relay/ip-address "3000::1" -> config commit +"Dhcp6": { + "subnet6": [ + { + "subnet": "2001:db8:1::/64", + "pools": [ + { + "pool": "2001:db8:1::1-2001:db8:1::ffff" + } + ], + "relay": { + "ip-address": "3000::1" + } + } + ] +} + @@ -1508,16 +1713,33 @@ Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string an uses address 3000::1. The following configuration can serve that configuration: -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[0]/subnet "3000::/64" -> config set Dhcp6/subnet6[0]/pool [ "3000::2 - 3000::ffff" ] -> config set Dhcp6/subnet6[0]/client-class "docsis3.0" -> config set Dhcp6/subnet6[0]/relay/ip-address "3000::1" -> config add Dhcp6/subnet6 -> config set Dhcp6/subnet6[1]/subnet "2001:db8:1::/64" -> config set Dhcp6/subnet6[1]/pool [ "2001:db8:1::1 - 2001:db8:1::ffff" ] -> config set Dhcp6/subnet6[1]/relay/ip-address "3000::1" -> config commit +"Dhcp6": { + "subnet6": [ + { + "subnet": "3000::/64", + "pools": [ + { "pool": "3000::2 - 3000::ffff" } + ], + "client-class": "VENDOR_CLASS_docsis3.0", + "relay": { + "ip-address": "3000::1" + } + }, + + { + "subnet": "2001:db8:1::/64", + "pools": [ + { + "pool": "2001:db8:1::1-2001:db8:1::ffff" + } + ], + "relay": { + "ip-address": "3000::1" + } + } + ] +} + @@ -1568,21 +1790,6 @@ Dhcp6/dhcp-ddns/qualifying-suffix "example.com" string - - - On startup, the DHCPv6 server does not get the full configuration from - BIND 10. To remedy this, after starting BIND 10, modify any parameter - and commit the changes, e.g. - -> config show Dhcp6/renew-timer -Dhcp6/renew-timer 1000 integer (default) -> config set Dhcp6/renew-timer 1001 -> config commit - - - - Temporary addresses are not supported. - The server will allocate, renew or rebind a maximum of one lease @@ -1592,23 +1799,26 @@ Dhcp6/renew-timer 1000 integer (default) for multiple addresses or prefixes to be allocated for a single IA. + Temporary addresses are not supported. + - Confirmation (CONFIRM), duplication report (DECLINE), + Duplication report (DECLINE), stateless configuration (INFORMATION-REQUEST) and client reconfiguration (RECONFIGURE) are not yet supported. - - - The server doesn't act upon expired leases. In particular, - when a lease expires, the server doesn't request removal of - the DNS records associated with it. - - + + + + The server doesn't act upon expired leases. In particular, + when a lease expires, the server doesn't request removal of + the DNS records associated with it. + +