<simpara>
<command>-p <replaceable>port</replaceable></command> -
specifies UDP port the server will listen on. This is only
- useful during testing, as the DHCPv4 server listening on
- ports other than default DHCPv4 ports will not be able to
+ useful during testing, as a DHCPv4 server listening on
+ ports other than the standard ones will not be able to
handle regular DHCPv4 queries.</simpara>
</listitem>
<listitem>
<simpara>
- <command>-v</command> - prints out Kea version and exits.
+ <command>-v</command> - prints out the Kea version and exits.
</simpara>
</listitem>
<listitem>
<simpara>
- <command>-V</command> - prints out Kea extended version with
- additional parameters and exits.
+ <command>-V</command> - prints out the Kea extended version with
+ additional parameters and exits. The listing includes the versions
+ of the libraries dynamically linked to kea.
</simpara>
</listitem>
<listitem>
<simpara>
- <command>-W</command> - prints out Kea configuration report
- and exits.
+ <command>-W</command> - prints out the Kea configuration report
+ and exits. The report is a copy of the
+ <filename>config.report</filename> file produced by
+ <userinput>./configure</userinput>: it is embedded in the
+ executable binary.
</simpara>
</listitem>
</itemizedlist>
- <para>
- The <command>-V</command> command returns the versions of the
- external libraries dynamically linked.
- </para>
-
- <para>
- The <command>-W</command> command describes the environment used
- to build Kea. This command displays a copy of the
- <filename>config.report</filename> file produced by
- <userinput>./configure</userinput> that is embedded in the
- executable binary.
- </para>
-
<para>
The <filename>config.report</filename> may also be accessed more
directly. The following command may be used to extract this
</screen>
</para>
- <para>
- When running in a console, the server can be shut down by
- pressing ctrl-c. It detects the key combination and shuts
- down gracefully.
- </para>
-
<para>
On start-up, the server will detect available network interfaces
and will attempt to open UDP sockets on all interfaces
mentioned in the configuration file.
- </para>
-
- <para>
Since the DHCPv4 server opens privileged ports, it requires root
access. Make sure you run this daemon as root.
</para>
<para>
During startup the server will attempt to create a PID file of the
- form: [localstatedir]/[conf name].kea-dhcp4.pid
+ form: <replaceable>localstatedir</replaceable>/<replaceable>conf name</replaceable>.kea-dhcp4.pid
where:
<itemizedlist>
<listitem>
<simpara><command>localstatedir</command>: The value as passed into the
- build configure script. It defaults to "/usr/local/var". Note
+ build configure script. It defaults to "/usr/local/var". (Note
that this value may be overridden at run time by setting the environment
- variable KEA_PIDFILE_DIR. This is intended primarily for testing purposes.
+ variable KEA_PIDFILE_DIR. This is intended primarily for testing purposes.)
</simpara>
</listitem>
<listitem>
case it would be necessary to manually delete the PID file.
</para>
+ <para>
+ The server can be stopped using the <command>kill</command> command.
+ When running in a console, the server can also be shut down by
+ pressing ctrl-c. It detects the key combination and shuts
+ down gracefully.
+ </para>
+
</section>
<section id="dhcp4-configuration">
</para>
<para>The following paragraphs provide a brief overview of the parameters in
-the above example and
+the above example together with
their format. Subsequent sections of this chapter go into much greater detail
for these and other parameters.</para>
<para>The configuration starts in the first line with the initial
opening curly bracket (or brace). Each configuration consists of
one or more objects. In this specific example, we have only one
-object called Dhcp4. This is a simplified configuration, as usually
+object, called Dhcp4. This is a simplified configuration, as usually
there will be additional objects, like <command>Logging</command> or
<command>DhcpDns</command>, but we omit them now for clarity. The Dhcp4
configuration starts with the <command>"Dhcp4": {</command> line
reasons to keep multiple copies of the same parameter in your configuration
file.</para>
-<para>Moving onto the DHCPv4 configuration elements, the very first few elements
+<para>Moving onto the DHCPv4 configuration elements, the first few elements
define some global parameters. <command>valid-lifetime</command> defines for how long the addresses (leases) given out by the
server are valid. If nothing changes, a client that got an address is allowed to
use it for 4000 seconds. (Note that integer numbers are specified as is,
without any quotes around them.) <command>renew-timer</command> and
-<command>rebind-timer</command> are values that
+<command>rebind-timer</command> are values (also in seconds) that
define T1 and T2 timers that govern when the client will begin the renewal and
rebind procedures. Note that <command>renew-timer</command> and
<command>rebind-timer</command> are optional. If they are not specified the
is more extensive and contains additional parameters. Note that
<command>lease-database</command>
is an object and opens up a new scope, using an opening brace.
-Its parameters (just one in this example -- <command>type</command>)
+Its parameters (just one in this example - <command>type</command>)
follow. Had there been more than one, they would be separated by commas. This
-scope is closed with a closing brace. As more parameters follow, a trailing
-comma is present.</para>
+scope is closed with a closing brace. As more parameters for the Dhcp4 definition
+follow, a trailing comma is present.</para>
<para>Finally, we need to define a list of IPv4 subnets. This is the
most important DHCPv4 configuration structure as the server uses that
</screen>
</para>
-<para>After all parameters are specified, we have two contexts open:
+<para>After all the parameters have been specified, we have two contexts open:
global and Dhcp4, hence we need two closing curly brackets to close them.
In a real life configuration file there most likely would be additional
components defined such as Logging or DhcpDdns, so the closing brace would
Currently there are four database backends available: memfile (which is the
default backend), MySQL, PostgreSQL and CQL.</para>
<section>
- <title>Memfile, Basic Storage for Leases</title>
+ <title>Memfile - Basic Storage for Leases</title>
<para>The server is able to store lease data in different repositories. Larger
deployments may elect to store leases in a database. <xref
linkend="database-configuration4"/> describes this option. In typical
- smaller deployments though, the server will use a CSV file rather than a database to
- store lease information. As well as requiring less administration, an
+ smaller deployments though, the server will store lease information in a CSV file rather
+ than a database. As well as requiring less administration, an
advantage of using a file for storage is that it
eliminates a dependency on third-party database software.</para>
the Dhcp4/lease-database parameters. The <command>type</command> parameter
is mandatory and it specifies which storage for leases the server should use.
The value of <userinput>"memfile"</userinput> indicates that the file should
- be used as the storage. The following list presents the remaining, not mandatory
- parameters, which can be used to configure the Memfile backend.
+ be used as the storage. The following list gives additional, optional,
+ parameters that can be used to configure the Memfile backend.
<itemizedlist>
<listitem>
<listitem>
<simpara><command>lfc-interval</command>: specifies the interval in seconds, at
- which the server (Memfile backend) will perform a lease file cleanup (LFC),
- which removes the redundant (historical) information from the lease file
+ which the server will perform a lease file cleanup (LFC). This
+ removes redundant (historical) information from the lease file
and effectively reduces the lease file size. The cleanup process is described
in more detailed fashion further in this section. The default value of the
<command>lfc-interval</command> is <userinput>0</userinput>, which disables
</itemizedlist>
</para>
- <para>The example configuration of the Memfile backend is presented below:
+ <para>An example configuration of the Memfile backend is presented below:
<screen>
"Dhcp4": {
</para>
<para>It is important to know how the lease file contents are organized
- to understand why the periodic lease file cleanup is needed. Every time when
+ to understand why the periodic lease file cleanup is needed. Every time
the server updates a lease or creates a new lease for the client, the new
lease information must be recorded in the lease file. For performance reasons,
- the server does not supersede the existing client's lease, as it would require
- the lookup of the specific lease entry, but simply appends the new lease
- information at the end of the lease file. The previous lease entries for the
+ the server does not update the existing client's lease in the file, as it would
+ potentially require rewriting the entire file. Instead, it simply appends the new lease
+ information to the end of the file: the previous lease entries for the
client are not removed. When the server loads leases from the lease file, e.g.
at the server startup, it assumes that the latest lease entry for the client
is the valid one. The previous entries are discarded. This means that the
server can re-construct the accurate information about the leases even though
there may be many lease entries for each client. However, storing many entries
for each client results in bloated lease file and impairs the performance of
- the server's startup and reconfiguration, as it needs to process larger number
+ the server's startup and reconfiguration as it needs to process a larger number
of lease entries.
</para>
- <para>The lease file cleanup removes all previous entries for each client and
+ <para>Lease file cleanup (LFC) removes all previous entries for each client and
leaves only the latest ones. The interval at which the cleanup is performed
is configurable, and it should be selected according to the frequency of lease
- renewals initiated by the clients. The more frequent renewals are, the lesser
- value of the <command>lfc-interval</command> should be. Note however, that the
+ renewals initiated by the clients. The more frequent the renewals, the smaller
+ the value of <command>lfc-interval</command> should be. Note however, that the
LFC takes time and thus it is possible (although unlikely) that new cleanup
is started while the previous cleanup instance is still running, if the
<command>lfc-interval</command> is too short. The server would recover from
this by skipping the new cleanup when it detects that the previous cleanup
- is still in progress. But, this implies that the actual cleanups will be
+ is still in progress. But it implies that the actual cleanups will be
triggered more rarely than configured. Moreover, triggering a new cleanup
- adds an overhead to the server, which will not be able to respond to new
+ adds an overhead to the server which will not be able to respond to new
requests for a short period of time when the new cleanup process is spawned.
Therefore, it is recommended that the <command>lfc-interval</command> value
- is selected in a way that would allow for completing the cleanup before the
+ is selected in a way that would allow for the LFC to complete the cleanup before a
new cleanup is triggered.
</para>
- <para>The LFC is performed by a separate process (in background) to avoid
- performance impact on the server process. In order to avoid the conflicts
- between the two processes both using the same lease files, the LFC process
+ <para>Lease file cleanup is performed by a separate process (in background) to avoid
+ a performance impact on the server process. In order to avoid the conflicts
+ between two processes both using the same lease files, the LFC process
operates on the copy of the original lease file, rather than on the lease
file used by the server to record lease updates. There are also other files
being created as a side effect of the lease file cleanup. The detailed
</note>
<para>Lease database configuration is controlled through the Dhcp4/lease-database
- parameters. The type of the database must be set to "memfile", "mysql" or "postgresql",
- e.g.
+ parameters. The type of the database must be set to "memfile", "mysql", "postgresql" or
+ "cql", e.g.
<screen>
"Dhcp4": { "lease-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
</screen>
"Dhcp4": { "lease-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
</screen>
If the database is located on a different system to the DHCPv4 server, the
- database host name must also be specified (although it should be noted that this
- configuration may have a severe impact on server performance):
+ database host name must also be specified. (It should be noted that this
+ configuration may have a severe impact on server performance.):
<screen>
"Dhcp4": { "lease-database": { <userinput>"host": <replaceable>remote-host-name</replaceable></userinput>, ... }, ... }
</screen>
purpose, be it lease or hosts information. This arrangement gives the most
flexibility. Kea can be used to keep leases and host reservations
separately, but can also point to the same database. Currently the
- supported hosts database types are MySQL and PostgreSQL. Cassandra
+ supported hosts database types are MySQL and PostgreSQL. The Cassandra
backend does not support host reservations yet.</para>
<para>Please note that usage of hosts storage is optional. A user can define
<para>Hosts database configuration is controlled through the Dhcp4/hosts-database
parameters. If enabled, the type of the database must be set to "mysql" or
- "postgresql". Other hosts backends may be added in later Kea versions.
+ "postgresql". Other hosts backends may be added in later versions of Kea.
<screen>
"Dhcp4": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
</screen>
Next, the name of the database to hold the reservations must be set: this is the
name used when the lease database was created (see <xref linkend="supported-databases"/>
- for instructions how to setup desired database type).
+ for instructions how to setup the desired database type).
<screen>
"Dhcp4": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
</screen>
If the database is located on a different system than the DHCPv4 server, the
- database host name must also be specified (although it should be noted that this
- configuration may have a severe impact on server performance):
+ database host name must also be specified. (Again it should be noted that this
+ configuration may have a severe impact on server performance.):
<screen>
"Dhcp4": { "hosts-database": { <userinput>"host": <replaceable>remote-host-name</replaceable></userinput>, ... }, ... }
</screen>
</section>
<section id="dhcp4-interface-configuration">
- <title>Interface configuration</title>
+ <title>Interface Configuration</title>
<para>The DHCPv4 server has to be configured to listen on specific network
interfaces. The simplest network interface configuration tells the server to
listen on all available interfaces:
...
}
</screen>
-It is anticipated that this form of usage will only be used when it is desired to
+... although is anticipated that this form of usage will only be used when it is desired to
temporarily override a list of interface names and listen on all interfaces.
</para>
<para>Some deployments of the DHCP servers require that the servers listen
interface, an interface name without any address should be specified.</para>
<para>Kea supports responding to directly connected clients which don't have
- an address configured on the interface yet. This requires that the server
+ an address configured. This requires that the server
injects the hardware address of the destination into the data link layer
of the packet being sent to the client. The DHCPv4 server utilizes the
raw sockets to achieve this, and builds the entire IP/UDP stack for the
rather than capturing whole traffic reaching the interface to which the raw
socket is bound. Therefore, in the deployments where the server doesn't
have to provision the directly connected clients and only receives the
- unicast packets from the relay agents, it is desired to configure the
- DHCP server to utilize the IP/UDP datagram sockets, instead of raw sockets.
+ unicast packets from the relay agents, the
+ DHCP server should be configured to utilize IP/UDP datagram sockets instead of raw sockets.
The following configuration demonstrates how this can be achieved:
<screen>
to handle the traffic from the directly connected clients is currently
supported on Linux and BSD systems only. If the raw sockets are not
supported on the particular OS, the server will issue a warning and
- fall back to use the IP/UDP sockets.</para>
+ fall back to use IP/UDP sockets.</para>
</note>
</section>
<section id="dhcpinform-unicast-issues">
- <title>Issues with unicast responses to DHCPINFORM</title>
+ <title>Issues with Unicast Responses to DHCPINFORM</title>
<para>The use of UDP sockets has certain benefits in deployments
- where the server receives only relayed traffic. These benefits are
- mentioned in the <xref linkend="dhcp4-interface-configuration"/>. From
- the administrator's perspective it is often desired to be able to
+ where the server receives only relayed traffic; these benefits are
+ mentioned in <xref linkend="dhcp4-interface-configuration"/>. From
+ the administrator's perspective it is often desirable to
configure the system's firewall to filter out the unwanted traffic, and
- the use of UDP sockets facilitates it. However, the administrator must
+ the use of UDP sockets facilitates this. However, the administrator must
also be aware of the implications related to filtering certain types
of traffic as it may impair the DHCP server's operation.
</para>
<para>In this section we are focusing on the case when the server
receives the DHCPINFORM message from the client via a relay. According
- to the <ulink url="http://tools.ietf.org/html/rfc2131">RFC 2131</ulink>,
+ to <ulink url="http://tools.ietf.org/html/rfc2131">RFC 2131</ulink>,
the server should unicast the DHCPACK response to the address carried in
- the 'ciaddr' field. When the UDP socket is in use, the DHCP server
+ the "ciaddr" field. When the UDP socket is in use, the DHCP server
relies on the low level functions of an operating system to build the
data link, IP and UDP layers of the outgoing message. Typically, the
OS will first use ARP to obtain the client's link layer address to be
<section id="dhcp4-address-config">
<title>Configuration of IPv4 Address Pools</title>
<para>
- The essential role of DHCPv4 server is address assignment. The server has to
- be configured with at least one subnet and one pool of dynamic addresses to
- be managed. For example, assume that the server is connected to a network
+ The main role of a DHCPv4 server is address assignment. For this, the server has to
+ be configured with at least one subnet and one pool of dynamic addresses for it to manage.
+ For example, assume that the server is connected to a network
segment that uses the 192.0.2.0/24 prefix. The Administrator of that network
has decided that addresses from range 192.0.2.10 to 192.0.2.20 are going to
be managed by the Dhcp4 server. Such a configuration can be achieved in the
</section>
<section id="dhcp4-std-options">
- <title>Standard DHCPv4 options</title>
+ <title>Standard DHCPv4 Options</title>
<para>
One of the major features of the DHCPv4 server is to provide configuration
- options to clients. Most of the options are sent by the server, only if the
+ options to clients. Most of the options are sent by the server only if the
client explicitly requests them using the Parameter Request List option.
- Those that do not require being requested using the Parameter Request List
+ Those that do not require inclusion in the Parameter Request List
option are commonly used options, e.g. "Domain Server", and options which
require special behavior, e.g. "Client FQDN" is returned to the client
if the client has included this option in its message to the server.
</para>
<para>
- The <xref linkend="dhcp4-std-options-list"/> comprises the list of the
- standard DHCPv4 options, whose values can be configured using the
+ <xref linkend="dhcp4-std-options-list"/> comprises the list of the
+ standard DHCPv4 options whose values can be configured using the
configuration structures described in this section. This table excludes
the options which require special processing and thus cannot be configured
- with some fixed values. The last column of this table specifies which
+ with some fixed values. The last column of the table indicates which
options can be sent by the server even when they are not requested in
- the Parameter Request list option, and which are sent only when
- explicitly requested. These options are marked with the values
- 'true' and 'false' respectively.
+ the Parameter Request list option, and those which are sent only when
+ explicitly requested.
</para>
<para>
allowed to create custom definitions for standard options, even if the
definition being created matches the actual option format defined in the
RFCs. There is an exception from this rule for standard options for which
- Kea does not provide a definition yet. In order to use such options,
+ Kea currently does not provide a definition. In order to use such options,
a server administrator must create a definition as described in
<xref linkend="dhcp4-custom-options"/> in the 'dhcp4' option space. This
definition should match the option format described in the relevant
- RFC but the configuration mechanism will allow any option format as it has
- no means to validate the format at the moment.
+ RFC but the configuration mechanism will allow any option format as it
+ presently has no means to validate it.
</para>
<para>
<title>Custom DHCPv4 options</title>
<para>Kea supports custom (non-standard) DHCPv4 options. 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
+ will have a code of 222 and will convey a single unsigned 32 bit
integer value. We can define such an option by using the
following entry in the configuration file:
<screen>
</screen>
The <command>false</command> value of the <command>array</command>
parameter determines that the option does NOT comprise an array of
- "uint32" values but rather a single value. Two other parameters have been
+ "uint32" values but is, instead, a single value. Two other parameters have been
left blank: <command>record-types</command> and
<command>encapsulate</command>. The former specifies the comma separated
list of option data fields if the option comprises a record of data
</screen>
The <command>type</command> 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 <command>record-types</command> field and should be those listed in <xref linkend="dhcp-types"/>.
+ list in the <command>record-types</command> field and should be ones from those listed in <xref linkend="dhcp-types"/>.
</para>
<para>
The values of the option are set as follows:
<command>false</command>, without quotes. Some specific boolean parameters may
accept also <command>"true"</command>, <command>"false"</command>,
<command>0</command>, <command>1</command>, <command>"0"</command> and
- <command>"1"</command>. Future Kea versions will accept all those values
+ <command>"1"</command>. Future versions of Kea will accept all those values
for all boolean parameters.</para>
</note>
</section>
Currently there are two option spaces defined for the DHCPv4 daemon:
"dhcp4" (for the top level DHCPv4 options) and
"vendor-encapsulated-options-space", which is empty by default but
- options can be defined in it. Those options will be carried in the
+ in which options can be defined. Such options will be carried in the
Vendor Specific Information option (code 43). The following examples
- show how to define an option "foo", with code 1, that consists of an
+ show how to define an option "foo" in that space that has a code of
+ 1, and comprises an
IPv4 address, an unsigned 16 bit integer and a string. The "foo"
option is conveyed in a Vendor Specific Information option.
</para>
<section id="dhcp4-option-spaces">
<title>Nested DHCPv4 Options (Custom Option Spaces)</title>
- <para>It is sometimes useful to define completely new option
+ <para>It is sometimes useful to define a completely new option
space. This is the case when user creates new option in the
standard option space ("dhcp4") and wants this option
to convey sub-options. Since they are in a separate space,
</para>
<para>
Assume that we want to have a DHCPv4 option called "container" with
- code 222 that conveys two sub-options with codes 1 and 2.
+ code of 222 that conveys two sub-options with codes 1 and 2.
First we need to define the new sub-options:
<screen>
"Dhcp4": {
</section>
<section id="dhcp4-option-data-defaults">
- <title>Unspecified parameters for DHCPv4 option configuration</title>
+ <title>Unspecified Parameters for DHCPv4 Option Configuration</title>
<para>In many cases it is not required to specify all parameters for
an option configuration and the default values may be used. However, it is
important to understand the implications of not specifying some of them
defaults to an empty value. The empty value is mostly used for the
options which have no payload (boolean options), but it is legal to specify
empty values for some options which carry variable length data and which
- spec allows for the length of 0. For such options, the data parameter
+ the specification allows for the length of 0. For such options, the data parameter
may be omitted in the configuration.</simpara>
</listitem>
</section>
<section id="dhcp4-stateless-configuration">
- <title>Stateless Configuration of DHCPv4 clients</title>
+ <title>Stateless Configuration of DHCPv4 Clients</title>
<para>The DHCPv4 server supports the stateless client configuration whereby the
client has an IP address configured (e.g. using manual configuration) and only
- contacts the server to obtain other configuration parameters, e.g. DNS servers' addresses.
+ contacts the server to obtain other configuration parameters, e.g. addresses of DNS servers.
In order to obtain the stateless configuration parameters the client sends the
DHCPINFORM message to the server with the "ciaddr" set to the address that the
client is currently using. The server unicasts the DHCPACK message to the
</para>
<para>The server will respond to the DHCPINFORM when the client is associated
- with the particular subnet defined in the server's configuration. The example
+ with a subnet defined in the server's configuration. An example
subnet configuration will look like this:
<screen>
"Dhcp4": {
Kea can be instructed to limit access to given subnets based on class information.
This is particularly useful for cases where two types of devices share the
same link and are expected to be served from two different subnets. The
- primary use case for such a scenario is cable networks. There are two
+ primary use case for such a scenario is cable networks. Here, there are two
classes of devices: the cable modem itself, which should be handed a lease
from subnet A and all other devices behind the modem that should get a lease
from subnet B. That segregation is essential to prevent overly curious
The process of doing classification is conducted in three steps. The first step
is to assess an incoming packet and assign it to zero or more classes. The
second step is to choose a subnet, possibly based on the class information.
- The third step is to assign options again possibly based on the class
+ The third step is to assign options, again possibly based on the class
information.
</para>
</para></note>
<section>
- <title>Setting fixed fields in Classification</title>
+ <title>Setting Fixed Fields in Classification</title>
<para>
It is possible to specify that clients belonging to a particular class
should receive packets with specific values in certain fixed fields.
</para>
<para>
Obviously, there are many ways to assign clients to specific classes,
- but for the iPXE clients the client architecture type option (code 93,
- defined in RFC4578, Section 2.1) seems to be particularly suited to
+ but for the PXE clients the client architecture type option (code 93)
+ seems to be particularly suited to
make the distinction. The following example checks if the client
identifies itself as PXE device with architecture EFI x86-64, and
- sets several fields if it does. See Section 2.1 of the RFC4578 or
- documentation of your client for specific values.
+ sets several fields if it does. See
+ <ulink url="https://tools.ietf.org/html/rfc4578#section-2.1">Section 2.1 of RFC 4578</ulink>)
+ or the documentation of your client for specific values.
</para>
<screen>
"Dhcp4": {
}</screen>
<para>
- If there are multiple classes defined and incoming packet is matched
- to multiple classes, then the classes are processed in the order in
- which they're defined. In this case the last matching class
+ If there are multiple classes defined and an incoming packet is matched
+ to multiple classes, the classes are processed in the order in
+ which they are defined. In this case the last matching class
"overwrites" any values that may have been set by earlier matched
classes.
</para>
<para>
The server checks whether an incoming packet includes the vendor class identifier
option (60). If it does, the content of that option is prepended with
- "VENDOR_CLASS_" then it is interpreted as a class. For example,
+ "VENDOR_CLASS_", it is interpreted as a class. For example,
modern cable modems will send this option with value "docsis3.0"
and as a result the packet will belong to class "VENDOR_CLASS_docsis3.0".
</para>
+ <note>
<para>
Note: Kea 1.0 and earlier versions performed special actions for
clients that were in VENDOR_CLASS_docsis3.0. This is no longer the
- case in Kea 1.1 and newer. In those newer versions the old behavior
+ case in Kea 1.1 and later. In these versions the old behavior
can be achieved by defining VENDOR_CLASS_docsis3.0 and setting
its next-server and boot-file-name values appropriately.
</para>
+ </note>
<para>
This example shows a configuration using an automatically generated
- "VENDOR_CLASS_" class. The Administrator of the network has
+ "VENDOR_CLASS_" class. The administrator of the network has
decided that addresses from range 192.0.2.10 to 192.0.2.20 are
going to be managed by the Dhcp4 server and only clients belonging to the
docsis3.0 client class are allowed to use that pool.
<title>Defining and Using Custom Classes</title>
<para>
The following example shows how to configure a class using an expression
- and a subnet making use of that class. This configuration defines the
+ and a subnet that makes use of the class. This configuration defines the
class named "Client_foo".
It is comprised of all clients who's client ids (option 61) start with the
string "foo". Members of this class will be given addresses from
- 192.0.2.10 to 192.0.2.20 and 192.0.2.1 and 192.0.2.2 as their domain name
- servers. For a deeper discussion of the classification process see
- <xref linkend="classify"/>.
+ 192.0.2.10 to 192.0.2.20 and will the the address of their DNS servers
+ set to 192.0.2.1 and 192.0.2.2. For a deeper discussion of the classification process,
+ see <xref linkend="classify"/>.
<screen>
"Dhcp4": {
<para>
In order for NCRs to reach the D2 server, kea-dhcp4 must be able
to communicate with it. kea-dhcp4 uses the following configuration
- parameters to control how it communications with D2:
+ parameters to control this communication:
<itemizedlist>
<listitem><simpara>
<command>enable-updates</command> - determines whether or not kea-dhcp4 will
In the second case, lease renewal, two DDNS requests will be issued: one
request to remove entries for the previous FQDN and a second request to
add entries for the new FQDN. In the last case, a lease release, a
- single DDNS request to remove its entries will be made. The decision
- making involved when granting a new lease (the first case) is more
- involved and is discussed next.
+ single DDNS request to remove its entries will be made.
</para>
- <para>
- When a new lease is granted, kea-dhcp4 will generate a DDNS
+ <para>The decision making involved when granting a new lease (the first case) is more
+ involved. When a new lease is granted, kea-dhcp4 will generate a DDNS
update request if the DHCP REQUEST contains either the FQDN option
(code 81) or the Host Name option (code 12). If both are present,
the server will use the FQDN option. By default kea-dhcp4
the name submitted to D2 in the DDNS update request.
</para>
</section>
+
<section id="dhcpv4-fqdn-name-generation">
<title>kea-dhcp4 name generation for DDNS update requests</title>
<para>Each NameChangeRequest must of course include the fully qualified domain
<section id="dhcp4-next-server">
<title>Next Server (siaddr)</title>
- <para>In some cases, clients want to obtain configuration from the TFTP server.
+ <para>In some cases, clients want to obtain configuration from a TFTP server.
Although there is a dedicated option for it, some devices may use the siaddr field
in the DHCPv4 packet for that purpose. That specific field can be configured
using <command>next-server</command> directive. It is possible to define it in the global scope or
<ulink url="http://tools.ietf.org/html/rfc6842">RFC 6842</ulink>.
for details. That
behavior has changed with the publication of
- <ulink url="http://tools.ietf.org/html/rfc6842">RFC 6842</ulink>.
+ <ulink url="http://tools.ietf.org/html/rfc6842">RFC 6842</ulink>
which updated
<ulink url="http://tools.ietf.org/html/rfc2131">RFC 2131</ulink>.
- That update now states that the server must
- send client-id if the client sent it. That is the default behavior
- that Kea offers. However, in some cases older devices that do
- not support
+ That update states that the server must
+ send client-id if the client sent it. That is Kea's default behavior.
+ However, in some cases older devices that do not support
<ulink url="http://tools.ietf.org/html/rfc6842">RFC 6842</ulink>.
may refuse to accept responses that include the
client-id option. To enable backward compatibility, an optional
<section id="dhcp4-match-client-id">
<title>Using Client Identifier and Hardware Address</title>
- <para>DHCP server must be able to identify the client (distinguish it from
+ <para>The DHCP server must be able to identify the client (and distinguish it from
other clients) from which it receives the message. There are many reasons
- why this identification is required and the most important ones are listed
- below.
+ why this identification is required and the most important ones are:
<itemizedlist>
<listitem><simpara>When the client contacts the server to allocate a new
lease, the server must store the client identification information in
<para>DHCPv4 makes use of two distinct identifiers which are placed
by the client in the queries sent to the server and copied by the server
- to its responses to the client: 'chaddr' and 'client identifier'. The
+ to its responses to the client: "chaddr" and "client identifier". The
former was introduced as a part of the BOOTP specification and it is also
used by DHCP to carry the hardware address of the interface used to send
the query to the server (MAC address for the Ethernet). The latter is
- carried in the Client-identifier option, introduced in the
+ carried in the Client-identifier option, introduced in
<ulink url="http://tools.ietf.org/html/rfc2132">RFC 2132</ulink>.
</para>
- <para>The <ulink url="http://tools.ietf.org/html/rfc2131">RFC 2131</ulink>
+ <para><ulink url="http://tools.ietf.org/html/rfc2131">RFC 2131</ulink>
indicates that the server may use both of these identifiers to identify
- the client but the 'client identifier', if present, takes precedence
- over 'chaddr'. One of the reasons for this is that 'client identifier'
+ the client but the "client identifier", if present, takes precedence
+ over "chaddr". One of the reasons for this is that "client identifier"
is independent from the hardware used by the client to communicate with
the server. For example, if the client obtained the lease using one
network card and then the network card is moved to another host, the
server will wrongly identify this host is the one which has obtained
- the lease. Moreover, the
+ the lease. Moreover,
<ulink url="https://tools.ietf.org/html/rfc4361">RFC 4361</ulink> gives
- the recommendation to use DUID
- (see <ulink url="https://tools.ietf.org/html/rfc3315">DHCPv6 specification</ulink>)
- carried as 'client identifier' when dual stack networks are in use,
+ the recommendation to use a DUID
+ (see <ulink url="https://tools.ietf.org/html/rfc3315">RFC 3315</ulink>,
+ the DHCPv6 specification)
+ carried as "client identifier" when dual stack networks are in use
to provide consistent identification information of the client, regardless
of the protocol type it is using. Kea adheres to these specifications and
- the 'client identifier' by default takes precedence over the value carried
- in 'chaddr' field when the server searches, creates, updates or removes
+ the "client identifier" by default takes precedence over the value carried
+ in "chaddr" field when the server searches, creates, updates or removes
the client's lease.
</para>
<para>When the server receives a DHCPDISCOVER or DHCPREQUEST message from the
client, it will try to find out if the client already has a lease in the
- database and will hand out the existing lease rather than allocate
+ database and will hand out that lease rather than allocate
a new one. Each lease in the lease database is associated with the
- 'client identifier' and/or 'chaddr'. The server will first use the
- 'client identifier' (if present) to search the lease. If the lease is
+ "client identifier" and/or "chaddr". The server will first use the
+ "client identifier" (if present) to search the lease. If the lease is
found, the server will treat this lease as belonging to the client
- even if the current 'chaddr' and the 'chaddr' associated with
+ even if the current "chaddr" and the "chaddr" associated with
the lease do not match. This facilitates the scenario when the network card
on the client system has been replaced and thus the new MAC address
appears in the messages sent by the DHCP client. If the server fails
- to find the lease using the 'client identifier' it will perform another lookup
- using the 'chaddr'. If this lookup returns no result, the client is
+ to find the lease using the "client identifier" it will perform another lookup
+ using the "chaddr". If this lookup returns no result, the client is
considered as not having a lease and the new lease will be created.
</para>
- <para>A common problem reported by network operators is that bogus
- client implementations do not use stable client identifiers such as
- generating a new 'client identifier' each time the client connects
+ <para>A common problem reported by network operators is that poor
+ client implementations do not use stable client identifiers, instead
+ generating a new "client identifier" each time the client connects
to the network. Another well known case is when the client changes its
- 'client identifier' during the multi-stage boot process (PXE). In such
+ "client identifier" during the multi-stage boot process (PXE). In such
cases, the MAC address of the client's interface remains stable and
- using 'chaddr' field to identify the client guarantees that the
+ using "chaddr" field to identify the client guarantees that the
particular system is considered to be the same client, even though its
- 'client identifier' changes.
+ "client identifier" changes.
</para>
<para>To address this problem, Kea includes a configuration option
- which enables client identification using 'chaddr' only by instructing
- the server to disregard server to "ignore" the 'client identifier' during
+ which enables client identification using "chaddr" only by instructing
+ the server to disregard server to "ignore" the "client identifier" during
lease lookups and allocations for a particular subnet. Consider the following
simplified server configuration:</para>
<screen>
<para>The <command>match-client-id</command> is a boolean value which
controls this behavior. The default value of <userinput>true</userinput>
- indicates that the server will use the 'client identifier' for lease
- lookups and 'chaddr' if the first lookup returns no results. The
+ indicates that the server will use the "client identifier" for lease
+ lookups and "chaddr" if the first lookup returns no results. The
<command>false</command> means that the server will only
- use the 'chaddr' to search for client's lease. Whether the DHCID for
- DNS updates is generated from the 'client identifier' or 'chaddr' is
+ use the "chaddr" to search for client"s lease. Whether the DHCID for
+ DNS updates is generated from the "client identifier" or "chaddr" is
controlled through the same parameter accordingly.</para>
<para>The <command>match-client-id</command> parameter may appear
<para>It is important to explain what happens when the client obtains
its lease for one setting of the <command>match-client-id</command>
- and then renews when the setting has been changed. Let's first consider
+ and then renews when the setting has been changed. First consider
the case when the client obtains the lease when the
<command>match-client-id</command> is set to <userinput>true</userinput>.
- The server will store the lease information including 'client identifier'
- (if supplied) and 'chaddr' in the lease database. When the setting is
+ The server will store the lease information including "client identifier"
+ (if supplied) and "chaddr" in the lease database. When the setting is
changed and the client renews the lease the server will determine that
- it should use the 'chaddr' to search for the existing lease. If the
+ it should use the "chaddr" to search for the existing lease. If the
client hasn't changed its MAC address the server should successfully
- find the existing lease. The 'client identifier' associated with the
+ find the existing lease. The "client identifier" associated with the
returned lease is ignored and the client is allowed to use this lease.
- When the lease is renewed only the 'chaddr' is recorded for this
+ When the lease is renewed only the "chaddr" is recorded for this
lease according to the new server setting.
</para>
- <para>In the second case the client has the lease with only a 'chaddr'
+ <para>In the second case the client has the lease with only a "chaddr"
value recorded. When the setting is changed to
<command>match-client-id</command> set to <userinput>true</userinput>
- the server will first try to use the 'client identifier' to find the
+ the server will first try to use the "client identifier" to find the
existing client's lease. This will return no results because the
- 'client identifier' was not recorded for this lease. The server will
- then use the 'chaddr' and the lease will be found. If the lease appears
- to have no 'client identifier' recorded, the server will assume that
+ "client identifier" was not recorded for this lease. The server will
+ then use the "chaddr" and the lease will be found. If the lease appears
+ to have no "client identifier" recorded, the server will assume that
this lease belongs to the client and that it was created with the previous
setting of the <command>match-client-id</command>.
- However, if the lease contains 'client identifier' which is different
- from the 'client identifier' used by the client the lease will be
+ However, if the lease contains "client identifier" which is different
+ from the "client identifier" used by the client the lease will be
assumed to belong to another client and the new lease will be
allocated.
</para>
</section>
-" <section id="dhcp4-dhcp4o6-config">
- <title>DHCPv4-over-DHCPv6 DHCPv4 side</title>
+ <section id="dhcp4-dhcp4o6-config">
+ <title>DHCPv4-over-DHCPv6: DHCPv4 Side</title>
<para>
- The support of DHCPv4-over-DHCPv6 transport
+ The support of DHCPv4-over-DHCPv6 transport is described in
<ulink url="http://tools.ietf.org/html/rfc7341">RFC 7341</ulink>
- is implemented using cooperating DHCPv4 and DHCPv6 servers.
+ and is implemented using cooperating DHCPv4 and DHCPv6 servers.
This section is about the configuration of the DHCPv4 side
(the DHCPv6 side is described in <xref linkend="dhcp6-dhcp4o6-config"/>).
</para>
<note>
DHCPv4-over-DHCPv6 support is experimental and the details of
- the inter-process communication can change: DHCPv4 and DHCPv6
- should run the same version of Kea.
+ the inter-process communication can change: both the
+ DHCPv4 and DHCPv6 sides should be running the same version of Kea.
</note>
<para>
The <command>dhcp4o6-port</command> global parameter specifies
<title>Host Reservation in DHCPv4</title>
<para>There are many cases where it is useful to provide a configuration on
- a per host basis. The most obvious one is to reserve specific, static
- address for exclusive use by a given client (host) ‐ returning client will
+ a per host basis. The most obvious one is to reserve a specific, static
+ address for exclusive use by a given client (host) ‐ the returning client will
receive the same address from the server every time, and other clients will
- generally not receive that address. Note that there may be cases when the
+ generally not receive that address.
+ Another example when the host reservations are applicable is when a host
+ that has specific requirements, e.g. a printer that needs additional DHCP options.
+ Yet another possible use case is to define unique names for hosts.</para>
+
+ <para>Note that there may be cases when the
new reservation has been made for the client for the address being currently
in use by another client. We call this situation a "conflict". The conflicts
- get resolved automatically over time as described in the subsequent sections.
- Once conflict is resolved, the client will keep receiving the reserved
+ get resolved automatically over time as described in subsequent sections.
+ Once the conflict is resolved, the client will keep receiving the reserved
configuration when it renews.</para>
- <para>Another example when the host reservations are applicable is when a host
- that has specific requirements, e.g. a printer that needs additional DHCP options.
- Yet another possible use case is to define unique names for hosts.</para>
-
- <para>Hosts reservations are defined as parameters for each subnet. Each host
- has to be identified by an identifier, for example hardware/MAC address. There is an optional
+ <para>Host reservations are defined as parameters for each subnet. Each host
+ has to be identified by an identifier, for example the hardware/MAC address. There is an optional
<command>reservations</command> array in the <command>Subnet4</command>
- element. Each element in that array is a structure, that holds information
- about reservations for a single host. In particular, such a structure has
- to have an identifier that uniquely identifies a host. In DHCPv4 context, such an
+ element. Each element in that array is a structure that holds information
+ about reservations for a single host. In particular, the structure has
+ to have an identifier that uniquely identifies a host. In the DHCPv4 context, the
identifier is usually a hardware or MAC address. In most cases an IP address
will be specified. It is also possible to specify a hostname, host
specific options or fields carried within DHCPv4 message such as siaddr,
The first entry reserves the 192.0.2.202 address for the client that uses
a MAC address of 1a:1b:1c:1d:1e:1f. The second entry reserves the address
192.0.2.100 and the hostname of alice-laptop for the client using a DUID
- 0a:0b:0c:0d:0e:0f. Note that if you plan to do DNS updates, it
- is strongly recommended for the hostnames to be unique. The third
+ 0a:0b:0c:0d:0e:0f. (Note that if you plan to do DNS updates, it
+ is strongly recommended for the hostnames to be unique.) The third
example reserves address 192.0.3.203 to a client whose request
would be relayed by a relay agent that inserts a circuid-it option
with the value 'charter950'. The fourth entry reserves address
<para>The above example is used for ilustrational purposes only
and in actual deployments it is recommended to use as few types as possible
- (preferably just one). See <xref linkend="reservations4-tuning"/> for detailed
- discussion.</para>
+ (preferably just one). See <xref linkend="reservations4-tuning"/> for a detailed
+ discussion of this point.</para>
<para>Making a reservation for a mobile host that may visit multiple subnets
requires a separate host definition in each subnet it is expected to visit.
It is not allowed to define multiple host definitions with the same hardware
- address in a single subnet. It is a valid configuration, if such definitions
- are specified in different subnets, though.
+ address in a single subnet. Multiple host definitions with the same hardware
+ address are valid if each is in a different subnet.
</para>
<para>Adding host reservation incurs a performance penalty. In principle,
- when the server that does not support host reservation responds to a query,
+ when a server that does not support host reservation responds to a query,
it needs to check whether there is a lease for a given address being
considered for allocation or renewal. The server that also supports host
- reservation, has to perform additional checks: not only if the address is
- currently used (if there is a lease for it), but also whether the address
- could be used by someone else (if there is a reservation for it). That
- additional check incurs performance penalty.</para>
+ reservation has to perform additional checks: not only if the address is
+ currently used (i.e. if there is a lease for it), but also whether the address
+ could be used by someone else (i.e. there is a reservation for it). That
+ additional check incurs additional overhead.</para>
<section id="reservation4-types">
<title>Address Reservation Types</title>
<para>In a typical scenario there is an IPv4 subnet defined,
e.g. 192.0.2.0/24, with certain part of it dedicated for dynamic allocation
by the DHCPv4 server. That dynamic part is referred to as a dynamic pool or
- simply a pool. In principle, the host reservation can reserve any address
+ simply a pool. In principle, a host reservation can reserve any address
that belongs to the subnet. The reservations that specify addresses that
belong to configured pools are called <command>in-pool reservations</command>.
In contrast, those that do not belong to dynamic pools are called
<command>out-of-pool reservations</command>. There is no formal difference
- in the reservation syntax. As of 0.9.1, both reservation types are
+ in the reservation syntax and both reservation types are
handled uniformly. However, upcoming releases may offer improved performance
if there are only out-of-pool reservations as the server will be able
to skip reservation checks when dealing with existing leases. Therefore,
- system administrators are encouraged to use out-of-pool reservations, if
+ system administrators are encouraged to use out-of-pool reservations if
possible.</para>
</section>
<para>As the reservations and lease information are stored separately,
conflicts may arise. Consider the following series of events. The server
has configured the dynamic pool of addresses from the range of 192.0.2.10 to
- 192.0.2.20. The Host A requests an address and gets 19.0.2.10. Now the system
- administrator decides to reserve the address for the Host B. He decides to
- reserve 192.0.2.10 for that purpose. In general, reserving an address that
+ 192.0.2.20. Host A requests an address and gets 192.0.2.10. Now the system
+ administrator decides to reserve address 192.0.2.10 for Host B.
+ In general, reserving an address that
is currently assigned to someone else is not recommended, but there are
valid use cases where such an operation is warranted.</para>
<para>The server now has a conflict to resolve. Let's analyze the
situation here. If the Host B boots up and requests an address, the server is
- not able to assign the reserved address 192.0.2.10 for the Host B. A naive
+ not able to assign the reserved address 192.0.2.10 for Host B. A naive
approach would to be immediately remove the existing lease for the Host A
and create a new one for the Host B. That would not solve the problem,
though, because as soon as the Host B gets the address, it will detect
reservation for that host and the reserved address 192.0.2.10 is not used,
so it will be granted.</para> -->
- <para>When the Host A renews its address, the server will discover that
- the address being renewed is now reserved for another host - the Host
+ <para>When Host A renews its address, the server will discover that
+ the address being renewed is now reserved for another host - Host
B. Therefore the server will inform the Host A that it is no longer
- allowed to use it by sending DHCPNAK message. The server will not remove the
+ allowed to use it by sending a DHCPNAK message. The server will not remove the
lease, though, as there's small chance that the DHCPNAK may be lost if the
network is lossy. If that happens, the client will not receive any
responses, so it will retransmit its DHCPREQUEST packet. Once the
- DHCPNAK is received by the Host A, it will then revert to the server
+ DHCPNAK is received by Host A, it will revert to the server
discovery and will eventually get a different address. Besides
allocating a new lease, the server will also remove the old one. As
- a result, the address 192.0.2.10 will be no longer used. When Host B
+ a result, address 192.0.2.10 will become free . When Host B
tries to renew its temporarily assigned address, the server will detect
that it has a valid lease, but there is a reservation for a different
address. The server will send DHCPNAK to inform Host B that its address
is no longer usable, but will keep its lease (again, the DHCPNAK may be
lost, so the server will keep it, until the client returns for a new
- address). The Host B will revert to the server discovery phase and will
+ address). Host B will revert to the server discovery phase and will
eventually send a DHCPREQUEST message. This time the server will find
out that there is a reservation for that host and the reserved address
192.0.2.10 is not used, so it will be granted. It will also remove the
- lease for the temporarily assigned address that the Host B previously
+ lease for the temporarily assigned address that Host B previously
obtained.</para>
<para>This recovery will succeed, even if other hosts will attempt to get
<para>This recovery mechanism allows the server to fully recover from a
case where reservations conflict with the existing leases. This procedure
- takes time and will roughly take as long as renew-timer value specified.
+ takes time and will roughly take as long as the value set for of renew-timer.
The best way to avoid such recovery is to not define new reservations that
conflict with existing leases. Another recommendation is to use
out-of-pool reservations. If the reserved address does not belong to a
- pool, there is no way that other clients could get this address (note that
- having multiple reservations for the same address is not allowed).
+ pool, there is no way that other clients could get this address.
</para>
</section>
<section id="reservation4-hostname">
<title>Reserving a Hostname</title>
- <para>When the reservation for a client includes the <command>hostname
- </command>, the server will return this hostname to the client in
- the Client FQDN or Hostname option. The server responds with the Client
+ <para>When the reservation for a client includes the <command>hostname</command>,
+ the server will return this hostname to the client in
+ the Client FQDN or Hostname options. The server responds with the Client
FQDN option only if the client has included Client FQDN option in its
message to the server. The server will respond with the Hostname option
- if the client has included Hostname option in its message to the server,
- or when the client has requested Hostname option using Parameter Request
- List option. The server will return Hostname option even if it is not
+ if the client included Hostname option in its message to the server
+ or when the client requested Hostname option using Parameter Request
+ List option. The server will return the Hostname option even if it is not
configured to perform DNS updates. The reserved hostname always takes
precedence over the hostname supplied by the client or the autogenerated
(from the IPv4 address) hostname.</para>
linkend="dhcp4-std-options" />), custom options (see <xref
linkend="dhcp4-custom-options"/>) or vendor specific options
(see <xref linkend="dhcp4-vendor-opts" />). The following
- example showcases how standard options can be defined.</para>
+ example demonstrates how standard options can be defined.</para>
<screen>
{
<title>Reserving Next Server, Server Hostname and Boot File Name</title>
<para>BOOTP/DHCPv4 messages include "siaddr", "sname" and "file" fields.
Even though, DHCPv4 includes corresponding options, such as option 66 and
- option 67, some clients may not support these options. Thus, server
- administrators often use "siaddr", "sname" and "file" fields instead.</para>
+ option 67, some clients may not support these options. For this reason, server
+ administrators often use the "siaddr", "sname" and "file" fields instead.</para>
<para>With Kea, it is possible to make static reservations for these DHCPv4
message fields:</para>
<section id="reservation4-client-classes">
<title>Reserving Client Classes in DHCPv4</title>
- <para>The <xref linkend="classification-using-expressions"/> explains how
+ <para><xref linkend="classification-using-expressions"/> explains how
to configure the server to assign classes to a client based on the content
of the options that this client sends to the server. Host reservations
mechanisms also allow for statically assigning classes to the clients.
The definitions of these classes must exist in the Kea
configuration. The following configuration snippet shows how to specify
- that the client belongs to classes <command>reserved-class1</command>
+ that a client belongs to classes <command>reserved-class1</command>
and <command>reserved-class2</command>. Those classes are associated with
specific options being sent to the clients which belong to them.
</para>
It is possible to store host reservations in MySQL or PostgreSQL database. See
<xref linkend="hosts-storage4"/> for information on how to configure Kea to use
reservations stored in MySQL or PostgreSQL. Kea does not provide any dedicated
- tools for managing reservations in a database. See Kea wiki <ulink
- url="http://kea.isc.org/wiki/HostReservationsHowTo" /> for detailed
+ tools for managing reservations in a database. The Kea wiki <ulink
+ url="http://kea.isc.org/wiki/HostReservationsHowTo" /> provides detailed
information and examples of how reservations can be inserted into the
database.
</para>
<section id="reservations4-tuning">
<title>Fine Tuning DHCPv4 Host Reservation</title>
- <para>Host reservation capability introduces additional restrictions for the
- allocation engine during lease selection and renewal. In particular, three
+ <para>The Host reservation capability introduces additional restrictions for the
+ allocation engine (the component of Kea that selects an address for a client)
+ during lease selection and renewal. In particular, three
major checks are necessary. First, when selecting a new lease, it is not
sufficient for a candidate lease to not be used by another DHCP client. It
also must not be reserved for another client. Second, when renewing a lease,
additional check must be performed whether the address being renewed is not
reserved for another client. Finally, when a host renews an address, the server
- has to check whether there's a reservation for this host, so the existing
+ has to check whether there is a reservation for this host, so the existing
(dynamically allocated) address should be revoked and the reserved one be
used instead.
</para>
- <para>Some of those checks may be unnecessary in certain deployments. Not
- performing them may improve performance. The Kea server provides the
+ <para>Some of those checks may be unnecessary in certain deployments and not
+ carrying them out them may improve performance. The Kea server provides the
<command>reservation-mode</command> configuration parameter to select the
types of reservations allowed for the particular subnet. Each reservation
type has different constraints for the checks to be performed by the
dynamic pool. Therefore it can skip the reservation checks when dealing
with in-pool addresses, thus improving performance. Do not use this mode
if any of your reservations use in-pool address. Caution is advised when
- using this setting. Kea 1.1.0 does not sanity check the reservations against
- <command>reservation-mode</command>. Misconfiguration may cause problems.
+ using this setting: Kea 1.1.0 does not sanity check the reservations against
+ <command>reservation-mode</command> and misconfiguration may cause problems.
</simpara></listitem>
<listitem><simpara>
</screen>
</para>
- <para>Another aspect of the host reservations are different types of
+ <para>Another aspect of the host reservations are the different types of
identifiers. Kea 1.1.0 supports four types of identifiers
(hw-address, duid, client-id and circuit-id), but more identifier types
are likely to be added in the future. This is beneficial from a
usability perspective. However, there is a drawback. For each incoming
packet Kea has to to extract each identifier type and then query the
- database to see if there's a reservation done by this particular
- identifier. If there is not, the next identifier is extracted and the next
+ database to see if there is a reservation done by this particular
+ identifier. If none is found, the next identifier is extracted and the next
query is issued. This process continues until either a reservation is
found or all identifier types have been checked. Over time with an increasing
number of supported identifier types, Kea would become slower and
<para>
The DHCPv4 server differentiates between the directly connected clients,
clients trying to renew leases and clients sending their messages through
- relays. For the directly connected clients the server will check the
- configuration for the interface on which the message has been received, and
- if the server configuration doesn't match any configured subnet the
+ relays. For directly connected clients, the server will check the
+ configuration for the interface on which the message has been received and,
+ if the server configuration doesn't match any configured subnet, the
message is discarded.</para>
<para>Assuming that the server's interface is configured with the
IPv4 address 192.0.2.3, the server will only process messages received through
<section id="dhcp4-relay-override">
<title>Using a Specific Relay Agent for a Subnet</title>
<para>
- The relay has to have an interface connected to the link on which
+ A relay has to have an interface connected to the link on which
the clients are being configured. Typically the relay has an IPv4
address configured on that interface that belongs to the subnet from which
the server will assign addresses. In the typical case, the
</para>
<para>
However, that is not always the case. In certain uncommon —
- valid — deployments, the relay address may not match the subnet. This
+ but valid — deployments, the relay address may not match the subnet. This
usually means that there is more than one subnet allocated for a given
link. The two most common examples where this is the case are long lasting
network renumbering (where both old and new address space is still being
behind them.
</para>
<para>
- Let's assume that there is one CMTS (Cable Modem Termination System)
+ Let us assume that there is one CMTS (Cable Modem Termination System)
with one CM MAC (a physical link that modems are connected to).
We want the modems to get addresses from the 10.1.1.0/24 subnet, while
everything connected behind modems should get addresses from another
</section>
<section id="dhcp4-decline">
- <title>Duplicate Addresses (DHCPDECLINE support)</title>
+ <title>Duplicate Addresses (DHCPDECLINE Support)</title>
<para>The DHCPv4 server is configured with a certain pool of addresses
that it is expected to hand out to the DHCPv4 clients. It is
unknown entity and thus not available for assignment to anyone) and a
probation time will be set on it. Unless otherwise configured, the
probation period lasts 24 hours. After that period, the server will
- recover the lease, i.e. put it back into the available state. The address will
+ recover the lease (i.e. put it back into the available state) and the address will
be available for assignment again. It should be noted that if the
underlying issue of a misconfigured device is not resolved, the duplicate
address scenario will repeat. On the other hand, it provides an
opportunity to recover from such an event automatically, without any
sysadmin intervention.</para>
- <para>To configure the decline probation period to a value different
+ <para>To configure the decline probation period to a value other
than the default, the following syntax can be used:
<screen>
"Dhcp4": {
Decline handling procedure. The lease4_decline hook is triggered after the
incoming DHCPDECLINE message has been sanitized and the server is about to
decline the lease. The declined-addresses statistic is increased after the
- hook returns (both global and subnet specific variants).</para>
+ hook returns (both global and subnet specific variants). (See
+ <xref linkend="dhcp4-stats"/> and <xref linkend="hooks-libraries"/> for more details
+ on DHCPv4 statistics and Kea hook points.)</para>
<para>Once the probation time elapses, the declined lease is recovered
using the standard expired lease reclamation procedure, with several
reclaimed-declined-addresses statistics (again in two variants, global and
subnet specific) are increased.</para>
- <para>Note about statistics: The server does not decrease
+ <para>Note about statistics: The server does not decrease the
assigned-addresses statistics when a DHCPDECLINE is received and processed
successfully. While technically a declined address is no longer assigned,
the primary usage of the assigned-addresses statistic is to monitor pool
</section>
<section id="dhcp4-stats">
- <title>Statistics in DHCPv4 server</title>
+ <title>Statistics in the DHCPv4 Server</title>
<note>
<para>This section describes DHCPv4-specific statistics. For a general
overview and usage of statistics, see <xref linkend="stats" />.</para>
<entry>pkt4-parse-failed</entry>
<entry>integer</entry>
<entry>
- Number of incoming packets that could not be parsed. Non-zero value of
+ Number of incoming packets that could not be parsed. A non-zero value of
this statistic indicates that the server received malformed or truncated packet.
- This may indicate problems in your network, faulty clients or server code bug.
+ This may indicate problems in your network, faulty clients or a bug in the server.
</entry>
</row>
<entry>pkt4-receive-drop</entry>
<entry>integer</entry>
<entry>
- Number of incoming packets that were dropped.
- Exact reason for dropping packets is logged, but the most common
+ Number of incoming packets that were dropped. The
+ exact reason for dropping packets is logged, but the most common
reasons may be: an unacceptable packet type, direct responses are
forbidden, or the server-id sent by the client does not match
the server's server-id.
<row>
<entry>subnet[id].total-addresses</entry>
<entry>integer</entry>
- <entry>The total number of addresses available for the DHCPv4
+ <entry>The total number of addresses available for DHCPv4
management. In other words, this is the sum of all addresses in
all configured pools. This statistic changes only during
configuration changes. Note it does not take into account any
<entry>subnet[id].assigned-addresses</entry>
<entry>integer</entry>
<entry>This statistic shows the number of assigned addresses in a
- given subnet. This statistic increases every time a new lease is
+ given subnet. It increases every time a new lease is
allocated (as a result of receiving a DHCPREQUEST message) and is
decreased every time a lease is released (a DHCPRELEASE message is
received) or expires. The <emphasis>id</emphasis> is the subnet-id
- of a given subnet. This statistic is exposed for each subnet
+ of the subnet. This statistic is exposed for each subnet
separately. This statistic is reset during reconfiguration event.
</entry>
</row>
<entry>integer</entry>
<entry>
This statistic shows the number of IPv4 addresses that are
- currently declined. This statistic counts the number of leases
+ currently declined, so counting the number of leases
currently unavailable. Once a lease is recovered, this
statistic will be decreased. Ideally, this statistic should be
zero. If this statistic is non-zero (or worse increasing),
<entry>integer</entry>
<entry>
This statistic shows the number of IPv4 addresses that are
- currently declined in a given subnet. This statistic counts the
+ currently declined in a given subnet, so is a count of the
number of leases currently unavailable. Once a lease is
recovered, this statistic will be decreased. Ideally, this
statistic should be zero. If this statistic is
</section>
<section id="dhcp4-ctrl-channel">
- <title>Management API for the DHCPv4 server</title>
+ <title>Management API for the DHCPv4 Server</title>
<para>
- Management API has been introduced in Kea 0.9.2-beta. It allows issuing specific
- management commands, like statistics retrieval, reconfiguration or shutdown.
+ The management API allows the issuing of specific
+ management commands, such as statistics retrieval, reconfiguration or shutdown.
For more details, see <xref linkend="ctrl-channel" />. Currently the only
supported communication channel type is UNIX stream socket. By default there
are no sockets open. To instruct Kea to open a socket, the following entry
on your operating system, i.e. the size of the <command>sun_path</command>
field in the <command>sockaddr_un</command> structure, decreased by 1.
This value varies on different operating systems between 91 and 107
- characters. The typical values are 107 on Linux and 103 on FreeBSD.
+ characters. Typical values are 107 on Linux and 103 on FreeBSD.
</para>
<para>
<listitem>
<simpara>
BOOTP (<ulink url="http://tools.ietf.org/html/rfc951">RFC 951</ulink>)
- is not supported. This is a design choice. BOOTP support is not planned.
+ is not supported. This is a design choice: BOOTP support is not planned.
</simpara>
</listitem>
<listitem>
<para>
Some operating systems or software package vendors may provide
ready-to-use, pre-built software packages for Kea. Installing a
- pre-built package means you do not need to install build-only
- prerequisites and do not need to <emphasis>make</emphasis> the software.
+ pre-built package means you do not need to install the software
+ required only to build Kea and do not need to <emphasis>make</emphasis>
+ the software.
</para>
<para>
- FreeBSD ports, NetBSD pkgsrc, and Debian <emphasis>testing</emphasis>
- package collections provide all the prerequisite packages.
+ FreeBSD ports, NetBSD pkgsrc, and Debian
+ <emphasis>testing</emphasis> package collections provide all the
+ prerequisite packages.
</para>
</section>
<section id="install-hierarchy">
- <title>Install Hierarchy</title>
+ <title>Installation Hierarchy</title>
<para>
- The following is the directory layout of the complete Kea installation
- (all directories paths are relative to the installation directory):
+ The following is the directory layout of the complete Kea installation.
+ (All directory paths are relative to the installation directory):
<itemizedlist>
+ <listitem>
+ <simpara>
+ <filename>bin/</filename> —
+ utility programs.
+ </simpara>
+ </listitem>
<listitem>
<simpara>
<filename>etc/kea/</filename> —
<listitem>
<para>
- The development tools: automake, libtool, pkg-config.
+ The development tools automake, libtool, pkg-config.
</para>
</listitem>
The MySQL client and the client development libraries, when using
the --with-dhcp-mysql configuration flag to build the Kea MySQL
database backend. In this case an instance of the MySQL server
- running locally or on some other machine, reachable over the
- network from the machine running Kea, is required. Note that
+ running locally or on a machine reachable over a network
+ is required. Note that
running the unit tests requires a local MySQL server.
</para>
</listitem>
<listitem>
<para>
- googletest (version 1.6 or later), when using --with-gtest configuration option.
+ googletest (version 1.6 or later), when using the --with-gtest configuration
+ option to build the unit tests.
</para>
</listitem>
<listitem>
<para>
- Documentation generating tools: elinks, docbook-xsl, libxslt and Doxygen,
- when generating documentation using the --enable-generate-docs
- configuration option.
+ The documentation generation tools elinks, docbook-xsl, libxslt and Doxygen,
+ if using the --enable-generate-docs configuration option
+ to create the documentation.
</para>
</listitem>
</itemizedlist>
<para>
- Visit the user-contributed wiki at <ulink
- url="http://kea.isc.org/wiki/SystemSpecificNotes" />
+ Visit the user-contributed wiki at
+ <ulink url="http://kea.isc.org/wiki/SystemSpecificNotes" />
for system-specific installation tips.
</para>
<section id="install">
<title>Installation from Source</title>
<para>
- Kea is open source software written in C++.
- It is freely available in source code form from ISC as a
- downloadable tar file or via Kea Git code revision control
- service. (It may also be available in pre-compiled ready-to-use
- packages from operating system vendors.)
+ Kea is open source software written in C++. It is freely available in
+ source code form from ISC as a downloadable tar file. A copy of the Kea
+ source code repository is accessible from Github (<ulink
+ url="https://github.com/isc-projects/kea"/>). Kea may also be available
+ in pre-compiled ready-to-use packages from operating system vendors.
</para>
<section>
<para>
When building from source code retrieved via Git, additional
software will be required: automake (v1.11 or later),
- libtoolize, and autoconf (2.59 or later).
+ libtoolize, and autoconf (v2.59 or later).
These may need to be installed.
</para>
</note>
<para>
The latest development code is available on Github (see
- <ulink url="https://github.com/isc-projects/kea"/>). The Kea development
- is public and the leading development is done in the <quote>master</quote>
+ <ulink url="https://github.com/isc-projects/kea"/>). The Kea source
+ is public and development is done in the <quote>master</quote>
branch.
</para>
<para>
</para>
<para>
- The code checked out from the git repository doesn't include the
+ The code checked out from the git repository does not include the
generated configure script, Makefile.in files, nor their
related build files.
They can be created by running <command>autoreconf</command>
</para>
<para>
- The write access to Kea repository is only granted to ISC staff. If you
+ Write access to the Kea repository is only granted to ISC staff. If you
are a developer planning to contribute to Kea, please fork our Github
repository and use the "pull request" mechanism to request integration of
- your code into our repository. Please consult
- <ulink url="https://help.github.com/articles/fork-a-repo/"/> for help
+ your code. Please consult
+ <ulink url="https://help.github.com/articles/fork-a-repo/"/> for help on
how to fork a Github repository.
- <ulink url="http://git.kea.isc.org/~tester/kea/doxygen/">
- Kea Developer's Guide</ulink> contains information and guidelines for
- the contributors about the process of integrating the code via
- pull requests. It also contains the requirements for the contributed
- code to be accepted by ISC.
+ The <ulink url="http://git.kea.isc.org/~tester/kea/doxygen/">Kea
+ Developer's Guide</ulink> contains more information about the process, as
+ well as describing the requirements for contributed code to be accepted by ISC.
</para>
</section>
<section id="configure">
- <title>Configure before the build</title>
+ <title>Configure Before the Build</title>
<para>
Kea uses the GNU Build System to discover build environment
details.
</varlistentry>
<varlistentry>
- <term>--with-boost-libs</term>
+ <term>--with-botan-config</term>
<listitem>
- <simpara>Specify Boost libraries to link with (this option
- exists only to provide a way to enforce such a list:
- usually this should not be used).
+ <simpara>Specify the path to the botan-config
+ script to build with Botan for cryptographic functions.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
- <term>--with-boost-lib-dir</term>
+ <term>--with-dhcp-mysql</term>
<listitem>
- <simpara>Specify the path to Boost libraries to link with
- (usually there should be no reason to specify this option).
+ <simpara>
+ Build Kea with code to allow it to store leases (and access
+ host reservations) in a MySQL database.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
- <term>--with-botan-config</term>
+ <term>--with-dhcp-pgsql</term>
<listitem>
- <simpara>Specify the path to the botan-config
- script to build with Botan for the crypto code.
+ <simpara>
+ Build Kea with code to allow it to store leases (and access
+ host reservations) in a PostgreSQL database.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
- <term>--with-gtest</term>
+ <term>--with-gtest-source</term>
<listitem>
<simpara>Enable the building of the C++ Unit Tests using the
- Google Test framework. Optionally this can define the
- path to the gtest header files and library. (If the framework
- is not already installed on your system, it can be downloaded
+ Google Test framework. This option specifies the path to the
+ gtest source. (If the framework
+ is not installed on your system, it can be downloaded
from <ulink url="https://code.google.com/p/googletest"/>.)
</simpara>
</listitem>
<varlistentry>
<term>--with-openssl</term>
<listitem>
- <simpara>Replace Botan by OpenSSL for the crypto library.
- The default is to try to find a working Botan then
- OpenSSL only if Botan is not found.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>--without-werror</term>
- <listitem>
- <simpara>Disable the default use of the
- <option>-Werror</option> compiler flag so that
- compiler warnings do not result in build failures.
+ <simpara>Replace Botan by the OpenSSL the cryptographic library.
+ By default <command>configure</command> searches for a valid
+ Botan installation:
+ if one is not found, it searches for OpenSSL.
</simpara>
</listitem>
</varlistentry>
</variablelist>
<note>
<para>
- For additional instructions concerning the building and installation of
- Kea for various databases, see <xref linkend="dhcp-install-configure"/>.
- For additional instructions concerning the configuration backends, see
+ For instructions concerning the installation and configuration
+ of database backends for Kea, see <xref linkend="dhcp-install-configure"/>.
+ For information concerning the configuration backends, see
<xref linkend="dhcp-config-backend" />.
</para>
</note>
<para>
If you have some problems with building Kea using the header-only
- Boost error code or you'd like to use the Boost system library
- (e.g., located in /usr/pkg/lib):
+ Boost code or you'd like to use the Boost system library
+ (assumed for the sake of this example to be located in /usr/pkg/lib):
<screen>$ <userinput>./configure \
--with-boost-libs=-lboost_system \
</para>
<para>
- If the configure fails, it may be due to missing or old
+ If <command>configure</command> fails, it may be due to missing or old
dependencies.
</para>
<para>
- <userinput>./configure</userinput> when it succeeds displays a report
- with the building parameters. This report is saved into
- <filename>config.report</filename> and embedded into executable
- binaries, e.g., <userinput>kea-dhcp4</userinput>.
+ If <command>configure</command> succeeds, it displays a report
+ with the parameters used to build the code. This report is saved into
+ the file <filename>config.report</filename> and is also embedded into
+ the executable binaries, e.g., <userinput>kea-dhcp4</userinput>.
</para>
</section>
<section>
<title>Build</title>
<para>
- After the configure step is complete, build the executables
- from the C++ code and prepare the Python scripts by running the command:
-
+ After the configure step is complete, build the executables
+ from the C++ code and prepare the Python scripts by running the command:
<screen>$ <userinput>make</userinput></screen>
</para>
</section>
</note>
<para>
If required, run <command>ldconfig</command> as root with
- <filename>/usr/local/lib</filename> (or with ${prefix}/lib if
+ <filename>/usr/local/lib</filename> (or with <replaceable>prefix</replaceable>/lib if
configured with --prefix) in
<filename>/etc/ld.so.conf</filename> (or the relevant linker
cache configuration file for your OS):
<section id="dhcp-config-backend">
<title>Selecting the Configuration Backend</title>
- <para>Kea 0.9 has introduced configuration backends that are
+ <para>Kea 0.9 introduced configuration backends that are
switchable during the compilation phase. Only one backend, JSON,
is currently supported.
</para>
<term>JSON</term>
<listitem>
<simpara>JSON is the new default configuration backend
- that causes Kea to read JSON configuration files from
+ that allows Kea to read JSON configuration files from
disk. It does not require any framework and thus is
considered more lightweight. It will allow dynamic
- on-line reconfiguration, but will lack remote capabilities
+ on-line reconfiguration, but lacks remote capabilities
(i.e. no RESTful API).</simpara>
</listitem>
</varlistentry>
<section id="dhcp-install-configure">
<title>DHCP Database Installation and Configuration</title>
<para>
- Kea stores its leases in a lease database. The software has been written in
- a way that makes it possible to choose which database product should be used to
- store the lease information. At present, Kea supports three database backends: MySQL,
- PostgreSQL and Memfile. To limit external dependencies, both MySQL and PostgreSQL
- support are disabled by default and only Memfile
- is available. Support for the optional external database backend must be explicitly included when
- Kea is built. This section covers the building of Kea with MySQL and/or PostgreSQL
- and the creation of the lease database.
+ Kea stores its leases in a lease database. The software has been
+ written in a way that makes it possible to choose which database product
+ should be used to store the lease information. At present, Kea supports
+ four database backends: MySQL, PostgreSQL, Cassandra and Memfile. To
+ limit external dependencies, MySQL, PostgreSQL and Cassandra support are
+ disabled by default and only Memfile is available. Support for the
+ optional external database backend must be explicitly included when Kea
+ is built. This section covers the building of Kea with one of the
+ optional backends and the creation of the lease database.
</para>
<note>
<simpara>
- When unit tests are built with Kea (--with-gtest configuration option is specified),
+ When unit tests are built with Kea (the --with-gtest configuration option is specified),
the databases must be manually pre-configured for the unit tests to run.
The details of this configuration can be found in the
<ulink url="http://git.kea.isc.org/~tester/kea/doxygen">Kea Developer's
<para>
Build and install Kea as described in <xref linkend="installation"/>, with
the following modification. To enable the MySQL database code, at the
- "configure" step (see <xref linkend="configure"/>), do:
+ "configure" step (see <xref linkend="configure"/>), the --with-dhcp-mysql switch
+ should be specified:
<screen><userinput>./configure [other-options] --with-dhcp-mysql</userinput></screen>
- Or specify the location of the MySQL configuration program
- "mysql_config" if MySQL was not installed in the default location:
+ If MySQL was not installed in the default location, the location of the MySQL
+ configuration program "mysql_config" should be included with the switch, i.e.
<screen><userinput>./configure [other-options] --with-dhcp-mysql=<replaceable>path-to-mysql_config</replaceable></userinput></screen>
</para>
<para>
<para>
Build and install Kea as described in <xref linkend="installation"/>, with
the following modification. To enable the PostgreSQL database code, at the
- "configure" step (see <xref linkend="configure"/>), do:
+ "configure" step (see <xref linkend="configure"/>), the --with-dhcp-pgsql switch
+ should be specified:
<screen><userinput>./configure [other-options] --with-dhcp-pgsql</userinput></screen>
- Or specify the location of the PostgreSQL configuration
- program "pg_config" if PostgreSQL was not installed in
- the default location:
+ If PostgreSQL was not installed in the default location, the location of the PostgreSQL
+ configuration program "pg_config" should be included with the switch, i.e.
<screen><userinput>./configure [other-options] --with-dhcp-pgsql=<replaceable>path-to-pg_config</replaceable></userinput></screen>
</para>
<para>
<title>Building with CQL (Cassandra) support</title>
<para>
Install Cassandra according to the instructions for your system. The
- Cassandra project webpage contains useful pointers: <ulink
- url="http://cassandra.apache.org/download/" />.
+ Cassandra project website contains useful pointers: <ulink
+ url="http://cassandra.apache.org" />.
</para>
<para>
Download and compile cpp-driver from DataStax. For details regarding
dependencies for building cpp-driver, see the project homepage
- <ulink url="https://github.com/datastax/cpp-driver" />. As of June
+ <ulink url="https://github.com/datastax/cpp-driver" />. In June
2016, the following commands were used:
<screen>
$ <userinput>git clone https://github.com/datastax/cpp-driver</userinput>
</para>
<para>
As of June 2016, cpp-driver does not include cql_config script
- yet. There is a work in progress to contribute such a script to
- cpp-driver project. Until such contribution is accepted, there are
- intermediate steps that need to be conducted. The cql_config
- script and cql_config_defines.sh are temporarily stored in
+ yet. Work is in progress to contribute such a script to the
+ cpp-driver project but, until that is complete,
+ intermediate steps that need to be conducted. A cql_config script is present in the
tools/ directory of the Kea sources. Before using it, please
- edit cql_config_defines.sh: change CPP_DRIVER_PATH to the directory,
- where cpp-driver sources are located. If cpp-driver sources already
+ edit cql_config_defines.sh in the same directory and change the
+ environment variable CPP_DRIVER_PATH to point to the directory,
+ where cpp-driver sources are located. (If the cpp-driver sources already
provide cql_config script please use that rather than the version
- from Kea sources.
+ from Kea sources.)
</para>
<para>
Build and install Kea as described in <xref linkend="installation"/>, with