2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 13:37:55 +00:00

[1367] Added sections about DHCP in Reference Guide, fixed whitespaces.

This commit is contained in:
Tomek Mrugalski
2011-12-23 18:11:19 +01:00
parent a7341f3e33
commit 5280be98d0

View File

@@ -1806,6 +1806,164 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
</chapter> </chapter>
<chapter id="dhcp4">
<title>DHCPv4 Server</title>
<para>Dynamic Host Configuration Protocol for IPv4 (DHCP or
DHCPv4) and Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
are protocols that allow one node (server) to provision
configuration parameters to many hosts and devices (clients). To
ease deployment in larger networks, additional nodes (relays) may
be deployed that facilitate communication between servers and
clients. Even though principles of both DHCPv4 and DHCPv6 are
somewhat similar, these are two radically different
protocols. BIND10 offers server implementations for both DHCPv4
and DHCPv6.</para>
<note>
<para>
As of December 2011, both DHCPv4 and DHCPv6 components are
skeleton servers. That means that while they are capable of
performing DHCP configuration, they are not fully functional
yet. In particular, both do not have functional lease
databases. This means that they will assign the same, fixed,
hardcoded addresses to any client that will ask. See <xref
linkend="dhcp4-limit"/> and <xref linkend="dhcp6-limit"/> for
detailed description.
</para>
</note>
<section>
<title>Server Usage</title>
<para>BIND10 provides experimental DHCPv4 server component since
December 2011. It is currently described as skeleton server and
can be described as an early prototype that is not yet fully
functional. It is mature enough to conduct first tests in lab
environment, but it has significant limitations. See <xref
linkend="dhcp4-limit"/> for details.
</para>
<para>
DHCPv4 server is implemented as <command>b10-dhcp4</command>
daemon. As it is configurable yet, it is fully autonomous,
i.e. it does not interact with <command>b10-cfgmgr</command>.
To start DHCPv4 server, simply input:
<screen>
#<userinput>cd src/bin/dhcp4</userinput>
#<userinput>./b10-dhcp4</userinput>
</screen>
Depending on your installation, <command>b10-dhcp4</command>
binary may reside in src/bin/dhcp4 in your source code
directory, in /usr/local/bin/b10-dhcp4 or other directory
you specified during compilation.
Afre start, server will detect available network interfaces
and will attempt to open UDP sockets on all interfaces that
are up, running, are not loopback and have IPv4 address
assigned.
Server will then listen to incoming traffic. Currently
supported client messages are DISCOVER and REQUEST. Server
will respond to them with OFFER and ACK, respectively.
As DHCPv4 server opens privileged ports, it requires root
access. Make sure you run this daemon as root.
</para>
</section>
<section>
<title>Server Configuration</title>
<para>
DHCPv4 server does not have lease database implemented yet
or any support for configuration, so every time the same set
of configuration options (including the same fixed address)
will be assigned every time.
</para>
<para>
At this stage of development, the only way to alter server
configuration is to tweak its source code. To do so, please edit
src/bin/dhcp4/dhcp4_srv.cc file and modify following parameters:
<screen>
const std::string HARDCODED_LEASE = "10.3.2.222"; // assigned lease
const std::string HARDCODED_NETMASK = "255.255.255.0";
const uint32_t HARDCODED_LEASE_TIME = 60; // in seconds
const std::string HARDCODED_GATEWAY = "10.3.2.2";
const std::string HARDCODED_DNS_SERVER = "8.8.8.8";
const std::string HARDCODED_DOMAIN_NAME = "isc.example.org";
const std::string HARDCODED_SERVER_ID = "10.3.1.1";</screen>
Lease database and configuration support is planned for 2012.
</para>
</section>
<section id="dhcp4-limit">
<title>DHCPv4 Server Limitations</title>
<para>
During initial IPv4 node configuration, where server has to
send packet to a node that does not have IPv4 address
assigned yet, server requires certain tricks (or hacks) to
transmit such packets. This is not implemented yet, therefore
DHCPv4 server supports relayed traffic only.
</para>
</section>
</chapter>
<chapter id="dhcp6-srv">
<title>DHCPv6 Server</title>
<section id="dhcp6-limit">
<title>DHCPv6 Server Limitations</title>
<para>
Relayed traffic is not supported.
</para>
</section>
</chapter>
<chapter id="libdhcp++">
<title>libdhcp++ library</title>
<para>libdhcp++ is a common library written in C++ that is
handles many DHCP-related tasks, like DHCPv4 and DHCPv6 packets
parsing, manipulation and assembly, option parsing, manipulation
and assembly, network interface detection and socket operations.
</para>
<para>
While this library is currently used by
<command>b10-dhcp6</command> and <command>b10-dhcp4</command>
only, it is designed to be portable, universal library useful
for any kind of DHCP-related software.
</para>
<section>
<title>Interface detection</title>
<para>Both DHCPv4 and DHCPv6 components share network
interface detection routines (see <xref
linkend="libdhcp++"/> for details). Interface detection is
currently only supported on Linux systems.</para>
<para>For non-linux systems, there is currently stub
implementation provided. As DHCP servers need to know
available addresses, there was a simple mechanism implemented
to provide that information. User is expected to create
interfaces.txt file. Format of this file is simple. It
contains list of interfaces along with available address on
each interface. This mechanism is temporary and is going to be
removed as soon as interface detection becomes available on
non-linux systems. Example of interfaces.txt file looks as follows:
<screen>
# For DHCPv6, please specify link-local address (starts with fe80::)
# If in doubt, check output of 'ifconfig -a' command.
eth0 fe80::21e:8cff:fe9b:7349
# For DHCPv4, please use following format:
#eth0 192.0.2.5</screen>
</para>
</section>
</chapter>
<chapter id="statistics"> <chapter id="statistics">
<title>Statistics</title> <title>Statistics</title>