diff --git a/doc/guide/bind10-guide.xml b/doc/guide/bind10-guide.xml index d2e1a6a731..8b4fc21e48 100644 --- a/doc/guide/bind10-guide.xml +++ b/doc/guide/bind10-guide.xml @@ -3643,7 +3643,7 @@ Dhcp4/subnet4 [] list (default) values from that list. Line 4 specifies option space, which must always be set to "dhcp4" as these are standard DHCPv4 options. For other option spaces, including custom option spaces, see . The fifth line specfies the format in + linkend="dhcp4-option-spaces"/>. 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 @@ -3663,13 +3663,9 @@ Dhcp4/subnet4 [] list (default) > config set Dhcp4/option-data[0]/code 6 > config set Dhcp4/option-data[0]/space "dhcp4" > config set Dhcp4/option-data[0]/csv-format false -> config set Dhcp4/option-data[0]/data "C0 00 03 01 - C0 00 03 02" +> config set Dhcp4/option-data[0]/data "C0 00 03 01 C0 00 03 02" > 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 - string should be entered on the same line.) @@ -3697,30 +3693,35 @@ Dhcp4/subnet4 [] list (default) - In upcoming Kea versions, it will not be required anymore to specify - option code, space and csv-format fields as those fields will be filled + In a future version of Kea, it will not be necessary to specify + the option code, space and csv-format fields as they will be set automatically. - Below is a list of currently supported standard DHCPv4 options. The name and code - specify name and code that should be used as a name in option-data - structures. Type designates the actual format of the data: + Below is a list of currently supported standard DHCPv4 options. The "Name" and "Code" + are the values that should be used as a name in the option-data + structures. "Type" designates the format of the data: the meanings of + the various types is given in . + + + Some options are designated as arrays, which means that more than one + value is allowed in such an option. For example the option time-servers + allows the specification of more than one IPv4 address, so allowing + clients to obtain the the addresses of multiple NTP servers. - - - + +
- - + - + @@ -3799,17 +3800,37 @@ Dhcp4/subnet4 [] list (default) - -
List of standard DHCPv4 options
NameCodeTypeArray?
NameCodeTypeArray?
subnet-mask1ipv4-addressfalse
time-offset2uint32false
routers3ipv4-address
routers3ipv4-addresstrue
time-servers4ipv4-addresstrue
name-servers5ipv4-addressfalse
domain-name-servers6ipv4-addresstrue
domain-search119binaryfalse
vivco-suboptions124binaryfalse
vivso-suboptions125binaryfalse
-
+ + + + + + + + + + + + + + + + + + + + + + +
List of standard DHCP option types
NameMeaning
binaryAn arbitrary string of bytes, specified as a set of hexadecimal digits.
booleanBoolean value with allowed values true or false
emptyNo value, data is carried in suboptions
fqdnFully qualified domain name (e.g. www.example.com)
ipv4-addressIPv4 address in the usual dotted-decimal notation (e.g. 192.0.2.1)
ipv6-addressIPv6 address in the usual colon notation (e.g. 2001:db8::1)
recordStructured data that may comprise any types (except "record" and "empty")
stringAny text
uint88 bit unsigned integer with allowed values 0 to 255
uint1616 bit unsinged integer with allowed values 0 to 65535
uint3232 bit unsigned integer with allowed values 0 to 4294967295
+
Custom DHCPv4 options - It is also possible to define new options that are - currently not supported out of the box. Let's assume that we - want to define a new DHCPv4 option called "foo". It will have code 222 - and will convey a single unsigned 32 bit integer value. We can define + It is also possible to define options other than the standard ones. + Assume that we want to define a new DHCPv4 option called "foo" which will have + code 222 and will convey a single unsigned 32 bit integer value. We can define such an option by using the following commands: > config add Dhcp4/option-def @@ -3821,12 +3842,12 @@ Dhcp4/subnet4 [] list (default) > config set Dhcp4/option-def[0]/space "dhcp4" > config set Dhcp4/option-def[0]/encapsulate "" > config commit - Note that this specifies new option format, not the values conveyed in - that option. + 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, concrete values can then - be specified in the same way as standard options. For example the following - commands may be used to define global values that apply to all subnets. + 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 Dhcp4/option-data > config set Dhcp4/option-data[0]/name "foo" @@ -3838,7 +3859,7 @@ Dhcp4/subnet4 [] list (default) New options can take more complex forms than simple use of - primitives (uint8, string, ipv4-address etc). It is possible to + primitives (uint8, string, ipv4-address etc): it is possible to define an option comprising a number of existing primitives. Assume we @@ -3855,7 +3876,12 @@ Dhcp4/subnet4 [] list (default) > config set Dhcp4/option-def[0]/record-types "ipv4-address, uint16, string" > config set Dhcp4/option-def[0]/encapsulate "" - Its values can be later defined as follows: + 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 + list in the "record-types" field and should be those listed in . + + + The values of the option are set as follows: > config add Dhcp4/option-data > config set Dhcp4/option-data[0]/name "bar" @@ -3865,19 +3891,24 @@ Dhcp4/subnet4 [] list (default) > config set Dhcp4/option-data[0]/data "192.0.2.100, 123, Hello World" > config commit - + "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.
DHCPv4 vendor specific options Currently there are three option spaces defined: dhcp4 (to - be used in DHCPv4 daemon) and dhcp4; there is also vendor-opts-space, - which is empty by default, but options can be defined in it. Those options + be used in DHCPv4 daemon), dhcp6, and vendor-opts-space. The last-mentioned + is empty by default but options can be defined in it: those options are called vendor-specific information options. The following examples show how to define an option "foo" with code 1 that consists of IPv4 address, unsigned 16 bit integer and a string. The "foo" option is conveyed in a vendor specific information option. - + + + The first step is to define the format of the option: + > config add Dhcp4/option-def > config set Dhcp4/option-def[0]/name "foo" > config set Dhcp4/option-def[0]/code 1 @@ -3886,8 +3917,10 @@ Dhcp4/subnet4 [] list (default) > config set Dhcp4/option-def[0]/array false > config set Dhcp4/option-def[0]/record-types "ipv4-address, uint16, string" > config set Dhcp4/option-def[0]/encapsulates "" -> config commit - After option format is defined, the next step is to define actual values +> config commit + + (Note that the option space is set to "vendor-encapsulated-option-space".) + Once the option format is defined, the next step is to define actual values for that option: > config add Dhcp4/option-data @@ -3897,7 +3930,7 @@ Dhcp4/subnet4 [] list (default) > config set Dhcp4/option-data[0]/csv-format true > config set Dhcp4/option-data[0]/data "192.0.2.3, 123, Hello World" > config commit - We should also define values for the vendor-opts, that will convey our option foo. + We also set up a dummy value for vendor-opts, the option that conveys our sub-option "foo". > config add Dhcp4/option-data > config set Dhcp4/option-data[1]/name "vendor-encapsulated-options" @@ -3927,10 +3960,12 @@ Dhcp4/subnet4 [] list (default) convey sub-options that use separate numbering scheme, for example sub-options with codes 1 and 2. Those option codes conflict with standard DHCPv4 options, so a separate option - space must be defined. Let's assume that we want to have a - DHCPv4 option with code 222 that conveys two sub-options with - codes 1 and 2. This could be achieved with the following examples. - First we need to define those new sub-options: + space must be defined. + + + Assume that we want to have a DHCPv4 option called "container" with + code 222 that conveys two sub-options with codes 1 and 2. + First we need to define the new sub-options: > config add Dhcp4/option-def > config set Dhcp4/option-def[0]/name "subopt1" @@ -3952,8 +3987,12 @@ Dhcp4/subnet4 [] list (default) > config set Dhcp4/option-def[1]/encapsulate "" > config commit -The next step is to define a regular DHCPv6 option and specify that it -should include options from isc option space: + Note that we have defined the options to belong to a new option space + (in this case, "isc"). + + + The next step is to define a regular DHCPv4 option with our desired + code and specify that it should include options from the new option space: > add Dhcp4/option-def > set Dhcp4/option-def[2]/name "container" @@ -3965,8 +4004,11 @@ should include options from isc option space: > set Dhcp4/option-def[2]/encapsulate "isc" > commit - -Finally, we should specify values for those new options: + The name of the option space in which the sub-options are defined + is set in the "encapsulates" field. + + + Finally, we can set values for the new options: > config add Dhcp4/option-data > config set Dhcp4/option-data[0]/name "subopt1" @@ -3992,26 +4034,31 @@ Finally, we should specify values for those new options: > config set Dhcp4/option-data[2]/data "123" > config commit + Even though the "container" option comprises sub-options, we need to + set dummy values for it so that it is included in the data sent to a + client.
Server Identifier in DHCPv4 - The DHCPv4 protocol uses a "server identifier" for clients to be able - to discriminate between several servers present on the same link: this - value is an IPv4 address of the server. When started for the first time, - the DHCPv4 server will choose one of its IPv4 addresses as its server-id, - and store the chosen value to a file. (The file is named b10-dhcp4-serverid and is - stored in the "local state directory". This is set during installation - when "configure" is run, and can be changed by using "--localstatedir" - on the "configure" command line.) That file will be read by the server - and the contained value used whenever the server is subsequently started. + + The DHCPv4 protocol uses a "server identifier" for clients to be able + to discriminate between several servers present on the same link: this + value is an IPv4 address of the server. When started for the first time, + the DHCPv4 server will choose one of its IPv4 addresses as its server-id, + and store the chosen value to a file. That file will be read by the server + and the contained value used whenever the server is subsequently started. - It is unlikely that this parameter needs to be changed. If such a need - arises, please stop the server, edit the file and restart the server. - It is a text file that should contain an IPv4 address. Spaces are - ignored. No extra characters are allowed in this file. + It is unlikely that this parameter should ever need to be changed. + However, if such a need arises, stop the server, edit the file and restart + the server. (The file is named b10-dhcp4-serverid and by default is + stored in the "var" subdirectory of the directory in which BIND 10 is installed. + This can be changed when BIND 10 is built by using "--localstatedir" + on the "configure" command line.) The file is a text file that should + contain an IPv4 address. Spaces are ignored, and no extra characters are allowed + in this file.
@@ -4340,7 +4387,7 @@ Dhcp6/subnet6/ list 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 fifth line specfies the format in + linkend="dhcp6-option-spaces"/>. 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 @@ -4394,42 +4441,38 @@ Dhcp6/subnet6/ list > config commit - - In future version of Kea versions, it will not be necessary to specify - option code, space and csv-format fields as those fields will be set - automatically. - + + + In future version of Kea versions, it will not be necessary to specify + option code, space and csv-format fields as those fields will be set + automatically. + + - - Below is a list of currently supported standard DHCPv6 options. The name and code - specify name and code that should be used as a name in option-data - structures. Type designates the actual format of the data: - - - uint8 means 8 bit unsigned integer with allowed values 0 to 255. - uint16 means 16 bit unsinged integer with allowed values 0 to 65535. - uint32 means 32 bit unsigned integer with allowed values 0 to 4294967295. - ipv6-address means a normal IPv6 address. - fqdn means fully qualified domain name. - String means any text. - - Some options are designated as arrays, which means that more than one - value is allowed in such an option. For example the option dns-servers - allows the specification of more than one IPv6 address, so allowing - clients to obtain the the addresses of multiple DNS servers. - + + Below is a list of currently supported standard DHCPv6 options. The name and code + specify name and code that should be used as a name in option-data + structures. Type designates the actual format of the data and is one of + the types listed in . + + + Some options are designated as arrays, which means that more than one + value is allowed in such an option. For example the option dns-servers + allows the specification of more than one IPv6 address, so allowing + clients to obtain the the addresses of multiple DNS servers. + - - - - - + +
List of standard DHCPv6 options
NameCodeTypeArray?
+ + + - - + +
List of standard DHCPv6 options
NameCodeTypeArray?