diff --git a/doc/Makefile.am b/doc/Makefile.am index 173f563648..933e221782 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -10,6 +10,7 @@ nobase_dist_doc_DATA += examples/kea6/simple.json nobase_dist_doc_DATA += examples/kea6/several-subnets.json nobase_dist_doc_DATA += examples/kea6/multiple-options.json nobase_dist_doc_DATA += examples/kea6/advanced.json +nobase_dist_doc_DATA += examples/kea6/stateless.json nobase_dist_doc_DATA += examples/ddns/sample1.json nobase_dist_doc_DATA += examples/ddns/template.json diff --git a/doc/examples/kea6/stateless.json b/doc/examples/kea6/stateless.json new file mode 100644 index 0000000000..986597262d --- /dev/null +++ b/doc/examples/kea6/stateless.json @@ -0,0 +1,23 @@ +# A very simply stateless configuration that provides DNS servers information +# to all clients, regardless of their point of attachment. +# +# It is also possible to specify options on a per subnet basis +# in the same way as in stateful mode. +# + +{ +"Dhcp6": { + "interfaces": [ "ethX" ], + +# This is the list of options that will be granted to all clients that ask. + "option-data": [ { + "name": "dns-servers", + "data": "2001:db8::1, 2001:db8::2" + } ], + +# Kea 0.9.1 requires lease-database to be specified, even it is not used. +# In stateless mode, only options are granted, not addresses or prefixes, so +# there will be no leases (unless stateless and stateful mode is used together). + "lease-database": { "type": "memfile" } +} +} diff --git a/doc/guide/dhcp6-srv.xml b/doc/guide/dhcp6-srv.xml index 05480de327..69e321700d 100644 --- a/doc/guide/dhcp6-srv.xml +++ b/doc/guide/dhcp6-srv.xml @@ -1739,6 +1739,45 @@ should include options from the isc option space: +
+ Stateless DHCPv6 (Information-Request Message) + Typically DHCPv6 is used to assign addresses and options. Those + assignments (leases) have state that changes state over time, hence + their name stateful. DHCPv6 also supports stateless mode, + where clients simply request configuration options. This mode is + considered lightweight from the server perspective, as it does require + any state tracking. Hence its name. + Kea server supports this mode out of the box. Clients may send + Information-Request messages and the server will simply send back answers + with requested options, if they are available in the server configuration. + The server will attempt to use per subnet options first. If that fails for + whatever reason, it will then try to provide options defined in the global + scope. + Stateless and stateful mode can be used together. No special configuration + directives are required to handle this. Simply use the configuration for + stateful clients and the stateless clients will get just options they requested. + + This usage of global options brings in an interesting observation. + It is possible to run the server that provides just options and no addresses + or prefixes. If the options have the same value in each subnet, the configuration + may simply define required options in the global scope and skip subnet + definitions altogether. Here's an example of such very simple configuration: + +"Dhcp6": { + "interfaces": [ "ethX" ], + "option-data": [ { + "name": "dns-servers", + "data": "2001:db8::1, 2001:db8::2" + } ], + "lease-database": { "type": "memfile" } + } + + This very simple configuration will provide DNS servers information to all + clients in the network, regardless of their location. Note that as of 0.9.1, + Kea requires lease-database to be specified, even if it is not used. + +
+
Using specific relay agent for a subnet @@ -2047,8 +2086,7 @@ should include options from the isc option space: - Duplication report (DECLINE), stateless configuration - (INFORMATION-REQUEST) and client reconfiguration (RECONFIGURE) are + Duplication report (DECLINE) and client reconfiguration (RECONFIGURE) are not yet supported. diff --git a/src/bin/dhcp6/tests/infrequest_unittest.cc b/src/bin/dhcp6/tests/infrequest_unittest.cc index 9c4fdbc334..31e4f29fef 100644 --- a/src/bin/dhcp6/tests/infrequest_unittest.cc +++ b/src/bin/dhcp6/tests/infrequest_unittest.cc @@ -104,8 +104,7 @@ const char* CONFIGS[] = { "\"option-data\": [ {" " \"name\": \"nis-servers\"," " \"data\": \"2001:db8::1, 2001:db8::2\"" - " } ]," - "\"subnet6\": [ ]" + " } ]" "}" };