dhcp6-srv.xml 143 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY mdash "&#x2014;" >
  5. ]>
  6. <chapter id="dhcp6">
  7. <title>The DHCPv6 Server</title>
  8. <section id="dhcp6-start-stop">
  9. <title>Starting and Stopping the DHCPv6 Server</title>
  10. <para>
  11. It is recommended that the Kea DHCPv6 server be started and stopped
  12. using <command>keactrl</command> (described in <xref linkend="keactrl"/>).
  13. However, it is also possible to run the server directly: it accepts
  14. the following command-line switches:
  15. </para>
  16. <itemizedlist>
  17. <listitem>
  18. <simpara>
  19. <command>-c <replaceable>file</replaceable></command> -
  20. specifies the configuration file. This is the only mandatory
  21. switch.</simpara>
  22. </listitem>
  23. <listitem>
  24. <simpara>
  25. <command>-d</command> - specifies whether the server
  26. logging should be switched to verbose mode. In verbose mode,
  27. the logging severity and debuglevel specified in the configuration
  28. file are ignored and "debug" severity and the maximum debuglevel
  29. (99) are assumed. The flag is convenient, for temporarily
  30. switching the server into maximum verbosity, e.g. when
  31. debugging.</simpara>
  32. </listitem>
  33. <listitem>
  34. <simpara>
  35. <command>-p <replaceable>port</replaceable></command> -
  36. specifies UDP port on which the server will listen. This is only
  37. useful during testing, as a DHCPv6 server listening on
  38. ports other than default DHCPv6 ports will not be able to
  39. handle regular DHCPv6 queries.</simpara>
  40. </listitem>
  41. <listitem>
  42. <simpara>
  43. <command>-v</command> - prints out Kea version and exits.
  44. </simpara>
  45. </listitem>
  46. <listitem>
  47. <simpara>
  48. <command>-V</command> - prints out Kea extended version with
  49. additional parameters and exits.
  50. </simpara>
  51. </listitem>
  52. <listitem>
  53. <simpara>
  54. <command>-W</command> - prints out Kea configuration report
  55. and exits.
  56. </simpara>
  57. </listitem>
  58. </itemizedlist>
  59. <para>
  60. The <command>-V</command> command returns the versions of the
  61. external libraries dynamically linked.
  62. </para>
  63. <para>
  64. The <command>-W</command> command describes the environment used
  65. to build Kea. This command displays a copy of the
  66. <filename>config.report</filename> file produced by
  67. <userinput>./configure</userinput> that is embedded in the
  68. executable binary.
  69. </para>
  70. <para>
  71. The <filename>config.report</filename> may also be accessed more
  72. directly. The following command may be used to extract this
  73. information. The binary <userinput>path</userinput> may be found
  74. in the install directory or in the <filename>.libs</filename>
  75. subdirectory in the source treee. For example
  76. <filename>kea/src/bin/dhcp6/.libs/kea-dhcp6</filename>.
  77. <screen>
  78. strings <userinput>path</userinput>/kea-dhcp6 | sed -n 's/;;;; //p'
  79. </screen>
  80. </para>
  81. <para>
  82. When running in a console, the server can be shut down by
  83. pressing ctrl-c. It detects the key combination and shuts
  84. down gracefully.
  85. </para>
  86. <para>
  87. On start-up, the server will detect available network interfaces
  88. and will attempt to open UDP sockets on all interfaces
  89. mentioned in the configuration file.
  90. </para>
  91. <para>
  92. Since the DHCPv6 server opens privileged ports, it requires root
  93. access. Make sure you run this daemon as root.
  94. </para>
  95. <para>
  96. During startup the server will attempt to create a PID file of the
  97. form: [localstatedir]/[conf name].kea-dhcp6.pid
  98. where:
  99. <itemizedlist>
  100. <listitem>
  101. <simpara><command>localstatedir</command>: The value as passed into the
  102. build configure script. It defaults defaults to "/usr/local/var". Note
  103. that this value may be overridden at run time by setting the environment
  104. variable KEA_PIDFILE_DIR. This is intended primarily for testing purposes.
  105. </simpara>
  106. </listitem>
  107. <listitem>
  108. <simpara><command>conf name</command>: The confguration file name
  109. used to start the server, minus all preceding path and file extension.
  110. For example, given a pathname of "/usr/local/etc/kea/myconf.txt", the
  111. portion used would be "myconf".
  112. </simpara>
  113. </listitem>
  114. </itemizedlist>
  115. If the file already exists and contains the PID of a live process,
  116. the server will issue a DHCP6_ALREADY_RUNNING log message and exit. It
  117. is possible, though unlikely, that the file is a remnant of a system crash
  118. and the process to which the PID belongs is unrelated to Kea. In such a
  119. case it would be necessary to manually delete the PID file.
  120. </para>
  121. </section>
  122. <section id="dhcp6-configuration">
  123. <title>DHCPv6 Server Configuration</title>
  124. <section>
  125. <title>Introduction</title>
  126. <para>
  127. This section explains how to configure the DHCPv6 server using the
  128. Kea configuration backend. (Kea configuration using any other
  129. backends is outside of scope of this document.) Before DHCPv6
  130. is started, its configuration file has to be created. The
  131. basic configuration looks as follows:
  132. <screen>
  133. {
  134. # DHCPv6 configuration starts on the next line
  135. "Dhcp6": {
  136. # First we set up global values
  137. "renew-timer": 1000,
  138. "rebind-timer": 2000,
  139. "preferred-lifetime": 3000,
  140. "valid-lifetime": 4000,
  141. # Next we setup the interfaces to be used by the server.
  142. "interfaces-config": {
  143. "interfaces": [ "eth0" ]
  144. },
  145. # And we specify the type of a lease database
  146. "lease-database": {
  147. "type": "memfile",
  148. "persist": true,
  149. "name": "/var/kea/dhcp6.leases"
  150. },
  151. # Finally, we list the subnets from which we will be leasing addresses.
  152. "subnet6": [
  153. {
  154. "subnet": "2001:db8:1::/64",
  155. "pools": [
  156. {
  157. "pool": "2001:db8:1::1-2001:db8:1::ffff"
  158. }
  159. ]
  160. }
  161. ]
  162. # DHCPv6 configuration ends with the next line
  163. }
  164. } </screen>
  165. </para>
  166. <para>The following paragraphs provide a brief overview of the parameters in
  167. the above example and
  168. their format. Subsequent sections of this chapter go into much greater detail
  169. for these and other parameters.</para>
  170. <para>The lines starting with a hash (#) are comments and are ignored by
  171. the server; they do not impact its
  172. operation in any way.</para>
  173. <para>The configuration starts in the first line with the initial
  174. opening curly bracket (or brace). Each configuration consists of
  175. one or more objects. In this specific example, we have only one
  176. object called Dhcp6. This is a simplified configuration, as usually
  177. there will be additional objects, like <command>Logging</command> or
  178. <command>DhcpDns</command>, but we omit them now for clarity. The Dhcp6
  179. configuration starts with the <command>"Dhcp6": {</command> line
  180. and ends with the corresponding closing brace (in the above example,
  181. the brace after the last comment). Everything defined between those
  182. lines is considered to be the Dhcp6 configuration.</para>
  183. <para>In the general case, the order in which those parameters appear does not
  184. matter. There are two caveats here though. The first one is to remember that
  185. the configuration file must be well formed JSON. That means that parameters
  186. for any given scope must be separated by a comma and there must not be a comma
  187. after the last parameter. When reordering a configuration file, keep in mind that
  188. moving a parameter to or from the last position in a given scope may require
  189. moving the comma as well. The second caveat is that it is uncommon &mdash; although
  190. legal JSON &mdash; to
  191. repeat the same parameter multiple times. If that happens, the last occurrence of a
  192. given parameter in a given scope is used while all previous instances are
  193. ignored. This is unlikely to cause any confusion as there are no real life
  194. reasons to keep multiple copies of the same parameter in your configuration
  195. file.</para>
  196. <para>Moving onto the DHCPv6 configuration elements, the very first few elements
  197. define some global parameters. <command>valid-lifetime</command>
  198. defines for how long the addresses (leases) given out by the server are valid. If
  199. nothing changes, a client that got an address is allowed to use it for 4000
  200. seconds. (Note that integer numbers are specified as is, without any quotes
  201. around them.) The address will become deprecated in 3000 seconds (clients are
  202. allowed to keep old connections, but can't use this address for creating new
  203. connections). <command>renew-timer</command> and <command>
  204. rebind-timer</command> are values that define T1 and T2 timers that govern when
  205. the client will begin the renewal and rebind procedures.</para>
  206. <para>The <command>interfaces-config</command> map specifies the server
  207. configuration concerning the network interfaces, on which the server should
  208. listen to the DHCP messages. The <command>interfaces</command> parameter
  209. specifies a list of network interfaces on which the server should listen.
  210. Lists are opened and closed with square brackets, with elements separated
  211. by commas. Had we wanted to listen on two interfaces, the
  212. <command>interfaces-config</command> would look like this:
  213. <screen>
  214. "interfaces-config": {
  215. "interfaces": [ "eth0", "eth1" ]
  216. },
  217. </screen>
  218. </para>
  219. <para>The next couple of lines define the lease database, the place where the server
  220. stores its lease information. This particular example tells the server to use
  221. <command>memfile</command>, which is the simplest (and fastest) database
  222. backend. It uses an in-memory database and stores leases on disk in a CSV
  223. file. This is a very simple configuration. Usually, lease database configuration
  224. is more extensive and contains additional parameters. Note that
  225. <command>lease-database</command>
  226. is an object and opens up a new scope, using an opening brace.
  227. Its parameters (just one in this example -- <command>type</command>)
  228. follow. Had there been more than one, they would be separated by commas. This
  229. scope is closed with a closing brace. As more parameters follow, a trailing
  230. comma is present.</para>
  231. <para>Finally, we need to define a list of IPv6 subnets. This is the
  232. most important DHCPv6 configuration structure as the server uses that
  233. information to process clients' requests. It defines all subnets from
  234. which the server is expected to receive DHCP requests. The subnets are
  235. specified with the <command>subnet6</command> parameter. It is a list,
  236. so it starts and ends with square brackets. Each subnet definition in
  237. the list has several attributes associated with it, so it is a structure
  238. and is opened and closed with braces. At minimum, a subnet definition
  239. has to have at least two parameters: <command>subnet</command> (that
  240. defines the whole subnet) and <command>pool</command> (which is a list of
  241. dynamically allocated pools that are governed by the DHCP server).</para>
  242. <para>The example contains a single subnet. Had more than one been defined,
  243. additional elements
  244. in the <command>subnet6</command> parameter would be specified and
  245. separated by commas. For example, to define two subnets, the following
  246. syntax would be used:
  247. <screen>
  248. "subnet6": [
  249. {
  250. "pools": [
  251. {
  252. "pool": "2001:db8:1::/112"
  253. }
  254. ],
  255. "subnet": "2001:db8:1::/64"
  256. },
  257. {
  258. "pools": [ { "pool": "2001:db8:2::1-2001:db8:2::ffff" } ],
  259. "subnet": "2001:db8:2::/64",
  260. "interface": "eth0"
  261. }
  262. ]
  263. </screen>
  264. Note that indentation is optional and is used for aesthetic purposes only.
  265. In some cases in may be preferable to use more compact notation.
  266. </para>
  267. <para>After all parameters are specified, we have two contexts open:
  268. global and Dhcp6, hence we need two closing curly brackets to close them.
  269. In a real life configuration file there most likely would be additional
  270. components defined such as Logging or DhcpDdns, so the closing brace would
  271. be followed by a comma and another object definition.</para>
  272. </section>
  273. <section>
  274. <title>Lease Storage</title>
  275. <para>All leases issued by the server are stored in the lease database.
  276. Currently there are three database backends available:
  277. memfile (which is the default backend), MySQL and PostgreSQL.</para>
  278. <section>
  279. <title>Memfile, Basic Storage for Leases</title>
  280. <para>The server is able to store lease data in different repositories. Larger
  281. deployments may elect to store leases in a database. <xref
  282. linkend="database-configuration6"/> describes this option. In typical
  283. smaller deployments though, the server will use a CSV file rather than a database to
  284. store lease information. As well as requiring less administration, an
  285. advantage of using a file for storage is that it
  286. eliminates a dependency on third-party database software.</para>
  287. <para>The configuration of the file backend (Memfile) is controlled through
  288. the Dhcp6/lease-database parameters. The <command>type</command> parameter
  289. is mandatory and it specifies which storage for leases the server should use.
  290. The value of <userinput>"memfile"</userinput> indicates that the file should
  291. be used as the storage. The following list presents the remaining, not mandatory
  292. parameters, which can be used to configure the Memfile backend.
  293. <itemizedlist>
  294. <listitem>
  295. <simpara><command>persist</command>: controls whether the new leases and
  296. updates to existing leases are written to the file. It is strongly
  297. recommended that the value of this parameter is set to
  298. <userinput>true</userinput> at all times, during the server's normal
  299. operation. Not writing leases to disk will mean that if a server is restarted
  300. (e.g. after a power failure), it will not know what addresses have been
  301. assigned. As a result, it may hand out addresses to new clients that are
  302. already in use. The value of <userinput>false</userinput> is mostly useful
  303. for performance testing purposes. The default value of the
  304. <command>persist</command> parameter is <userinput>true</userinput>,
  305. which enables writing lease updates
  306. to the lease file.
  307. </simpara>
  308. </listitem>
  309. <listitem>
  310. <simpara><command>name</command>: specifies an absolute location of the lease
  311. file in which new leases and lease updates will be recorded. The default value
  312. for this parameter is <userinput>"[kea-install-dir]/var/kea/kea-leases6.csv"
  313. </userinput>.</simpara>
  314. </listitem>
  315. <listitem>
  316. <simpara><command>lfc-interval</command>: specifies the interval in seconds, at
  317. which the server (Memfile backend) will perform a lease file cleanup (LFC),
  318. which removes the redundant (historical) information from the lease file
  319. and effectively reduces the lease file size. The cleanup process is described
  320. in more detailed fashion further in this section. The default value of the
  321. <command>lfc-interval</command> is <userinput>0</userinput>, which disables
  322. the LFC.</simpara>
  323. </listitem>
  324. </itemizedlist>
  325. </para>
  326. <para>The example configuration of the Memfile backend is presented below:
  327. <screen>
  328. "Dhcp6": {
  329. "lease-database": {
  330. <userinput>"type": "memfile"</userinput>,
  331. <userinput>"persist": true</userinput>,
  332. <userinput>"name": "/tmp/kea-leases6.csv"</userinput>,
  333. <userinput>"lfc-interval": 1800</userinput>
  334. }
  335. }
  336. </screen>
  337. </para>
  338. <para>It is important to know how the lease file contents are organized
  339. to understand why the periodic lease file cleanup is needed. Every time when
  340. the server updates a lease or creates a new lease for the client, the new
  341. lease information must be recorded in the lease file. For performance reasons,
  342. the server does not supersede the existing client's lease, as it would require
  343. the lookup of the specific lease entry, but simply appends the new lease
  344. information at the end of the lease file. The previous lease entries for the
  345. client are not removed. When the server loads leases from the lease file, e.g.
  346. at the server startup, it assumes that the latest lease entry for the client
  347. is the valid one. The previous entries are discarded. This means that the
  348. server can re-construct the accurate information about the leases even though
  349. there may be many lease entries for each client. However, storing many entries
  350. for each client results in bloated lease file and impairs the performance of
  351. the server's startup and reconfiguration, as it needs to process larger number
  352. of lease entries.
  353. </para>
  354. <para>The lease file cleanup removes all previous entries for each client and
  355. leaves only the latest ones. The interval at which the cleanup is performed
  356. is configurable, and it should be selected according to the frequency of lease
  357. renewals initiated by the clients. The more frequent renewals are, the lesser
  358. value of the <command>lfc-interval</command> should be. Note however, that the
  359. LFC takes time and thus it is possible (although unlikely) that new cleanup
  360. is started while the previous cleanup instance is still running, if the
  361. <command>lfc-interval</command> is too short. The server would recover from
  362. this by skipping the new cleanup when it detects that the previous cleanup
  363. is still in progress. But, this implies that the actual cleanups will be
  364. triggered more rarely than configured. Moreover, triggering a new cleanup
  365. adds an overhead to the server, which will not be able to respond to new
  366. requests for a short period of time when the new cleanup process is spawned.
  367. Therefore, it is recommended that the <command>lfc-interval</command> value
  368. is selected in a way that would allow for completing the cleanup before the
  369. new cleanup is triggered.
  370. </para>
  371. <para>The LFC is performed by a separate process (in background) to avoid
  372. performance impact on the server process. In order to avoid the conflicts
  373. between the two processes both using the same lease files, the LFC process
  374. operates on the copy of the original lease file, rather than on the lease
  375. file used by the server to record lease updates. There are also other files
  376. being created as a side effect of the lease file cleanup. The detailed
  377. description of the LFC is located on the Kea wiki:
  378. <ulink url="http://kea.isc.org/wiki/LFCDesign"/>.
  379. </para>
  380. </section>
  381. <section id="database-configuration6">
  382. <title>Database Configuration</title>
  383. <note>
  384. <para>Database access information must be configured for the DHCPv6 server,
  385. even if it has already been configured for the DHCPv4 server. The servers
  386. store their information independently, so each server can use a separate
  387. database or both servers can use the same database.</para>
  388. </note>
  389. <para>Database configuration is controlled through the Dhcp6/lease-database
  390. parameters. The type of the database must be set to "mysql" or "postgresql",
  391. e.g.
  392. <screen>
  393. "Dhcp6": { "lease-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
  394. </screen>
  395. Next, the name of the database is to hold the leases must be set: this is the
  396. name used when the lease database was created (see <xref linkend="mysql-database-create"/>
  397. or <xref linkend="pgsql-database-create"/>).
  398. <screen>
  399. "Dhcp6": { "lease-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
  400. </screen>
  401. If the database is located on a different system than the DHCPv6 server, the
  402. database host name must also be specified (although it should be noted that this
  403. configuration may have a severe impact on server performance):
  404. <screen>
  405. "Dhcp6": { "lease-database": { <userinput>"host": <replaceable>remote-host-name</replaceable></userinput>, ... }, ... }
  406. </screen>
  407. The usual state of affairs will be to have the database on the same machine as
  408. the DHCPv6 server. In this case, set the value to the empty string:
  409. <screen>
  410. "Dhcp6": { "lease-database": { <userinput>"host" : ""</userinput>, ... }, ... }
  411. </screen>
  412. </para>
  413. <para>Finally, the credentials of the account under which the server will
  414. access the database should be set:
  415. <screen>
  416. "Dhcp6": { "lease-database": { <userinput>"user": "<replaceable>user-name</replaceable>"</userinput>,
  417. <userinput>"password": "<replaceable>password</replaceable>"</userinput>,
  418. ... },
  419. ... }
  420. </screen>
  421. If there is no password to the account, set the password to the empty string
  422. "". (This is also the default.)</para>
  423. </section>
  424. </section>
  425. <section id="dhcp6-interface-selection">
  426. <title>Interface selection</title>
  427. <para>The DHCPv6 server has to be configured to listen on specific network
  428. interfaces. The simplest network interface configuration instructs the server to
  429. listen on all available interfaces:
  430. <screen>
  431. "Dhcp6": {
  432. "interfaces-config": {
  433. "interfaces": [ <userinput>"*"</userinput> ]
  434. }
  435. ...
  436. }
  437. </screen>
  438. The asterisk plays the role of a wildcard and means "listen on all interfaces".
  439. However, it is usually a good idea to explicitly specify interface names:
  440. <screen>
  441. "Dhcp6": {
  442. "interfaces-config": {
  443. "interfaces": [ <userinput>"eth1", "eth3"</userinput> ]
  444. },
  445. ...
  446. }
  447. </screen>
  448. </para>
  449. <para>It is possible to use wildcard interface name (asterisk) concurrently
  450. with the actual interface names:
  451. <screen>
  452. "Dhcp6": {
  453. "interfaces-config": {
  454. "interfaces": [ <userinput>"eth1", "eth3", "*"</userinput> ]
  455. },
  456. ...
  457. }
  458. </screen>
  459. It is anticipated that this will form of usage only be used where it is desired to
  460. temporarily override a list of interface names and listen on all interfaces.
  461. </para>
  462. </section>
  463. <section id="ipv6-subnet-id">
  464. <title>IPv6 Subnet Identifier</title>
  465. <para>
  466. The subnet identifier is a unique number associated with a particular subnet.
  467. In principle, it is used to associate clients' leases with respective subnets.
  468. When the subnet identifier is not specified for a subnet being configured, it will
  469. be automatically assigned by the configuration mechanism. The identifiers
  470. are assigned from 1 and are monotonically increased for each subsequent
  471. subnet: 1, 2, 3 ....
  472. </para>
  473. <para>
  474. If there are multiple subnets configured with auto-generated identifiers and
  475. one of them is removed, the subnet identifiers may be renumbered. For example:
  476. if there are four subnets and the third is removed the last subnet will be assigned
  477. the identifier that the third subnet had before removal. As a result, the leases
  478. stored in the lease database for subnet 3 are now associated with
  479. subnet 4, which may have unexpected consequences. In the future it is planned
  480. to implement a mechanism to preserve auto-generated subnet ids upon removal
  481. of one of the subnets. Currently, the only remedy for this issue is to
  482. manually specify a unique subnet identifier for each subnet.
  483. </para>
  484. <para>
  485. The following configuration will assign the specified subnet
  486. identifier to the newly configured subnet:
  487. <screen>
  488. "Dhcp6": {
  489. "subnet6": [
  490. {
  491. "subnet": "2001:db8:1::/64",
  492. <userinput>"id": 1024</userinput>,
  493. ...
  494. }
  495. ]
  496. }
  497. </screen>
  498. This identifier will not change for this subnet unless the "id" parameter is
  499. removed or set to 0. The value of 0 forces auto-generation of the subnet
  500. identifier.
  501. </para>
  502. <!-- @todo: describe whether database needs to be updated after changing
  503. id -->
  504. </section>
  505. <section id="dhcp6-unicast">
  506. <title>Unicast traffic support</title>
  507. <para>
  508. When the DHCPv6 server starts, by default it listens to the DHCP traffic
  509. sent to multicast address ff02::1:2 on each interface that it is
  510. configured to listen on (see <xref linkend="dhcp6-interface-selection"/>).
  511. In some cases it is useful to configure a server to handle incoming
  512. traffic sent to the global unicast addresses as well. The most common
  513. reason for that is to have relays send their traffic to the server
  514. directly. To configure the server to listen on a specific unicast address, the
  515. notation to specify interfaces has been extended. An interface name can be
  516. optionally followed by a slash, followed by the global unicast address on which
  517. the server should listen. This will be done in addition to normal
  518. link-local binding + listening on ff02::1:2 address. The sample configuration
  519. below shows how to listen on 2001:db8::1 (a global address)
  520. configured on the eth1 interface.
  521. </para>
  522. <para>
  523. <screen>
  524. "Dhcp6": {
  525. "interfaces-config": {
  526. "interfaces": [ <userinput>"eth1/2001:db8::1"</userinput> ]
  527. },
  528. ...
  529. }
  530. </screen>
  531. This configuration will cause the server to listen on
  532. eth1 on link-local address, multicast group (ff02::1:2) and 2001:db8::1.
  533. </para>
  534. <para>
  535. It is possible to mix interface names, wildcards and interface name/addresses
  536. on the list of interfaces. It is not possible to specify more than one
  537. unicast address on a given interface.
  538. </para>
  539. <para>
  540. Care should be taken to specify proper unicast addresses. The server will
  541. attempt to bind to those addresses specified, without any additional checks.
  542. This approach is selected on purpose, so the software can be used to
  543. communicate over uncommon addresses if the administrator so desires.
  544. </para>
  545. </section>
  546. <section id="dhcp6-address-config">
  547. <title>Subnet and Address Pool</title>
  548. <para>
  549. The essential role of a DHCPv6 server is address assignment. For this,
  550. the server has to be configured with at least one subnet and one pool of dynamic
  551. addresses to be managed. For example, assume that the server
  552. is connected to a network segment that uses the 2001:db8:1::/64
  553. prefix. The Administrator of that network has decided that addresses from range
  554. 2001:db8:1::1 to 2001:db8:1::ffff are going to be managed by the Dhcp6
  555. server. Such a configuration can be achieved in the following way:
  556. <screen>
  557. "Dhcp6": {
  558. <userinput>"subnet6": [
  559. {
  560. "subnet": "2001:db8:1::/64",
  561. "pools": [
  562. {
  563. "pool": "2001:db8:1::1-2001:db8:1::ffff"
  564. }
  565. ],
  566. ...
  567. }
  568. ]</userinput>
  569. }</screen>
  570. Note that subnet is defined as a simple string, but the pool parameter
  571. is actually a list of pools: for this reason, the pool definition is
  572. enclosed in square brackets, even though only one range of addresses
  573. is specified.</para>
  574. <para>Each <command>pool</command> is a structure that contains the
  575. parameters that describe a single pool. Currently there is only one
  576. parameter, <command>pool</command>, which gives the range of addresses
  577. in the pool. Additional parameters will be added in future releases of
  578. Kea.</para>
  579. <para>It is possible to define more than one pool in a
  580. subnet: continuing the previous example, further assume that
  581. 2001:db8:1:0:5::/80 should also be managed by the server. It could be written as
  582. 2001:db8:1:0:5:: to 2001:db8:1::5:ffff:ffff:ffff, but typing so many 'f's
  583. is cumbersome. It can be expressed more simply as 2001:db8:1:0:5::/80. Both
  584. formats are supported by Dhcp6 and can be mixed in the pool list.
  585. For example, one could define the following pools:
  586. <screen>
  587. "Dhcp6": {
  588. <userinput>"subnet6": [
  589. {
  590. "subnet": "2001:db8:1::/64",
  591. "pools": [
  592. { "pool": "2001:db8:1::1-2001:db8:1::ffff" },
  593. { "pool": "2001:db8:1:05::/80" }
  594. ]</userinput>,
  595. ...
  596. }
  597. ]
  598. }</screen>
  599. The number of pools is not limited, but for performance reasons it is recommended to
  600. use as few as possible.
  601. </para>
  602. <para>
  603. The server may be configured to serve more than one subnet. To add a second subnet,
  604. use a command similar to the following:
  605. <screen>
  606. "Dhcp6": {
  607. <userinput>"subnet6": [
  608. {
  609. "subnet": "2001:db8:1::/64",
  610. "pools": [
  611. { "pool": "2001:db8:1::1-2001:db8:1::ffff" }
  612. ]
  613. },
  614. {
  615. "subnet": "2001:db8:2::/64",
  616. "pools": [
  617. { "pool": "2001:db8:2::/64" }
  618. ]
  619. },
  620. </userinput>
  621. ...
  622. ]
  623. }</screen>
  624. In this example, we allow the server to
  625. dynamically assign all addresses available in the whole subnet. Although
  626. rather wasteful, it is certainly a valid configuration to dedicate the
  627. whole /64 subnet for that purpose. Note that the Kea server does not preallocate
  628. the leases, so there is no danger in using gigantic address pools.
  629. </para>
  630. <para>
  631. When configuring a DHCPv6 server using prefix/length notation, please pay
  632. attention to the boundary values. When specifying that the server can use
  633. a given pool, it will also be able to allocate the first (typically network
  634. address) address from that pool. For example for pool 2001:db8:2::/64 the
  635. 2001:db8:2:: address may be assigned as well. If you want to avoid this,
  636. use the "min-max" notation.
  637. </para>
  638. </section>
  639. <section>
  640. <!-- @todo: add real meat to the prefix delegation config this is just place holder stuff -->
  641. <title>Subnet and Prefix Delegation Pools</title>
  642. <para>
  643. Subnets may also be configured to delegate prefixes, as defined in
  644. <ulink url="http://tools.ietf.org/html/rfc3633">RFC 3633</ulink>.
  645. A subnet may have one or more prefix delegation pools. Each pool has
  646. a prefixed address, which is specified as a prefix and a prefix length,
  647. as well as a delegated prefix length. <command>delegated-len</command>
  648. must not be shorter (that is it must be numerically greater or equal)
  649. than <command>prefix-len</command>.
  650. If both <command>delegated-len</command>
  651. and <command>prefix-len</command> are equal, the server will be able to
  652. delegate only one prefix. The delegated <command>prefix</command> does
  653. not have to match the <command>subnet</command> prefix.
  654. </para>
  655. <para> Below is a sample subnet configuration which enables prefix
  656. delegation for the subnet:
  657. <screen>
  658. "Dhcp6": {
  659. "subnet6": [
  660. {
  661. "subnet": "2001:d8b:1::/64",
  662. <userinput>"pd-pools": [
  663. {
  664. "prefix": "3000:1::",
  665. "prefix-len": 64,
  666. "delegated-len": 96
  667. }
  668. ]</userinput>
  669. }
  670. ],
  671. ...
  672. }</screen>
  673. </para>
  674. </section>
  675. <section id="dhcp6-std-options">
  676. <title>Standard DHCPv6 options</title>
  677. <para>
  678. One of the major features of a DHCPv6 server is to provide configuration
  679. options to clients. Although there are several options that require
  680. special behavior, most options are sent by the server only if the client
  681. explicitly requests them. The following example shows how to
  682. configure DNS servers, which is one of the most frequently used
  683. options. Numbers in the first column are added for easier reference and
  684. will not appear on screen. Options specified in this way are considered
  685. global and apply to all configured subnets.
  686. <screen>
  687. "Dhcp6": {
  688. "option-data": [
  689. {
  690. <userinput>"name": "dns-servers",
  691. "code": 23,
  692. "space": "dhcp6",
  693. "csv-format": true,
  694. "data": "2001:db8::cafe, 2001:db8::babe"</userinput>
  695. },
  696. ...
  697. ]
  698. }
  699. </screen>
  700. </para>
  701. <para>
  702. The <command>option-data></command> line creates a new entry in
  703. the option-data table. This table contains
  704. information on all global options that the server is supposed to configure
  705. in all subnets. The <command>name</command> line specifies the option name.
  706. (For a complete list
  707. of currently supported names, see <xref
  708. linkend="dhcp6-std-options-list"/>.) The next line specifies the option code,
  709. which must match one of the values from that list. The line beginning with
  710. <command>space</command> specifies the option space, which must always be set
  711. to "dhcp6" as these are standard DHCPv6 options. For other name spaces,
  712. including custom option spaces, see <xref
  713. linkend="dhcp6-option-spaces"/>. The next line specifies the format in
  714. which the data will be entered: use of CSV (comma separated values) is
  715. recommended. The <command>data</command> line gives the actual value to be sent to
  716. clients. Data is specified as normal text, with values separated by
  717. commas if more than one value is allowed.
  718. </para>
  719. <para>
  720. Options can also be configured as hexadecimal values. If "csv-format" is
  721. set to false, the option data must be specified as a string of hexadecimal
  722. numbers. The
  723. following commands configure the DNS-SERVERS option for all
  724. subnets with the following addresses: 2001:db8:1::cafe and
  725. 2001:db8:1::babe.
  726. <screen>
  727. "Dhcp6": {
  728. "option-data": [
  729. {
  730. <userinput>"name": "dns-servers",
  731. "code": 23,
  732. "space": "dhcp6",
  733. "csv-format": false,
  734. "data": "2001 0DB8 0001 0000 0000 0000 0000 CAFE
  735. 2001 0DB8 0001 0000 0000 0000 0000 BABE"</userinput>
  736. },
  737. ...
  738. ]
  739. }
  740. </screen>
  741. The value for the setting of the "data" element is split across two
  742. lines in this document for clarity: when entering the command, the
  743. whole string should be entered on the same line. Care should be taken
  744. to use proper encoding when using hexadecimal format as Kea's ability
  745. to validate data correctness in hexadecimal is limited.
  746. </para>
  747. <para>
  748. Most of the parameters in the "option-data" structure are optional and
  749. can be omitted in some circumstances as discussed in the
  750. <xref linkend="dhcp6-option-data-defaults"/>.
  751. </para>
  752. <para>
  753. It is possible to override options on a per-subnet basis. If
  754. clients connected to most of your subnets are expected to get the
  755. same values of a given option, you should use global options: you
  756. can then override specific values for a small number of subnets.
  757. On the other hand, if you use different values in each subnet,
  758. it does not make sense to specify global option values
  759. (Dhcp6/option-data), rather you should set only subnet-specific values
  760. (Dhcp6/subnet[X]/option-data[Y]).
  761. </para>
  762. <para>
  763. The following commands override the global
  764. DNS servers option for a particular subnet, setting a single DNS
  765. server with address 2001:db8:1::3.
  766. <screen>
  767. "Dhcp6": {
  768. "subnet6": [
  769. {
  770. <userinput>"option-data": [
  771. {
  772. "name": "dns-servers",
  773. "code": 23,
  774. "space": "dhcp6",
  775. "csv-format": true,
  776. "data": "2001:db8:1::3"
  777. },
  778. ...
  779. ]</userinput>,
  780. ...
  781. },
  782. ...
  783. ],
  784. ...
  785. }
  786. </screen>
  787. </para>
  788. <para>
  789. The currently supported standard DHCPv6 options are
  790. listed in <xref linkend="dhcp6-std-options-list"/>.
  791. The "Name" and "Code"
  792. are the values that should be used as a name in the option-data
  793. structures. "Type" designates the format of the data: the meanings of
  794. the various types is given in <xref linkend="dhcp-types"/>.
  795. </para>
  796. <para>
  797. Experimental options (like standard options but with a code
  798. which was not assigned by IANA) are listed in
  799. <xref linkend="dhcp6-exp-options-list"/>.
  800. </para>
  801. <para>
  802. Some options are designated as arrays, which means that more than one
  803. value is allowed in such an option. For example the option dns-servers
  804. allows the specification of more than one IPv6 address, allowing
  805. clients to obtain the addresses of multiple DNS servers.
  806. </para>
  807. <!-- @todo: describe record types -->
  808. <para>
  809. The <xref linkend="dhcp6-custom-options"/> describes the configuration
  810. syntax to create custom option definitions (formats). It is generally not
  811. allowed to create custom definitions for standard options, even if the
  812. definition being created matches the actual option format defined in the
  813. RFCs. There is an exception from this rule for standard options for which
  814. Kea does not provide a definition yet. In order to use such options,
  815. a server administrator must create a definition as described in
  816. <xref linkend="dhcp6-custom-options"/> in the 'dhcp6' option space. This
  817. definition should match the option format described in the relevant
  818. RFC but the configuration mechanism would allow any option format as it has
  819. no means to validate the format at the moment.
  820. </para>
  821. <para>
  822. <table frame="all" id="dhcp6-std-options-list">
  823. <title>List of standard DHCPv6 options</title>
  824. <tgroup cols='4'>
  825. <colspec colname='name'/>
  826. <colspec colname='code' align='center'/>
  827. <colspec colname='type' align='center'/>
  828. <colspec colname='array' align='center'/>
  829. <thead>
  830. <row><entry>Name</entry><entry>Code</entry><entry>Type</entry><entry>Array?</entry></row>
  831. </thead>
  832. <tbody>
  833. <!-- Our engine uses those options on its own, admin must not configure them on his own
  834. <row><entry>clientid</entry><entry>1</entry><entry>binary</entry><entry>false</entry></row>
  835. <row><entry>serverid</entry><entry>2</entry><entry>binary</entry><entry>false</entry></row>
  836. <row><entry>ia-na</entry><entry>3</entry><entry>record</entry><entry>false</entry></row>
  837. <row><entry>ia-ta</entry><entry>4</entry><entry>uint32</entry><entry>false</entry></row>
  838. <row><entry>iaaddr</entry><entry>5</entry><entry>record</entry><entry>false</entry></row>
  839. <row><entry>oro</entry><entry>6</entry><entry>uint16</entry><entry>true</entry></row> -->
  840. <row><entry>preference</entry><entry>7</entry><entry>uint8</entry><entry>false</entry></row>
  841. <!-- Our engine uses those options on its own, admin must not configure them on his own
  842. <row><entry>elapsed-time</entry><entry>8</entry><entry>uint16</entry><entry>false</entry></row>
  843. <row><entry>relay-msg</entry><entry>9</entry><entry>binary</entry><entry>false</entry></row>
  844. <row><entry>auth</entry><entry>11</entry><entry>binary</entry><entry>false</entry></row>
  845. <row><entry>unicast</entry><entry>12</entry><entry>ipv6-address</entry><entry>false</entry></row>
  846. <row><entry>status-code</entry><entry>13</entry><entry>record</entry><entry>false</entry></row>
  847. <row><entry>rapid-commit</entry><entry>14</entry><entry>empty</entry><entry>false</entry></row>
  848. <row><entry>user-class</entry><entry>15</entry><entry>binary</entry><entry>false</entry></row>
  849. <row><entry>vendor-class</entry><entry>16</entry><entry>record</entry><entry>false</entry></row>
  850. -->
  851. <!-- Vendor-specific Information is configurable by the administrator -->
  852. <row><entry>vendor-opts</entry><entry>17</entry><entry>uint32</entry><entry>false</entry></row>
  853. <!--
  854. <row><entry>interface-id</entry><entry>18</entry><entry>binary</entry><entry>false</entry></row>
  855. <row><entry>reconf-msg</entry><entry>19</entry><entry>uint8</entry><entry>false</entry></row>
  856. <row><entry>reconf-accept</entry><entry>20</entry><entry>empty</entry><entry>false</entry></row> -->
  857. -->
  858. <row><entry>sip-server-dns</entry><entry>21</entry><entry>fqdn</entry><entry>true</entry></row>
  859. <row><entry>sip-server-addr</entry><entry>22</entry><entry>ipv6-address</entry><entry>true</entry></row>
  860. <row><entry>dns-servers</entry><entry>23</entry><entry>ipv6-address</entry><entry>true</entry></row>
  861. <row><entry>domain-search</entry><entry>24</entry><entry>fqdn</entry><entry>true</entry></row>
  862. <!-- <row><entry>ia-pd</entry><entry>25</entry><entry>record</entry><entry>false</entry></row> -->
  863. <!-- <row><entry>iaprefix</entry><entry>26</entry><entry>record</entry><entry>false</entry></row> -->
  864. <row><entry>nis-servers</entry><entry>27</entry><entry>ipv6-address</entry><entry>true</entry></row>
  865. <row><entry>nisp-servers</entry><entry>28</entry><entry>ipv6-address</entry><entry>true</entry></row>
  866. <row><entry>nis-domain-name</entry><entry>29</entry><entry>fqdn</entry><entry>true</entry></row>
  867. <row><entry>nisp-domain-name</entry><entry>30</entry><entry>fqdn</entry><entry>true</entry></row>
  868. <row><entry>sntp-servers</entry><entry>31</entry><entry>ipv6-address</entry><entry>true</entry></row>
  869. <row><entry>information-refresh-time</entry><entry>32</entry><entry>uint32</entry><entry>false</entry></row>
  870. <row><entry>bcmcs-server-dns</entry><entry>33</entry><entry>fqdn</entry><entry>true</entry></row>
  871. <row><entry>bcmcs-server-addr</entry><entry>34</entry><entry>ipv6-address</entry><entry>true</entry></row>
  872. <row><entry>geoconf-civic</entry><entry>36</entry><entry>record (uint8, uint16, binary)</entry><entry>false</entry></row>
  873. <row><entry>remote-id</entry><entry>37</entry><entry>record (uint32, binary)</entry><entry>false</entry></row>
  874. <row><entry>subscriber-id</entry><entry>38</entry><entry>binary</entry><entry>false</entry></row>
  875. <row><entry>client-fqdn</entry><entry>39</entry><entry>record (uint8, fqdn)</entry><entry>false</entry></row>
  876. <row><entry>pana-agent</entry><entry>40</entry><entry>ipv6-address</entry><entry>true</entry></row>
  877. <row><entry>new-posix-timezone</entry><entry>41</entry><entry>string</entry><entry>false</entry></row>
  878. <row><entry>new-tzdb-timezone</entry><entry>42</entry><entry>string</entry><entry>false</entry></row>
  879. <row><entry>ero</entry><entry>43</entry><entry>uint16</entry><entry>true</entry></row>
  880. <row><entry>lq-query</entry><entry>44</entry><entry>record (uint8, ipv6-address)</entry><entry>false</entry></row>
  881. <row><entry>client-data</entry><entry>45</entry><entry>empty</entry><entry>false</entry></row>
  882. <row><entry>clt-time</entry><entry>46</entry><entry>uint32</entry><entry>false</entry></row>
  883. <row><entry>lq-relay-data</entry><entry>47</entry><entry>record (ipv6-address, binary)</entry><entry>false</entry></row>
  884. <row><entry>lq-client-link</entry><entry>48</entry><entry>ipv6-address</entry><entry>true</entry></row>
  885. <row><entry>bootfile-url</entry><entry>59</entry><entry>string</entry><entry>false</entry></row>
  886. <row><entry>bootfile-param</entry><entry>60</entry><entry>binary</entry><entry>false</entry></row>
  887. <row><entry>client-arch-type</entry><entry>61</entry><entry>uint16</entry><entry>true</entry></row>
  888. <row><entry>nii</entry><entry>62</entry><entry>record (uint8, uint8, uint8)</entry><entry>false</entry></row>
  889. <row><entry>erp-local-domain-name</entry><entry>65</entry><entry>fqdn</entry><entry>false</entry></row>
  890. <row><entry>rsoo</entry><entry>66</entry><entry>empty</entry><entry>false</entry></row>
  891. <row><entry>client-linklayer-addr</entry><entry>79</entry><entry>binary</entry><entry>false</entry></row>
  892. <!-- <row><entry>dhcpv4-message</entry><entry>87</entry><entry>binary</entry><entry>false</entry></row> -->
  893. <row><entry>dhcp4o6-server-addr</entry><entry>88</entry><entry>ipv6-address</entry><entry>true</entry></row>
  894. </tbody>
  895. </tgroup>
  896. </table>
  897. </para>
  898. <para>
  899. <table frame="all" id="dhcp6-exp-options-list">
  900. <title>List of experimental DHCPv6 options</title>
  901. <tgroup cols='4'>
  902. <colspec colname='name'/>
  903. <colspec colname='code' align='center'/>
  904. <colspec colname='type' align='center'/>
  905. <colspec colname='array' align='center'/>
  906. <thead>
  907. <row><entry>Name</entry><entry>Code</entry><entry>Type</entry><entry>Array?</entry></row>
  908. </thead>
  909. <tbody>
  910. <row><entry>public-key</entry><entry>701</entry><entry>binary</entry><entry>false</entry></row>
  911. <row><entry>certificate</entry><entry>702</entry><entry>binary</entry><entry>false</entry></row>
  912. <row><entry>signature</entry><entry>703</entry><entry>record (uint8, uint8, binary)</entry><entry>false</entry></row>
  913. <row><entry>timestamp</entry><entry>704</entry><entry>binary</entry><entry>false</entry></row>
  914. </tbody>
  915. </tgroup>
  916. </table>
  917. </para>
  918. </section>
  919. <section id="dhcp6-custom-options">
  920. <title>Custom DHCPv6 options</title>
  921. <para>It is also possible to define options other than the standard ones.
  922. Assume that we want to define a new DHCPv6 option called "foo" which will have
  923. code 100 and will convey a single unsigned 32 bit integer value. We can define
  924. such an option by using the following commands:
  925. <screen>
  926. "Dhcp6": {
  927. "option-def": [
  928. {
  929. <userinput>"name": "foo",
  930. "code": 100,
  931. "type": "uint32",
  932. "array": false,
  933. "record-types": "",
  934. "space": "dhcp6",
  935. "encapsulate": ""</userinput>
  936. }, ...
  937. ],
  938. ...
  939. }
  940. </screen>
  941. The "false" value of the "array" parameter determines that the option does
  942. NOT comprise an array of "uint32" values but rather a single value. Two
  943. other parameters have been left blank: "record-types" and "encapsulate".
  944. The former specifies the comma separated list of option data fields if the
  945. option comprises a record of data fields. The "record-fields" value should
  946. be non-empty if the "type" is set to "record". Otherwise it must be left
  947. blank. The latter parameter specifies the name of the option space being
  948. encapsulated by the particular option. If the particular option does not
  949. encapsulate any option space it should be left blank. Note that the above
  950. set of comments define the format of the new option and do not set its
  951. values.
  952. </para>
  953. <para>The <command>name</command>, <command>code</command> and
  954. <command>type</command> parameters are required, all others are
  955. optional. The <command>array</command> default value is
  956. <command>false</command>. The <command>record-types</command>
  957. and <command>encapsulate</command> default values are blank
  958. (i.e. ""). The default <command>space</command> is "dhcp6".
  959. </para>
  960. <para>Once the new option format is defined, its value is set
  961. in the same way as for a standard option. For example the following
  962. commands set a global value that applies to all subnets.
  963. <screen>
  964. "Dhcp6": {
  965. "option-data": [
  966. {
  967. <userinput>"name": "foo",
  968. "code": 100,
  969. "space": "dhcp6",
  970. "csv-format": true,
  971. "data": "12345"</userinput>
  972. }, ...
  973. ],
  974. ...
  975. }
  976. </screen>
  977. </para>
  978. <para>New options can take more complex forms than simple use of
  979. primitives (uint8, string, ipv6-address etc): it is possible to
  980. define an option comprising a number of existing primitives.
  981. </para>
  982. <para>
  983. Assume we want to define a new option that will consist of an IPv6
  984. address, followed by an unsigned 16 bit integer, followed by a
  985. boolean value, followed by a text string. Such an option could
  986. be defined in the following way:
  987. <screen>
  988. "Dhcp6": {
  989. "option-def": [
  990. {
  991. <userinput>"name": "bar",
  992. "code": 101,
  993. "space": "dhcp6",
  994. "type": "record",
  995. "array": false,
  996. "record-types": "ipv6-address, uint16, boolean, string",
  997. "encapsulate": ""</userinput>
  998. }, ...
  999. ],
  1000. ...
  1001. }
  1002. </screen>
  1003. The "type" is set to "record" to indicate that the option contains
  1004. multiple values of different types. These types are given as a comma-separated
  1005. list in the "record-types" field and should be those listed in <xref linkend="dhcp-types"/>.
  1006. </para>
  1007. <para>
  1008. The values of the option are set as follows:
  1009. <screen>
  1010. "Dhcp6": {
  1011. "option-data": [
  1012. {
  1013. <userinput>"name": "bar",
  1014. "space": "dhcp6",
  1015. "code": 101,
  1016. "csv-format": true,
  1017. "data": "2001:db8:1::10, 123, false, Hello World"</userinput>
  1018. }
  1019. ],
  1020. ...
  1021. }</screen>
  1022. <command>csv-format</command> is set <command>true</command> to indicate
  1023. that the <command>data</command> field comprises a command-separated list
  1024. of values. The values in the "data" must correspond to the types set in
  1025. the "record-types" field of the option definition.
  1026. </para>
  1027. <note>
  1028. <para>In the general case, boolean values are specified as <command>true</command> or
  1029. <command>false</command>, without quotes. Some specific boolean parameters may
  1030. accept also <command>"true"</command>, <command>"false"</command>,
  1031. <command>0</command>, <command>1</command>, <command>"0"</command> and
  1032. <command>"1"</command>. Future Kea versions will accept all those values
  1033. for all boolean parameters.</para>
  1034. </note>
  1035. </section>
  1036. <section id="dhcp6-vendor-opts">
  1037. <title>DHCPv6 vendor specific options</title>
  1038. <para>
  1039. Currently there are two option spaces defined for the DHCPv6
  1040. daemon: "dhcp6" (for top level DHCPv6 options) and "vendor-opts-space",
  1041. which is empty by default, but options can be defined in it.
  1042. Those options will be carried in the Vendor-specific
  1043. Information option (code 17). The following examples show how to
  1044. define an option "foo" with code 1 that consists of an IPv6 address,
  1045. an unsigned 16 bit integer and a string. The "foo" option is
  1046. conveyed in a Vendor-specific Information option. This option
  1047. comprises a single uint32 value that is set to "12345".
  1048. The sub-option "foo" follows the data field holding this value.
  1049. <screen>
  1050. "Dhcp6": {
  1051. "option-def": [
  1052. {
  1053. <userinput>"name": "foo",
  1054. "code": 1,
  1055. "space": "vendor-opts-space",
  1056. "type": "record",
  1057. "array": false,
  1058. "record-types": "ipv6-address, uint16, string",
  1059. "encapsulate": ""</userinput>
  1060. }
  1061. ],
  1062. ...
  1063. }</screen>
  1064. (Note that the option space is set to <command>vendor-opts-space</command>.)
  1065. Once the option format is defined, the next step is to define actual values
  1066. for that option:
  1067. <screen>
  1068. "Dhcp6": {
  1069. "option-data": [
  1070. {
  1071. <userinput>"name": "foo",
  1072. "space": "vendor-opts-space",
  1073. "data": "2001:db8:1::10, 123, Hello World"</userinput>
  1074. },
  1075. ...
  1076. ],
  1077. ...
  1078. }</screen>
  1079. We should also define a value (enterprise-number) for the
  1080. Vendor-specific Information option, that conveys our option "foo".
  1081. <screen>
  1082. "Dhcp6": {
  1083. "option-data": [
  1084. ...,
  1085. {
  1086. <userinput>"name": "vendor-opts",
  1087. "data": "12345"</userinput>
  1088. }
  1089. ],
  1090. ...
  1091. }</screen>
  1092. Alternatively, the option can be specified using its code.
  1093. <screen>
  1094. "Dhcp6": {
  1095. "option-data": [
  1096. ...,
  1097. {
  1098. <userinput>"code": 17,
  1099. "data": "12345"</userinput>
  1100. }
  1101. ],
  1102. ...
  1103. }</screen>
  1104. </para>
  1105. </section>
  1106. <section id="dhcp6-option-spaces">
  1107. <title>Nested DHCPv6 options (custom option spaces)</title>
  1108. <para>It is sometimes useful to define completely new option
  1109. spaces. This is useful if the user wants his new option to
  1110. convey sub-options that use a separate numbering scheme, for
  1111. example sub-options with codes 1 and 2. Those option codes
  1112. conflict with standard DHCPv6 options, so a separate option
  1113. space must be defined.
  1114. </para>
  1115. <para>Note that it is not required to create a new option space when
  1116. defining sub-options for a standard option because it is
  1117. created by default if the standard option is meant to convey
  1118. any sub-options (see <xref linkend="dhcp6-vendor-opts"/>).
  1119. </para>
  1120. <para>
  1121. Assume that we want to have a DHCPv6 option called "container"
  1122. with code 102 that conveys two sub-options with codes 1 and 2.
  1123. First we need to define the new sub-options:
  1124. <screen>
  1125. "Dhcp6": {
  1126. "option-def": [
  1127. {
  1128. <userinput>"name": "subopt1",
  1129. "code": 1,
  1130. "space": "isc",
  1131. "type": "ipv6-address",
  1132. "record-types": "",
  1133. "array": false,
  1134. "encapsulate": ""</userinput>
  1135. },
  1136. {
  1137. <userinput>"name": "subopt2",
  1138. "code": 2,
  1139. "space": "isc",
  1140. "type": "string",
  1141. "record-types": "",
  1142. "array": false
  1143. "encapsulate": ""</userinput>
  1144. }
  1145. ],
  1146. ...
  1147. }</screen>
  1148. Note that we have defined the options to belong to a new option space
  1149. (in this case, "isc").
  1150. </para>
  1151. <para>
  1152. The next step is to define a regular DHCPv6 option and specify that it
  1153. should include options from the isc option space:
  1154. <screen>
  1155. "Dhcp6": {
  1156. "option-def": [
  1157. ...,
  1158. {
  1159. <userinput>"name": "container",
  1160. "code": 102,
  1161. "space": "dhcp6",
  1162. "type": "empty",
  1163. "array": false,
  1164. "record-types": "",
  1165. "encapsulate": "isc"</userinput>
  1166. }
  1167. ],
  1168. ...
  1169. }</screen>
  1170. The name of the option space in which the sub-options are defined is set in
  1171. the <command>encapsulate</command> field. The <command>type</command> field
  1172. is set to <command>empty</command> which limits this option to only carrying
  1173. data in sub-options.
  1174. </para>
  1175. <para>
  1176. Finally, we can set values for the new options:
  1177. <screen>
  1178. "Dhcp6": {
  1179. "option-data": [
  1180. {
  1181. <userinput>"name": "subopt1",
  1182. "code": 1,
  1183. "space": "isc",
  1184. "data": "2001:db8::abcd"</userinput>
  1185. },
  1186. }
  1187. <userinput>"name": "subopt2",
  1188. "code": 2,
  1189. "space": "isc",
  1190. "data": "Hello world"</userinput>
  1191. },
  1192. {
  1193. <userinput>"name": "container",
  1194. "code": 102,
  1195. "space": "dhcp6"</userinput>
  1196. }
  1197. ],
  1198. ...
  1199. }
  1200. </screen>
  1201. </para>
  1202. <para>Note that it is possible to create an option which carries some data
  1203. in addition to the sub-options defined in the encapsulated option space.
  1204. For example, if the "container" option from the previous example was
  1205. required to carry an uint16 value as well as the sub-options, the "type"
  1206. value would have to be set to "uint16" in the option definition. (Such an
  1207. option would then have the following data structure: DHCP header, uint16
  1208. value, sub-options.) The value specified with the "data" parameter &mdash; which
  1209. should be a valid integer enclosed in quotes, e.g. "123" &mdash; would then be
  1210. assigned to the uint16 field in the "container" option.
  1211. </para>
  1212. </section>
  1213. <section id="dhcp6-option-data-defaults">
  1214. <title>Unspecified parameters for DHCPv6 option configuration</title>
  1215. <para>In many cases it is not required to specify all parameters for
  1216. an option configuration and the default values can be used. However, it is
  1217. important to understand the implications of not specifing some of them
  1218. as it may result in configuration errors. The list below explains
  1219. the behavior of the server when a particular parameter is not explicitly
  1220. specified:
  1221. <itemizedlist>
  1222. <listitem>
  1223. <simpara><command>name</command> - the server requires an option name or
  1224. option code to identify an option. If this parameter is unspecified, the
  1225. option code must be specified.
  1226. </simpara>
  1227. </listitem>
  1228. <listitem>
  1229. <simpara><command>code</command> - the server requires an option name or
  1230. option code to identify an option. This parameter may be left unspecified if
  1231. the <command>name</command> parameter is specified. However, this also
  1232. requires that the particular option has its definition (it is either a
  1233. standard option or an administrator created a definition for the option
  1234. using an 'option-def' structure), as the option definition associates an
  1235. option with a particular name. It is possible to configure an option
  1236. for which there is no definition (unspecified option format).
  1237. Configuration of such options requires the use of option code.
  1238. </simpara>
  1239. </listitem>
  1240. <listitem>
  1241. <simpara><command>space</command> - if the option space is unspecified it
  1242. will default to 'dhcp6' which is an option space holding DHCPv6 standard
  1243. options.
  1244. </simpara>
  1245. </listitem>
  1246. <listitem>
  1247. <simpara><command>data</command> - if the option data is unspecified it
  1248. defaults to an empty value. The empty value is mostly used for the
  1249. options which have no payload (boolean options), but it is legal to specify
  1250. empty values for some options which carry variable length data and which
  1251. spec allows for the length of 0. For such options, the data parameter
  1252. may be omitted in the configuration.</simpara>
  1253. </listitem>
  1254. <listitem>
  1255. <simpara><command>csv-format</command> - if this value is not specified
  1256. and the definition for the particular option exists, the server will assume
  1257. that the option data is specified as a list of comma separated values to be
  1258. assigned to individual fields of the DHCP option. If the definition
  1259. does not exist for this option, the server will assume that the data
  1260. parameter contains the option payload in the binary format (represented
  1261. as a string of hexadecimal digits). Note that not specifying this
  1262. parameter doesn't imply that it defaults to a fixed value, but
  1263. the configuration data interpretation also depends on the presence
  1264. of the option definition. An administrator must be aware if the
  1265. definition for the particular option exists when this parameter
  1266. is not specified. It is generally recommended to not specify this
  1267. parameter only for the options for which the definition exists, e.g.
  1268. standard options. Setting <command>csv-format</command> to an explicit
  1269. value will cause the server to strictly check the format of the option
  1270. data specified.
  1271. </simpara>
  1272. </listitem>
  1273. </itemizedlist>
  1274. </para>
  1275. </section>
  1276. <section id="dhcp6-config-subnets">
  1277. <title>IPv6 Subnet Selection</title>
  1278. <para>
  1279. The DHCPv6 server may receive requests from local (connected to the
  1280. same subnet as the server) and remote (connecting via relays) clients.
  1281. As the server may have many subnet configurations defined, it must select
  1282. an appropriate subnet for a given request.
  1283. </para>
  1284. <para>
  1285. The server can not assume which of the configured subnets are local. In IPv4
  1286. it is possible as there is a reasonable expectation that the
  1287. server will have a (global) IPv4 address configured on the interface,
  1288. and can use that information to detect whether a subnet is local or
  1289. not. That assumption is not true in IPv6, the DHCPv6 server must be able
  1290. to operate while only having link-local addresses. Therefore an optional
  1291. &quot;interface&quot; parameter is available within a subnet definition
  1292. to designate that a given subnet is local, i.e. reachable directly over
  1293. the specified interface. For example the server that is intended to serve
  1294. a local subnet over eth0 may be configured as follows:
  1295. <screen>
  1296. "Dhcp6": {
  1297. "subnet6": [
  1298. {
  1299. "subnet": "2001:db8:beef::/48",
  1300. "pools": [
  1301. {
  1302. "pool": "2001:db8:beef::/48"
  1303. }
  1304. ],
  1305. <userinput>"interface": "eth0"</userinput>
  1306. }
  1307. ],
  1308. ...
  1309. }
  1310. </screen>
  1311. </para>
  1312. </section>
  1313. <section id="dhcp6-rapid-commit">
  1314. <title>Rapid Commit</title>
  1315. <para>The Rapid Commit option, described in
  1316. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>, is supported
  1317. by the Kea DHCPv6 server. However, support is disabled by default for
  1318. all subnets. It can be enabled for a particular subnet using the
  1319. <command>rapid-commit</command> parameter as shown below:
  1320. <screen>
  1321. "Dhcp6": {
  1322. "subnet6": [
  1323. {
  1324. "subnet": "2001:db8:beef::/48",
  1325. <userinput>"rapid-commit": true</userinput>,
  1326. "pools": [
  1327. {
  1328. "pool": "2001:db8:beef::1-2001:db8:beef::10"
  1329. }
  1330. ],
  1331. }
  1332. ],
  1333. ...
  1334. }
  1335. </screen>
  1336. </para>
  1337. <para>
  1338. This setting only affects the subnet for which the
  1339. <command>rapid-commit</command> is set to <command>true</command>.
  1340. For clients connected to other subnets, the server will ignore the
  1341. Rapid Commit option sent by the client and will follow the 4-way
  1342. exchange procedure, i.e. respond with the Advertise for the Solicit
  1343. containing Rapid Commit option.
  1344. </para>
  1345. </section>
  1346. <section id="dhcp6-relays">
  1347. <title>DHCPv6 Relays</title>
  1348. <para>
  1349. A DHCPv6 server with multiple subnets defined must select the
  1350. appropriate subnet when it receives a request from a client. For clients
  1351. connected via relays, two mechanisms are used:
  1352. </para>
  1353. <para>
  1354. The first uses the linkaddr field in the RELAY_FORW message. The name
  1355. of this field is somewhat misleading in that it does not contain a link-layer
  1356. address: instead, it holds an address (typically a global address) that is
  1357. used to identify a link. The DHCPv6 server checks if the address belongs
  1358. to a defined subnet and, if it does, that subnet is selected for the client's
  1359. request.
  1360. </para>
  1361. <para>
  1362. The second mechanism is based on interface-id options. While forwarding a client's
  1363. message, relays may insert an interface-id option into the message that
  1364. identifies the interface on the relay that received the message. (Some
  1365. relays allow configuration of that parameter, but it is sometimes
  1366. hardcoded and may range from the very simple (e.g. "vlan100") to the very cryptic:
  1367. one example seen on real hardware was "ISAM144|299|ipv6|nt:vp:1:110"). The
  1368. server can use this information to select the appropriate subnet.
  1369. The information is also returned to the relay which then knows the
  1370. interface to use to transmit the response to the client. In order for
  1371. this to work successfully, the relay interface IDs must be unique within
  1372. the network and the server configuration must match those values.
  1373. </para>
  1374. <para>
  1375. When configuring the DHCPv6 server, it should be noted that two
  1376. similarly-named parameters can be configured for a subnet:
  1377. <itemizedlist>
  1378. <listitem><simpara>
  1379. "interface" defines which local network interface can be used
  1380. to access a given subnet.
  1381. </simpara></listitem>
  1382. <listitem><simpara>
  1383. "interface-id" specifies the content of the interface-id option
  1384. used by relays to identify the interface on the relay to which
  1385. the response packet is sent.
  1386. </simpara></listitem>
  1387. </itemizedlist>
  1388. The two are mutually exclusive: a subnet cannot be both reachable locally
  1389. (direct traffic) and via relays (remote traffic). Specifying both is a
  1390. configuration error and the DHCPv6 server will refuse such a configuration.
  1391. </para>
  1392. <para>
  1393. To specify interface-id with value "vlan123", the following commands can
  1394. be used:
  1395. <screen>
  1396. "Dhcp6": {
  1397. "subnet6": [
  1398. {
  1399. "subnet": "2001:db8:beef::/48",
  1400. "pools": [
  1401. {
  1402. "pool": "2001:db8:beef::/48"
  1403. }
  1404. ],
  1405. <userinput>"interface-id": "vlan123"</userinput>
  1406. }
  1407. ],
  1408. ...
  1409. }
  1410. </screen>
  1411. </para>
  1412. </section>
  1413. <section id="dhcp6-rsoo">
  1414. <title>Relay-Supplied Options</title>
  1415. <para><ulink url="http://tools.ietf.org/html/rfc6422">RFC 6422</ulink>
  1416. defines a mechanism called Relay-Supplied DHCP Options. In certain cases relay
  1417. agents are the only entities that may have specific information. They can
  1418. insert options when relaying messages from the client to the server. The
  1419. server will then do certain checks and copy those options to the response
  1420. that will be sent to the client.</para>
  1421. <para>There are certain conditions that must be met for the option to be
  1422. included. First, the server must not provide the option by itself. In
  1423. other words, if both relay and server provide an option, the server always
  1424. takes precedence. Second, the option must be RSOO-enabled. IANA mantains a
  1425. list of RSOO-enabled options <ulink url="http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#options-relay-supplied">here</ulink>.
  1426. However, there may be cases when system administrators want to echo other
  1427. options. Kea can be instructed to treat other options as RSOO-enabled.
  1428. For example, to mark options 110, 120 and 130 as RSOO-enabled, the following
  1429. syntax should be used:
  1430. <screen>
  1431. "Dhcp6": {
  1432. <userinput>"relay-supplied-options": [ "110", "120", "130" ],</userinput>
  1433. ...
  1434. }
  1435. </screen>
  1436. </para>
  1437. <para>As of March 2015, only option 65 is RSOO-enabled by IANA. This
  1438. option will always be treated as such and there's no need to explicitly
  1439. mark it. Also, when enabling standard options, it is possible to use their
  1440. names, rather than option code, e.g. (e.g. use
  1441. <command>dns-servers</command> instead of <command>23</command>). See
  1442. <xref linkend="dhcp6-std-options-list" /> for the names. In certain cases
  1443. it could also work for custom options, but due to the nature of the parser
  1444. code this may be unreliable and should be avoided.
  1445. </para>
  1446. </section>
  1447. <section id="dhcp6-client-classifier">
  1448. <title>Client Classification in DHCPv6</title>
  1449. <note>
  1450. <para>
  1451. DHCPv6 server has been extended to support limited client classification.
  1452. Although the current capability is modest, it is expected to be expanded
  1453. in the future. It is envisaged that the majority of client classification
  1454. extensions will be using hooks extensions.
  1455. </para>
  1456. </note>
  1457. <para>In certain cases it is useful to differentiate between different types
  1458. of clients and treat them differently. The process of doing classification
  1459. is conducted in two steps. The first step is to assess an incoming packet and
  1460. assign it to zero or more classes. This classification is currently simple,
  1461. but is expected to grow in capability soon. Currently the server checks whether
  1462. the incoming packet includes vendor class option (16). If it has, the content
  1463. of that option is prepended with &quot;VENDOR_CLASS_&quot; then it is interpreted as a
  1464. class. For example, modern cable modems will send this option with value
  1465. &quot;docsis3.0&quot; and as a result the packet will belong to class
  1466. &quot;VENDOR_CLASS_docsis3.0&quot;.
  1467. </para>
  1468. <para>It is envisaged that the client classification will be used for changing
  1469. behavior of almost any part of the DHCP engine processing, including assigning
  1470. leases from different pools, assigning different option (or different values of
  1471. the same options) etc. For now, there is only one mechanism that is taking
  1472. advantage of client classification: subnet selection.</para>
  1473. <para>
  1474. Kea can be instructed to limit access to given subnets based on class information.
  1475. This is particularly useful for cases where two types of devices share the
  1476. same link and are expected to be served from two different subnets. The
  1477. primary use case for such a scenario are cable networks. There are two
  1478. classes of devices: the cable modem itself, which should be handed a lease
  1479. from subnet A and all other devices behind modems that should get a lease
  1480. from subnet B. That segregation is essential to prevent overly curious
  1481. users from playing with their cable modems. For details on how to set up
  1482. class restrictions on subnets, see <xref linkend="dhcp6-subnet-class"/>.
  1483. </para>
  1484. </section>
  1485. <section id="dhcp6-subnet-class">
  1486. <title>Limiting access to IPv6 subnet to certain classes</title>
  1487. <para>
  1488. In certain cases it beneficial to restrict access to certain subnets
  1489. only to clients that belong to a given class. For details on client
  1490. classes, see <xref linkend="dhcp6-client-classifier"/>. This is an
  1491. extension of a previous example from <xref linkend="dhcp6-address-config"/>.
  1492. Let's assume that the server is connected to a network segment that uses
  1493. the 2001:db8:1::/64 prefix. The Administrator of that network has
  1494. decided that addresses from range 2001:db8:1::1 to 2001:db8:1::ffff are
  1495. going to be managed by the Dhcp6 server. Only clients belonging to the
  1496. eRouter1.0 client class are allowed to use that pool. Such a
  1497. configuration can be achieved in the following way:
  1498. <screen>
  1499. "Dhcp6": {
  1500. "subnet6": [
  1501. {
  1502. "subnet": "2001:db8:1::/64",
  1503. "pools": [
  1504. {
  1505. "pool": "2001:db8:1::-2001:db8:1::ffff"
  1506. }
  1507. ],
  1508. <userinput>"client-class": "VENDOR_CLASS_eRouter1.0"</userinput>
  1509. }
  1510. ],
  1511. ...
  1512. }
  1513. </screen>
  1514. </para>
  1515. <para>
  1516. Care should be taken with client classification as it is easy for
  1517. clients that do not meet class criteria to be denied any service altogether.
  1518. </para>
  1519. </section>
  1520. <section id="dhcp6-ddns-config">
  1521. <title>Configuring DHCPv6 for DDNS</title>
  1522. <para>
  1523. As mentioned earlier, kea-dhcp6 can be configured to generate requests to
  1524. the DHCP-DDNS server (referred to here as "D2") to update
  1525. DNS entries. These requests are known as NameChangeRequests or NCRs.
  1526. Each NCR contains the following information:
  1527. <orderedlist>
  1528. <listitem><para>
  1529. Whether it is a request to add (update) or remove DNS entries
  1530. </para></listitem>
  1531. <listitem><para>
  1532. Whether the change requests forward DNS updates (AAAA records), reverse
  1533. DNS updates (PTR records), or both.
  1534. </para></listitem>
  1535. <listitem><para>
  1536. The FQDN, lease address, and DHCID
  1537. </para></listitem>
  1538. </orderedlist>
  1539. The parameters controlling the generation of NCRs for submission to D2
  1540. are contained in the "dhcp-ddns" section of kea-dhcp6
  1541. configuration. The mandatory parameters for the DHCP DDNS configuration
  1542. are <command>enable-updates</command> which is unconditionally
  1543. required, and <command>qualifying-suffix</command> which has no
  1544. default value and is required when <command>enable-updates</command>
  1545. is set to <command>true</command>.
  1546. The two (disabled and enabled) minimal DHCP DDNS configurations are:
  1547. <screen>
  1548. "Dhcp6": {
  1549. "dhcp-ddns": {
  1550. <userinput>"enable-updates": false</userinput>
  1551. },
  1552. ...
  1553. }
  1554. </screen>
  1555. and for example:
  1556. <screen>
  1557. "Dhcp6": {
  1558. "dhcp-ddns": {
  1559. <userinput>"enable-updates": true,
  1560. "qualifying-suffix": "example."</userinput>
  1561. },
  1562. ...
  1563. }
  1564. </screen>
  1565. The default values for the "dhcp-ddns" section are as follows:
  1566. <itemizedlist>
  1567. <listitem><simpara>
  1568. <command>"server-ip": "127.0.0.1"</command>
  1569. </simpara></listitem>
  1570. <listitem><simpara>
  1571. <command>"server-port": 53001</command>
  1572. </simpara></listitem>
  1573. <listitem><simpara>
  1574. <command>"sender-ip": ""</command>
  1575. </simpara></listitem>
  1576. <listitem><simpara>
  1577. <command>"sender-port": 0</command>
  1578. </simpara></listitem>
  1579. <listitem><simpara>
  1580. <command>"max-queue-size": 1024</command>
  1581. </simpara></listitem>
  1582. <listitem><simpara>
  1583. <command>"ncr-protocol": "UDP"</command>
  1584. </simpara></listitem>
  1585. <listitem><simpara>
  1586. <command>"ncr-format": "JSON"</command>
  1587. </simpara></listitem>
  1588. <listitem><simpara>
  1589. <command>"override-no-update": false</command>
  1590. </simpara></listitem>
  1591. <listitem><simpara>
  1592. <command>"override-client-update": false</command>
  1593. </simpara></listitem>
  1594. <listitem><simpara>
  1595. <command>"replace-client-name": false</command>
  1596. </simpara></listitem>
  1597. <listitem><simpara>
  1598. <command>"generated-prefix": "myhost"</command>
  1599. </simpara></listitem>
  1600. </itemizedlist>
  1601. </para>
  1602. <section id="dhcpv6-d2-io-config">
  1603. <title>DHCP-DDNS Server Connectivity</title>
  1604. <para>
  1605. In order for NCRs to reach the D2 server, kea-dhcp6 must be able
  1606. to communicate with it. kea-dhcp6 uses the following configuration
  1607. parameters to control how it communications with D2:
  1608. <itemizedlist>
  1609. <listitem><simpara>
  1610. <command>enable-updates</command> - determines whether or not kea-dhcp6 will
  1611. generate NCRs. If missing, this value is assumed to be false hence DDNS updates
  1612. are disabled. To enable DDNS updates set this value to true:
  1613. </simpara></listitem>
  1614. <listitem><simpara>
  1615. <command>server-ip</command> - IP address on which D2 listens for requests. The default is
  1616. the local loopback interface at address 127.0.0.1. You may specify
  1617. either an IPv4 or IPv6 address.
  1618. </simpara></listitem>
  1619. <listitem><simpara>
  1620. <command>server-port</command> - port on which D2 listens for requests. The default value
  1621. is 53001.
  1622. </simpara></listitem>
  1623. <listitem><simpara>
  1624. <command>sender-ip</command> - IP address which kea-dhcp6 should use to send requests to D2.
  1625. The default value is blank which instructs kea-dhcp6 to select a suitable
  1626. address.
  1627. </simpara></listitem>
  1628. <listitem><simpara>
  1629. <command>sender-port</command> - port which kea-dhcp6 should use to send requests to D2. The
  1630. default value of 0 instructs kea-dhcp6 to select a suitable port.
  1631. </simpara></listitem>
  1632. <listitem><simpara>
  1633. <command>max-queue-size</command> - maximum number of requests allowed to queue waiting to
  1634. be sent to D2. This value guards against requests accumulating
  1635. uncontrollably if they are being generated faster than they can be
  1636. delivered. If the number of requests queued for transmission reaches
  1637. this value, DDNS updating will be turned off until the queue backlog has
  1638. been sufficiently reduced. The intent is to allow kea-dhcp6 to
  1639. continue lease operations. The default value is 1024.
  1640. </simpara></listitem>
  1641. <listitem><simpara>
  1642. <command>ncr-protocol</command> - Socket protocol use when sending requests to D2. Currently
  1643. only UDP is supported. TCP may be available in an upcoming release.
  1644. </simpara></listitem>
  1645. <listitem><simpara>
  1646. <command>ncr-format</command> - Packet format to use when sending requests to D2.
  1647. Currently only JSON format is supported. Other formats may be available
  1648. in future releases.
  1649. </simpara></listitem>
  1650. </itemizedlist>
  1651. By default, kea-dhcp-ddns is assumed to running on the same machine as kea-dhcp6, and
  1652. all of the default values mentioned above should be sufficient.
  1653. If, however, D2 has been configured to listen on a different address or
  1654. port, these values must altered accordingly. For example, if D2 has been
  1655. configured to listen on 2001:db8::5 port 900, the following commands
  1656. would be required:
  1657. <screen>
  1658. "Dhcp6": {
  1659. "dhcp-ddns": {
  1660. <userinput>"server-ip": "2001:db8::5",
  1661. "server-port": 900</userinput>,
  1662. ...
  1663. },
  1664. ...
  1665. }
  1666. </screen>
  1667. </para>
  1668. </section>
  1669. <section id="dhcpv6-d2-rules-config">
  1670. <title>When does kea-dhcp6 generate DDNS request</title>
  1671. <para>kea-dhcp6 follows the behavior prescribed for DHCP servers in
  1672. <ulink url="http://tools.ietf.org/html/rfc4704">RFC 4704</ulink>.
  1673. It is important to keep in mind that kea-dhcp6 provides the initial
  1674. decision making of when and what to update and forwards that
  1675. information to D2 in the form of NCRs. Carrying out the actual
  1676. DNS updates and dealing with such things as conflict resolution
  1677. are the purview of D2 (<xref linkend="dhcp-ddns-server"/>).</para>
  1678. <para>
  1679. This section describes when kea-dhcp6 will generate NCRs and the
  1680. configuration parameters that can be used to influence this decision.
  1681. It assumes that the "enable-updates" parameter is true.
  1682. </para>
  1683. <note>
  1684. <para>
  1685. Currently the interface between kea-dhcp6 and D2 only supports requests
  1686. which update DNS entries for a single IP address. If a lease grants
  1687. more than one address, kea-dhcp6 will create the DDNS update request for
  1688. only the first of these addresses. Support for multiple address
  1689. mappings may be provided in a future release.
  1690. </para>
  1691. </note>
  1692. <para>
  1693. In general, kea-dhcp6 will generate DDNS update requests when:
  1694. <orderedlist>
  1695. <listitem><para>
  1696. A new lease is granted in response to a DHCP REQUEST
  1697. </para></listitem>
  1698. <listitem><para>
  1699. An existing lease is renewed but the FQDN associated with it has
  1700. changed.
  1701. </para></listitem>
  1702. <listitem><para>
  1703. An existing lease is released in response to a DHCP RELEASE
  1704. </para></listitem>
  1705. </orderedlist>
  1706. In the second case, lease renewal, two DDNS requests will be issued: one
  1707. request to remove entries for the previous FQDN and a second request to
  1708. add entries for the new FQDN. In the last case, a lease release, a
  1709. single DDNS request to remove its entries will be made. The decision
  1710. making involved when granting a new lease is more involved and is
  1711. discussed next.
  1712. </para>
  1713. <para>
  1714. kea-dhcp6 will generate a DDNS update request only if the DHCP REQUEST
  1715. contains the FQDN option (code 39). By default kea-dhcp6 will
  1716. respect the FQDN N and S flags specified by the client as shown in the
  1717. following table:
  1718. </para>
  1719. <table id="dhcp6-fqdn-flag-table">
  1720. <title>Default FQDN Flag Behavior</title>
  1721. <tgroup cols='4' align='left'>
  1722. <colspec colname='cflags'/>
  1723. <colspec colname='meaning'/>
  1724. <colspec colname='response'/>
  1725. <colspec colname='sflags'/>
  1726. <thead>
  1727. <row>
  1728. <entry>Client Flags:N-S</entry>
  1729. <entry>Client Intent</entry>
  1730. <entry>Server Response</entry>
  1731. <entry>Server Flags:N-S-O</entry>
  1732. </row>
  1733. </thead>
  1734. <tbody>
  1735. <row>
  1736. <entry>0-0</entry>
  1737. <entry>
  1738. Client wants to do forward updates, server should do reverse updates
  1739. </entry>
  1740. <entry>Server generates reverse-only request</entry>
  1741. <entry>1-0-0</entry>
  1742. </row>
  1743. <row>
  1744. <entry>0-1</entry>
  1745. <entry>Server should do both forward and reverse updates</entry>
  1746. <entry>Server generates request to update both directions</entry>
  1747. <entry>0-1-0</entry>
  1748. </row>
  1749. <row>
  1750. <entry>1-0</entry>
  1751. <entry>Client wants no updates done</entry>
  1752. <entry>Server does not generate a request</entry>
  1753. <entry>1-0-0</entry>
  1754. </row>
  1755. </tbody>
  1756. </tgroup>
  1757. </table>
  1758. <para>
  1759. The first row in the table above represents "client delegation". Here
  1760. the DHCP client states that it intends to do the forward DNS updates and
  1761. the server should do the reverse updates. By default, kea-dhcp6 will honor
  1762. the client's wishes and generate a DDNS request to D2 to update only
  1763. reverse DNS data. The parameter, "override-client-update", can be used
  1764. to instruct the server to override client delegation requests. When
  1765. this parameter is true, kea-dhcp6 will disregard requests for client
  1766. delegation and generate a DDNS request to update both forward and
  1767. reverse DNS data. In this case, the N-S-O flags in the server's
  1768. response to the client will be 0-1-1 respectively.
  1769. </para>
  1770. <para>
  1771. (Note that the flag combination N=1, S=1 is prohibited according to
  1772. RFC 4702. If such a combination is received from the client, the packet
  1773. will be dropped by kea-dhcp6.)
  1774. </para>
  1775. <para>
  1776. To override client delegation, issue the following commands:
  1777. </para>
  1778. <screen>
  1779. "Dhcp6": {
  1780. "dhcp-ddns": {
  1781. <userinput>"override-client-update": true</userinput>,
  1782. ...
  1783. },
  1784. ...
  1785. }
  1786. </screen>
  1787. <para>
  1788. The third row in the table above describes the case in which the client
  1789. requests that no DNS updates be done. The parameter, "override-no-update",
  1790. can be used to instruct the server to disregard the client's wishes. When
  1791. this parameter is true, kea-dhcp6 will generate DDNS update requests to
  1792. kea-dhcp-ddns even if the client requests no updates be done. The N-S-O
  1793. flags in the server's response to the client will be 0-1-1.
  1794. </para>
  1795. <para>
  1796. To override client delegation, issue the following commands:
  1797. </para>
  1798. <screen>
  1799. "Dhcp6": {
  1800. "dhcp-ddns": {
  1801. <userinput>"override-no-update": true</userinput>,
  1802. ...
  1803. },
  1804. ...
  1805. }
  1806. </screen>
  1807. </section>
  1808. <section id="dhcpv6-fqdn-name-generation">
  1809. <title>kea-dhcp6 name generation for DDNS update requests</title>
  1810. <para>Each NameChangeRequest must of course include the fully qualified domain
  1811. name whose DNS entries are to be affected. kea-dhcp6 can be configured to
  1812. supply a portion or all of that name based upon what it receives from
  1813. the client in the DHCP REQUEST.</para>
  1814. <para>The rules for determining the FQDN option are as follows:
  1815. <orderedlist>
  1816. <listitem><para>
  1817. If configured to do so ignore the REQUEST contents and generate a
  1818. FQDN using a configurable prefix and suffix.
  1819. </para></listitem>
  1820. <listitem><para>
  1821. Otherwise, using the domain name value from the client FQDN option as
  1822. the candidate name:
  1823. <orderedlist>
  1824. <listitem><para>
  1825. If the candidate name is a fully qualified domain name then use it.
  1826. </para></listitem>
  1827. <listitem><para>
  1828. If the candidate name is a partial (i.e. unqualified) name then
  1829. add a configurable suffix to the name and use the result as the FQDN.
  1830. </para></listitem>
  1831. <listitem><para>
  1832. If the candidate name is a empty then generate a FQDN using a
  1833. configurable prefix and suffix.
  1834. </para></listitem>
  1835. </orderedlist>
  1836. </para></listitem>
  1837. </orderedlist>
  1838. To instruct kea-dhcp6 to always generate a FQDN, set the parameter
  1839. "replace-client-name" to true:
  1840. </para>
  1841. <screen>
  1842. "Dhcp6": {
  1843. "dhcp-ddns": {
  1844. <userinput>"replace-client-name": true</userinput>,
  1845. ...
  1846. },
  1847. ...
  1848. }
  1849. </screen>
  1850. <para>
  1851. The prefix used when generating a FQDN is specified by the
  1852. "generated-prefix" parameter. The default value is "myhost". To alter
  1853. its value, simply set it to the desired string:
  1854. </para>
  1855. <screen>
  1856. "Dhcp6": {
  1857. "dhcp-ddns": {
  1858. <userinput>"generated-prefix": "another.host"</userinput>,
  1859. ...
  1860. },
  1861. ...
  1862. }
  1863. </screen>
  1864. <para>
  1865. The suffix used when generating a FQDN or when qualifying a
  1866. partial name is specified by
  1867. the <command>qualifying-suffix</command> parameter. This
  1868. parameter has no default value, thus it is mandatory when
  1869. DDNS updates are enabled.
  1870. To set its value simply set it to the desired string:
  1871. </para>
  1872. <screen>
  1873. "Dhcp6": {
  1874. "dhcp-ddns": {
  1875. <userinput>"qualifying-suffix": "foo.example.org"</userinput>,
  1876. ...
  1877. },
  1878. ...
  1879. }
  1880. </screen>
  1881. </section>
  1882. <para>
  1883. When qualifying a partial name, kea-dhcp6 will construct a name with the
  1884. format:
  1885. </para>
  1886. <para>
  1887. [candidate-name].[qualifying-suffix].
  1888. </para>
  1889. <para>
  1890. where candidate-name is the partial name supplied in the REQUEST.
  1891. For example, if FQDN domain name value was "some-computer" and
  1892. qualifying-suffix "example.com", the generated FQDN would be:
  1893. </para>
  1894. <para>
  1895. some-computer.example.com.
  1896. </para>
  1897. <para>
  1898. When generating the entire name, kea-dhcp6 will construct name of the
  1899. format:
  1900. </para>
  1901. <para>
  1902. [generated-prefix]-[address-text].[qualifying-suffix].
  1903. </para>
  1904. <para>
  1905. where address-text is simply the lease IP address converted to a
  1906. hyphenated string. For example, if lease address is 3001:1::70E,
  1907. the qualifying suffix "example.com", and the default value is used for
  1908. <command>generated-prefix</command>, the generated FQDN would be:
  1909. </para>
  1910. <para>
  1911. myhost-3001-1--70E.example.com.
  1912. </para>
  1913. </section>
  1914. </section>
  1915. <!-- Host reservation is a large topic. There will be many subsections,
  1916. so it should be a section on its own. -->
  1917. <section id="host-reservation-v6">
  1918. <title>Host reservation in DHCPv6</title>
  1919. <para>There are many cases where it is useful to provide a configuration on
  1920. a per host basis. The most obvious one is to reserve specific, static IPv6
  1921. address or/and prefix for exclusive use by a given client (host) &dash; returning
  1922. client will get the same address or/and prefix every time and other clients will
  1923. never get that address. Note that there may be cases when the
  1924. new reservation has been made for the client for the address or prefix being
  1925. currently in use by another client. We call this situation a "conflict". The
  1926. conflicts get resolved automatically over time as described in the subsequent
  1927. sections. Once conflict is resolved, the client will keep receiving the reserved
  1928. configuration when it renews.</para>
  1929. <para>Another example when the host reservations are applicable is when a host
  1930. that has specific requirements, e.g. a printer that needs additional DHCP options
  1931. or a cable modem needs specific parameters. Yet another possible use case for
  1932. host reservation is to define unique names for hosts. Although not all of
  1933. the presented use cases are are implemented yet, Kea software will support them
  1934. in the near future.</para>
  1935. <para>Hosts reservations are defined as parameters for each subnet. Each host
  1936. can be identified by either DUID or its hardware/MAC address. See
  1937. <xref linkend="mac-in-dhcpv6"/> for details. There is an optional
  1938. <command>reservations</command> array in the
  1939. <command>Subnet6</command> structure. Each element in that array
  1940. is a structure, that holds information about a single host. In
  1941. particular, such a structure has to have an indentifer that
  1942. uniquely identifies a host. In DHCPv6 context, such an identifier
  1943. is a hardware (MAC) address or a DUID. Also, either one or more
  1944. addresses or prefixes should be specified. It is possible to
  1945. specify a hostname. Additional capabilities are planned.</para>
  1946. <para>The following example shows how to reserve addresses and prefixes
  1947. for specific hosts:
  1948. <screen>
  1949. "subnet6": [
  1950. {
  1951. "subnet": "2001:db8:1::/48",
  1952. "pools": [ { "pool": "2001:db8:1::/80" } ],
  1953. "pd-pools": [
  1954. {
  1955. "prefix": "2001:db8:1:8000::",
  1956. "prefix-len": 56,
  1957. "delegated-len": 64
  1958. }
  1959. ],
  1960. <userinput>"reservations": [
  1961. {
  1962. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  1963. "ip-addresses": [ "2001:db8:1::100" ]
  1964. },
  1965. {
  1966. "hw-address": "00:01:02:03:04:05",
  1967. "ip-addresses": [ "2001:db8:1::101" ]
  1968. },
  1969. {
  1970. "duid": "01:02:03:04:05:06:07:08:09:0A",
  1971. "ip-addresses": [ "2001:db8:1::102" ],
  1972. "prefixes": [ "2001:db8:2:abcd::/64" ],
  1973. "hostname": "foo.example.com"
  1974. }
  1975. ]</userinput>
  1976. }
  1977. ]
  1978. </screen>
  1979. This example makes 3 reservations. The first one reserves 2001:db8:1::100 address
  1980. for the client using DUID 01:02:03:04:05:0A:0B:0C:0D:0E. The second one
  1981. also reserves an address, but does so using MAC or hardware address, rather than
  1982. DUID. The third example is most advanced. It reserves an address, a prefix and
  1983. a hostname at the same time.
  1984. </para>
  1985. <para>Note that DHCPv6 allows for a single client to lease multiple addresses
  1986. and multiple prefixes at the same time. In the upcoming Kea releases, it will
  1987. be possible to have multiple addresses and prefixes reserved for a single
  1988. host. Therefore <command>ip-addresses</command> and <command>prefixes</command>
  1989. are plural and are actually arrays. As of 0.9.1 having more than one IPv6
  1990. address or prefix is only partially supported.</para>
  1991. <para>Making a reservation for a mobile host that may visit multiple subnets
  1992. requires a separate host definition in each subnet it is expected to visit.
  1993. It is not allowed to define multiple host definitions with the same hardware
  1994. address in a single subnet. It is a valid configuration, if such definitions
  1995. are specified in different subnets, though. The reservation for a given host
  1996. should include only one identifier, either DUID or hwardware address. Defining
  1997. both for the same host is considered a configuration error, but as of 0.9.1
  1998. beta, it is not rejected.
  1999. </para>
  2000. <para>Adding host reservation incurs a performance penalty. In principle,
  2001. when the server that does not support host reservation responds to a query,
  2002. it needs to check whether there is a lease for a given address being
  2003. considered for allocation or renewal. The server that also supports host
  2004. reservation, has to perform additional checks: not only if the address is
  2005. currently used (if there is a lease for it), but also whether the address
  2006. could be used by someone else (if there is a reservation for it). That
  2007. additional check incurs performance penalty.</para>
  2008. <section id="reservation6-types">
  2009. <title>Address/prefix reservation types</title>
  2010. <para>In a typical scenario there's an IPv6 subnet defined with a certain
  2011. part of it dedicated for dynamic address allocation by the DHCPv6
  2012. server. There may be an additional address space defined for prefix
  2013. delegation. Those dynamic parts are referred to as dynamic pools, address
  2014. and prefix pools or simply pools. In principle, the host reservation can
  2015. reserve any address or prefix that belongs to the subnet. The reservations
  2016. that specify an address that belongs to configured pools are called
  2017. <command>in-pool reservations</command>. In contrast, those that do not
  2018. belong to dynamic pools are called <command>out-of-pool
  2019. reservations</command>. There is no formal difference in the reservation
  2020. syntax. As of 0.9.1, both reservation types are handled
  2021. uniformly. However, upcoming releases may offer improved performance if
  2022. there are only out-of-pool reservations as the server will be able to skip
  2023. reservation checks when dealing with existing leases. Therefore, system
  2024. administrators are encouraged to use out-of-pool reservations, if
  2025. possible.</para>
  2026. </section>
  2027. <section id="reservation6-conflict">
  2028. <title>Conflicts in DHCPv6 reservations</title>
  2029. <para>As reservations and lease information are stored in different places,
  2030. conflicts may arrise. Consider the following series of events. The server
  2031. has configured the dynamic pool of addresses from the range of 2001:db8::10
  2032. to 2001:db8::20. Host A requests an address and gets 2001:db8::10. Now the
  2033. system administrator decides to reserve an address for host B. He decides
  2034. to reserve 2001:db8::10 for that purpose. In general, reserving an address
  2035. that is currently assigned to someone else is not recommended, but there
  2036. are valid use cases where such an operation is warranted.</para>
  2037. <para>The server now has a conflict to resolve. Let's analyze the
  2038. situation here. If host B boots up and request an address, the server is
  2039. not able to assign the reserved address 2001:db8::10. A naive approach
  2040. would to be immediately remove the lease for host A and create a new one
  2041. for host B. That would not solve the problem, though, because as soon as
  2042. host B get the address, it will detect that the address is already in use
  2043. by someone else (host A) and would send Decline. Therefore in this
  2044. situation, the server has to temporarily assign a different address from the
  2045. dynamic pool (not matching what has been reserved) to host B.</para>
  2046. <para>When the host A renews its address, the server will discover that
  2047. the address being renewed is now reserved for someone else (host
  2048. B). Therefore the server will remove the lease for 2001:db8::10 and select
  2049. a new address and will create a new lease for it. It will send two
  2050. addresses in its response: the old address with lifetimes set to 0 to
  2051. explicitly indicate that it is no longer valid and a new address with
  2052. non-zero lifetimes. When the host B renews its temporarily assigned
  2053. address, the server will detect that the existing lease does not match
  2054. reservation, so it will release the current address host B has and will
  2055. create a new lease matching the reservation. Similar as before, the server
  2056. will send two addresses: the temporarily assigned one with zeroed
  2057. lifetimes, and the new one that matches reservation with proper lifetimes
  2058. set.</para>
  2059. <para>This recovery will succeed, even if other hosts will attempt to get
  2060. the reserved address. Had the host C requested address 2001:db8::10 after
  2061. the reservation was made, the server will propose a different address.</para>
  2062. <para>This recovery mechanism allows the server to fully recover from a
  2063. case where reservations conflict with existing leases. This procedure
  2064. takes time and will roughly take as long as renew-timer value specified.
  2065. The best way to avoid such recovery is to not define new reservations that
  2066. conflict with existing leases. Another recommendation is to use
  2067. out-of-pool reservations. If the reserved address does not belong to a
  2068. pool, there is no way that other clients could get this address (note that
  2069. having multiple reservations for the same address is not allowed).
  2070. </para>
  2071. </section>
  2072. <section id="reservation6-hostname">
  2073. <title>Reserving a hostname</title>
  2074. <para>When the reservation for the client includes the <command>hostname
  2075. </command>, the server will assign this hostname to the client and send
  2076. it back in the Client FQDN, if the client sent the FQDN option to the
  2077. the server. The reserved hostname always takes precedence over the hostname
  2078. supplied by the client (via the FQDN option) or the autogenerated
  2079. (from the IPv6 address) hostname.</para>
  2080. <para>The server qualifies the reserved hostname with the value
  2081. of the <command>qualifying-suffix</command> parameter. For example, the
  2082. following subnet configuration:
  2083. <screen>
  2084. "subnet6": [
  2085. {
  2086. "subnet": "2001:db8:1::/48",
  2087. "pools": [ { "pool": "2001:db8:1::/80" } ],
  2088. "reservations": [
  2089. {
  2090. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  2091. "ip-addresses": [ "2001:db8:1::100" ]
  2092. "hostname": "alice-laptop"
  2093. }
  2094. ]
  2095. }
  2096. ],
  2097. "dhcp-ddns": {
  2098. "enable-updates": true,
  2099. "qualifying-suffix": "example.isc.org."
  2100. }
  2101. </screen>
  2102. will result in assigning the "alice-laptop.example.isc.org." hostname to the
  2103. client using the DUID "01:02:03:04:05:0A:0B:0C:0D:0E". If the <command>qualifying-suffix
  2104. </command> is not specified, the default (empty) value will be used, and
  2105. in this case the value specified as a <command>hostname</command> will
  2106. be treated as fully qualified name. Thus, by leaving the
  2107. <command>qualifying-suffix</command> empty it is possible to qualify
  2108. hostnames for the different clients with different domain names:
  2109. <screen>
  2110. "subnet6": [
  2111. {
  2112. "subnet": "2001:db8:1::/48",
  2113. "pools": [ { "pool": "2001:db8:1::/80" } ],
  2114. "reservations": [
  2115. {
  2116. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  2117. "ip-addresses": [ "2001:db8:1::100" ]
  2118. "hostname": "mark-desktop.example.org."
  2119. }
  2120. ]
  2121. }
  2122. ],
  2123. "dhcp-ddns": {
  2124. "enable-updates": true,
  2125. }
  2126. </screen>
  2127. will result in assigning the "mark-desktop.example.org." hostname to the
  2128. client using the DUID "01:02:03:04:05:0A:0B:0C:0D:0E".
  2129. </para>
  2130. </section>
  2131. <section id="reservation6-options">
  2132. <title>Reserving specific options</title>
  2133. <!-- @todo: replace this with the actual text once #3573 is implemented -->
  2134. <para>Currently it is not possible to specify options in host
  2135. reservation. Such a feature will be added in the upcoming Kea
  2136. releases.</para>
  2137. </section>
  2138. <section id="reservation6-mode">
  2139. <title>Fine Tuning IPv6 Host Reservation</title>
  2140. <note>
  2141. <para><command>reservation-mode</command> in the DHCPv6 server is
  2142. implemented in Kea 0.9.1 beta, but has not been tested and is
  2143. considered experimental.</para>
  2144. </note>
  2145. <para>Host reservation capability introduces additional restrictions for the
  2146. allocation engine during lease selection and renewal. In particular, three
  2147. major checks are necessary. First, when selecting a new lease, it is not
  2148. sufficient for a candidate lease to be not used by another DHCP client. It
  2149. also must not be reserved for another client. Second, when renewing a lease,
  2150. additional check must be performed whether the address being renewed is not
  2151. reserved for another client. Finally, when a host renews an address or a
  2152. prefix, the server has to check whether there's a reservation for this host,
  2153. so the existing (dynamically allocated) address should be revoked and the
  2154. reserved one be used instead.</para>
  2155. <para>Some of those checks may be unnecessary in certain deployments. Not
  2156. performing them may improve performance. The Kea server provides the
  2157. <command>reservation-mode</command> configuration parameter to select the
  2158. types of reservations allowed for the particular subnet. Each reservation
  2159. type has different constraints for the checks to be performed by the
  2160. server when allocating or renewing a lease for the client.
  2161. Allowed values are:
  2162. <itemizedlist>
  2163. <listitem><simpara> <command>all</command> - enables all host reservation
  2164. types. This is the default value. This setting is the safest and the most
  2165. flexible. It allows in-pool and out-of-pool reservations. As all checks
  2166. are conducted, it is also the slowest.
  2167. </simpara></listitem>
  2168. <listitem><simpara> <command>out-of-pool</command> - allows only out of
  2169. pool host reservations. With this setting in place, the server may assume
  2170. that all host reservations are for addresses that do not belong to the
  2171. dynamic pool. Therefore it can skip the reservation checks when dealing
  2172. with in-pool addresses, thus improving performance. Do not use this mode
  2173. if any of your reservations use in-pool address. Caution is advised when
  2174. using this setting. Kea 0.9.1 does not sanity check the reservations against
  2175. <command>reservation-mode</command>. Misconfiguration may cause problems.
  2176. </simpara></listitem>
  2177. <listitem><simpara>
  2178. <command>disabled</command> - host reservation support is disabled. As there
  2179. are no reservations, the server will skip all checks. Any reservations defined
  2180. will be completely ignored. As the checks are skipped, the server may
  2181. operate faster in this mode.
  2182. </simpara></listitem>
  2183. </itemizedlist>
  2184. </para>
  2185. <para>
  2186. An example configuration that disables reservation looks like follows:
  2187. <screen>
  2188. "Dhcp6": {
  2189. "subnet6": [
  2190. {
  2191. "subnet": "2001:db8:1::/64",
  2192. <userinput>"reservation-mode": "disabled"</userinput>,
  2193. ...
  2194. }
  2195. ]
  2196. }
  2197. </screen>
  2198. </para>
  2199. </section>
  2200. <!-- @todo: add support for per IA reservation (that specifies IAID in
  2201. the ip-addresses and prefixes) -->
  2202. </section>
  2203. <!-- end of host reservations section -->
  2204. <section id="dhcp6-serverid">
  2205. <title>Server Identifier in DHCPv6</title>
  2206. <para>The DHCPv6 protocol uses a "server identifier" (also known
  2207. as a DUID) for clients to be able to discriminate between several
  2208. servers present on the same link. There are several types of
  2209. DUIDs defined, but <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink> instructs servers to use DUID-LLT if
  2210. possible. This format consists of a link-layer (MAC) address and a
  2211. timestamp. When started for the first time, the DHCPv6 server will
  2212. automatically generate such a DUID and store the chosen value to
  2213. a file. That file is read by the server
  2214. and the contained value used whenever the server is subsequently started.
  2215. </para>
  2216. <para>
  2217. It is unlikely that this parameter should ever need to be changed.
  2218. However, if such a need arises, stop the server, edit the file and restart
  2219. the server. (The file is named kea-dhcp6-serverid and by default is
  2220. stored in the "var" subdirectory of the directory in which Kea is installed.
  2221. This can be changed when Kea is built by using "--localstatedir"
  2222. on the "configure" command line.) The file is a text file that contains
  2223. double digit hexadecimal values
  2224. separated by colons. This format is similar to typical MAC address
  2225. format. Spaces are ignored. No extra characters are allowed in this
  2226. file.
  2227. </para>
  2228. </section>
  2229. <section id="stateless-dhcp6">
  2230. <title>Stateless DHCPv6 (Information-Request Message)</title>
  2231. <para>Typically DHCPv6 is used to assign both addresses and options. These
  2232. assignments (leases) have state that changes over time, hence
  2233. their name, stateful. DHCPv6 also supports a stateless mode,
  2234. where clients request configuration options only. This mode is
  2235. considered lightweight from the server perspective, as it does not require
  2236. any state tracking; hence its name.</para>
  2237. <para>The Kea server supports stateless mode. Clients can send
  2238. Information-Request messages and the server will send back
  2239. answers with the requested options (providing the options are
  2240. available in the server configuration). The server will attempt to
  2241. use per-subnet options first. If that fails - for whatever reason - it
  2242. will then try to provide options defined in the global scope.</para>
  2243. <para>Stateless and stateful mode can be used together. No special
  2244. configuration directives are required to handle this. Simply use the
  2245. configuration for stateful clients and the stateless clients will get
  2246. just options they requested.</para>
  2247. <para>This usage of global options allows for an interesting case.
  2248. It is possible to run a server that provides just options and no
  2249. addresses or prefixes. If the options have the same value in each
  2250. subnet, the configuration can define required options in the global
  2251. scope and skip subnet definitions altogether. Here's a simple example of
  2252. such a configuration:
  2253. <screen>
  2254. "Dhcp6": {
  2255. "interfaces-config": {
  2256. "interfaces": [ "ethX" ]
  2257. },
  2258. <userinput>"option-data": [ {
  2259. "name": "dns-servers",
  2260. "data": "2001:db8::1, 2001:db8::2"
  2261. } ]</userinput>,
  2262. "lease-database": { "type": "memfile" }
  2263. }
  2264. </screen>
  2265. This very simple configuration will provide DNS server information
  2266. to all clients in the network, regardless of their location. Note the
  2267. specification of the memfile lease database: this is required since,
  2268. as of version 0.9.1, Kea requires a lease database to be specified
  2269. even if it is not used.</para>
  2270. </section>
  2271. <section id="dhcp6-rfc7550">
  2272. <title>Support for RFC 7550</title>
  2273. <para>The <ulink url="http://tools.ietf.org/html/rfc7550">RFC 7550</ulink>
  2274. has introduced some changes to the DHCPv6 protocol to resolve a few issues
  2275. with the coexistence of multiple stateful options in the messages sent
  2276. between the clients and servers.</para>
  2277. <para>The typical example is when the client, such as a requesting
  2278. router, requests an allocation of both addresses and prefixes when
  2279. it performs the 4-way (SARR) exchange with the server. If the
  2280. server is not configured to allocate any prefixes but it can allocate
  2281. some addresses, it will respond with the IA_NA(s) containing allocated
  2282. addresses and the IA_PD(s) containing the NoPrefixAvail status code. If
  2283. the client can operate without prefixes it may transition to the
  2284. 'bound' state when it sends Renew/Rebind messages to the server,
  2285. according to the T1 and T2 times, to extend the lifetimes of the
  2286. allocated addresses. If the client is still interested in obtaining
  2287. prefixes from the server it may also include IA_PD in the Renew/Rebind
  2288. to request allocation of the prefixes. If the server still cannot
  2289. allocate the prefixes, it will respond with the IA_PD(s) containing
  2290. NoPrefixAvail status code. However, if the server can now allocate
  2291. the prefixes it will do so, and send them in the IA_PD(s) to the client.
  2292. Allocation of leases during the Renew/Rebind was not supported in the
  2293. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>
  2294. and <ulink url="http://tools.ietf.org/html/rfc3633">RFC 3633</ulink>,
  2295. and has been introduced in
  2296. <ulink url="http://tools.ietf.org/html/rfc7550">RFC 7550</ulink>.
  2297. Kea supports this new behavior and it doesn't provide any configuration
  2298. mechanisms to disable it.
  2299. </para>
  2300. <para>
  2301. The following are the other behaviors specified in the
  2302. <ulink url="http://tools.ietf.org/html/rfc7550">RFC 7550</ulink>
  2303. supported by the Kea DHCPv6 server:
  2304. <itemizedlist>
  2305. <listitem><simpara>set T1/T2 timers to the same value for all
  2306. stateful (IA_NA and IA_PD) options to facilitate renewal of all
  2307. client's leases at the same time (in a single message exchange),
  2308. </simpara></listitem>
  2309. <listitem><simpara>NoAddrsAvail and NoPrefixAvail status codes
  2310. are placed in the IA_NA and IA_PD options in the Advertise message,
  2311. rather than as the top level options.</simpara></listitem>
  2312. </itemizedlist>
  2313. </para>
  2314. </section>
  2315. <section id="dhcp6-relay-override">
  2316. <title>Using specific relay agent for a subnet</title>
  2317. <para>
  2318. The relay has to have an interface connected to the link on which
  2319. the clients are being configured. Typically the relay has a global IPv6
  2320. address configured on the interface that belongs to the subnet from which
  2321. the server will assign addresses. In the typical case, the
  2322. server is able to use the IPv6 address inserted by the relay (in the link-addr
  2323. field in RELAY-FORW message) to select the appropriate subnet.
  2324. </para>
  2325. <para>
  2326. However, that is not always the case. The relay
  2327. address may not match the subnet in certain deployments. This
  2328. usually means that there is more than one subnet allocated for a given
  2329. link. The two most common examples where this is the case are long lasting
  2330. network renumbering (where both old and new address space is still being
  2331. used) and a cable network. In a cable network both cable modems and the
  2332. devices behind them are physically connected to the same link, yet
  2333. they use distinct addressing. In such case, the DHCPv6 server needs
  2334. additional information (like the value of interface-id option or IPv6
  2335. address inserted in the link-addr field in RELAY-FORW message) to
  2336. properly select an appropriate subnet.
  2337. </para>
  2338. <para>
  2339. The following example assumes that there is a subnet 2001:db8:1::/64
  2340. that is accessible via relay that uses 3000::1 as its IPv6 address.
  2341. The server will be able to select this subnet for any incoming packets
  2342. that came from a relay that has an address in 2001:db8:1::/64 subnet.
  2343. It will also select that subnet for a relay with address 3000::1.
  2344. <screen>
  2345. "Dhcp6": {
  2346. "subnet6": [
  2347. {
  2348. "subnet": "2001:db8:1::/64",
  2349. "pools": [
  2350. {
  2351. "pool": "2001:db8:1::1-2001:db8:1::ffff"
  2352. }
  2353. ],
  2354. <userinput>"relay": {
  2355. "ip-address": "3000::1"
  2356. }</userinput>
  2357. }
  2358. ]
  2359. }
  2360. </screen>
  2361. </para>
  2362. </section>
  2363. <section id="dhcp6-client-class-relay">
  2364. <title>Segregating IPv6 clients in a cable network</title>
  2365. <para>
  2366. In certain cases, it is useful to mix relay address information,
  2367. introduced in <xref linkend="dhcp6-relay-override"/> with client
  2368. classification, explained in <xref linkend="dhcp6-subnet-class"/>.
  2369. One specific example is a cable network, where typically modems
  2370. get addresses from a different subnet than all devices connected
  2371. behind them.
  2372. </para>
  2373. <para>
  2374. Let's assume that there is one CMTS (Cable Modem Termination System)
  2375. with one CM MAC (a physical link that modems are connected to).
  2376. We want the modems to get addresses from the 3000::/64 subnet,
  2377. while everything connected behind modems should get addresses from
  2378. another subnet (2001:db8:1::/64). The CMTS that acts as a relay
  2379. an uses address 3000::1. The following configuration can serve
  2380. that configuration:
  2381. <screen>
  2382. "Dhcp6": {
  2383. "subnet6": [
  2384. {
  2385. "subnet": "3000::/64",
  2386. "pools": [
  2387. { "pool": "3000::2 - 3000::ffff" }
  2388. ],
  2389. <userinput>"client-class": "VENDOR_CLASS_docsis3.0",
  2390. "relay": {
  2391. "ip-address": "3000::1"
  2392. }</userinput>
  2393. },
  2394. {
  2395. "subnet": "2001:db8:1::/64",
  2396. "pools": [
  2397. {
  2398. "pool": "2001:db8:1::1-2001:db8:1::ffff"
  2399. }
  2400. ],
  2401. <userinput>"relay": {
  2402. "ip-address": "3000::1"
  2403. }</userinput>
  2404. }
  2405. ]
  2406. }
  2407. </screen>
  2408. </para>
  2409. </section>
  2410. <section id="mac-in-dhcpv6">
  2411. <title>MAC/Hardware addresses in DHCPv6</title>
  2412. <para>MAC/hardware addesses are available in DHCPv4 messages
  2413. from the clients and administrators
  2414. frequently use that information to perform certain tasks, like per host
  2415. configuration, address reserveration for specific MAC addresses and other.
  2416. Unfortunately, DHCPv6 protocol does not provide any completely reliable way
  2417. to retrieve that information. To mitigate that issue a number of mechanisms
  2418. have been implemented in Kea that attempt to gather that information. Each
  2419. of those mechanisms works in certain cases, but may fail in other cases.
  2420. Whether the mechanism works or not in the particular deployment is
  2421. somewhat dependent on the network topology and the technologies used.</para>
  2422. <para>Kea allows for configuration which of the supported methods should be
  2423. used and in which order. This configuration may be considered a fine tuning
  2424. of the DHCP deployment. In a typical deployment the default
  2425. value of <command>"any"</command> is sufficient and there is no
  2426. need to select specific methods. Changing the value of this parameter
  2427. is the most useful in cases when an administrator wants to disable
  2428. certain method, e.g. if the administrator trusts the network infrastructure
  2429. more than the information provided by the clients themselves, the
  2430. administrator may prefer information provided by the relays over that
  2431. provided by the clients. The format of this parameter is as follows:
  2432. <screen>
  2433. "Dhcp6": {
  2434. <userinput>"mac-sources": [ "method1", "method2", "method3", ... ]</userinput>,
  2435. "subnet6": [ ... ],
  2436. ...
  2437. }
  2438. </screen>
  2439. When not specified, a special value of <emphasis>any</emphasis> is used, which
  2440. instructs the server to attempt to use all the methods in sequence and use
  2441. value returned by the first one that succeeds.</para>
  2442. <para>Supported methods are:
  2443. <itemizedlist>
  2444. <listitem>
  2445. <simpara><command>any</command> - not an actual method, just a keyword that
  2446. instructs Kea to try all other methods and use the first one that succeeds.
  2447. This is the default operation if no <command>mac-sources</command> are defined.
  2448. </simpara>
  2449. </listitem>
  2450. <listitem>
  2451. <simpara><command>raw</command> - In principle, a DHCPv6 server could use raw
  2452. sockets to receive incoming traffic and extract MAC/hardware address
  2453. information. This is currently not implemented for DHCPv6 and this value has
  2454. no effect.
  2455. </simpara>
  2456. </listitem>
  2457. <listitem>
  2458. <simpara><command>duid</command> - DHCPv6 uses DUID identifiers instead of
  2459. MAC addresses. There are currently four DUID types defined, with two of them
  2460. (DUID-LLT, which is the default one and DUID-LL) convey MAC address information.
  2461. Although RFC3315 forbids it, it is possible to parse those DUIDs and extract
  2462. necessary information from them. This method is not completely reliable, as
  2463. clients may use other DUID types, namely DUID-EN or DUID-UUID.
  2464. </simpara>
  2465. </listitem>
  2466. <listitem>
  2467. <simpara><command>ipv6-link-local</command> - Another possible aquisition
  2468. method comes from the source IPv6 address. In typical usage, clients are
  2469. sending their packets from IPv6 link-local addresses. There's a good chance
  2470. that those addresses are based on EUI-64, which contains MAC address. This
  2471. method is not completely reliable, as clients may use other link-local address
  2472. types. In particular, privacy extensions, defined in RFC4941, do not use
  2473. MAC addresses. Also note that successful extraction requires that the
  2474. address's u-bit must be set to 1 and its g-bit set to 0, indicating that it
  2475. is an interface identifier as per
  2476. <ulink url="http://tools.ietf.org/html/rfc2373#section-2.5.1">
  2477. RFC 2373, section 2.5.1</ulink>.
  2478. </simpara>
  2479. </listitem>
  2480. <listitem>
  2481. <simpara><command>client-link-addr-option</command> - One extension defined
  2482. to alleviate missing MAC issues is client link-layer address option, defined
  2483. in <ulink url="http://tools.ietf.org/html/rfc6939">RFC 6939</ulink>. This is
  2484. an option that is inserted by a relay and contains information about client's
  2485. MAC address. This method requires a relay agent that supports the option and
  2486. is configured to insert it. This method is useless for directly connected
  2487. clients. This parameter can also be specified as <command>rfc6939</command>,
  2488. which is an alias for <command>client-link-addr-option</command>.
  2489. </simpara>
  2490. </listitem>
  2491. <listitem>
  2492. <simpara><command>remote-id</command> - <ulink
  2493. url="http://tools.ietf.org/html/rfc4649">RFC 4649</ulink>
  2494. defines remote-id option that is inserted by a relay agent. Depending
  2495. on the relay agent configuration, the inserted option may convey client's
  2496. MAC address information. This parameter can also be specified as
  2497. <command>rfc4649</command>, which is an alias for <command>remote-id</command>.
  2498. </simpara>
  2499. </listitem>
  2500. <listitem>
  2501. <simpara><command>subscriber-id</command> - Another option
  2502. that is somewhat similar to the previous one is subscriber-id,
  2503. defined in <ulink url="http://tools.ietf.org/html/rfc4580">RFC
  2504. 4580</ulink>. It is, too, inserted by a relay agent that is
  2505. configured to insert it. This parameter can also be specified
  2506. as <command>rfc4580</command>, which is an alias for
  2507. <command>subscriber-id</command>. This method is currently not
  2508. implemented.
  2509. </simpara>
  2510. </listitem>
  2511. <listitem>
  2512. <simpara><command>docsis-cmts</command> - Yet another possible source of MAC
  2513. address information are DOCSIS options inserted by a CMTS that acts
  2514. as a DHCPv6 relay agent in cable networks. This method attempts to extract
  2515. MAC address information from suboption 1026 (cm mac) of the vendor specific option
  2516. with vendor-id=4491. This vendor option is extracted from the relay-forward message,
  2517. not the original client's message.
  2518. </simpara>
  2519. </listitem>
  2520. <listitem>
  2521. <simpara><command>docsis-modem</command> - Yet another possible source of MAC
  2522. address information are DOCSIS options inserted by the cable modem itself.
  2523. This method attempts to extract MAC address information from suboption 36 (device id)
  2524. of the vendor specific option with vendor-id=4491. This vendor option is extracted from
  2525. the original client's message, not from any relay options.
  2526. </simpara>
  2527. </listitem>
  2528. </itemizedlist>
  2529. </para>
  2530. </section>
  2531. <section id="dhcp6-decline">
  2532. <title>Duplicate Addresses (DECLINE support)</title>
  2533. <para>The DHCPv6 server is configured with a certain pool of
  2534. addresses that it is expected to hand out to the DHCPv6 clients.
  2535. It is assumed that the server is authoritative and has complete
  2536. jurisdiction over those addresses. However, due to various
  2537. reasons, such as misconfiguration or a faulty client implenetation
  2538. that retains its address beyond the valid lifetime, there may be
  2539. devices connected that use those addresses without the server's
  2540. approval or knowledge.</para>
  2541. <para>Such an unwelcome event can be detected
  2542. by legitimate clients (using Duplicate Address Detection) and
  2543. reported to the DHCPv6 server using a DECLINE message. The server
  2544. will do a sanity check (if the client declining an address really
  2545. was supposed to use it), then will a conduct clean up operation
  2546. and confirm it by sending back a REPLY message. Any DNS entries
  2547. related to that address will be removed, the fact will be logged
  2548. and hooks will be triggered. After that is done, the address
  2549. will be marked as declined (which indicates that it is used by
  2550. an unknown entity and thus not available for assignment to
  2551. anyone) and a probation time will be set on it. Unless otherwise
  2552. configured, the probation period lasts 24 hours. After that
  2553. period, the server will recover the lease, i.e. put it back into
  2554. the available state. The address will be available for assignment
  2555. again. It should be noted that if the underlying issue of a
  2556. misconfigured device is not resolved, the duplicate address
  2557. scenario will repeat. On the other hand, it provides an
  2558. opportunity to recover from such an event automatically, without
  2559. any sysadmin intervention.</para>
  2560. <para>To configure the decline probation period to a value different
  2561. than the default, the following syntax can be used:
  2562. <screen>
  2563. "Dhcp6": {
  2564. <userinput>"decline-probation-period": 3600</userinput>,
  2565. "subnet6": [ ... ],
  2566. ...
  2567. }
  2568. </screen>
  2569. The parameter is expressed in seconds, so the example above will instruct
  2570. the server to recycle declined leases after an hour.</para>
  2571. <para>There are several statistics and hook points associated with the
  2572. Decline handling procedure. The lease6_decline hook is triggered after the
  2573. incoming Decline message has been sanitized and the server is about to decline
  2574. the lease. The declined-addresses statistic is increased after the hook
  2575. returns (both global and subnet specific variants).</para>
  2576. <para>Once the probation time elapses, the declined lease is recovered
  2577. using the standard expired lease reclaimation procedure, with several
  2578. additional steps. In particular, both declined-addresses statistics
  2579. (global and subnet specific) are decreased. At the same time,
  2580. reclaimed-declined-addresses statistics (again in two variants, global and
  2581. subnet specific) are increased.</para>
  2582. <para>Note about statistics: The server does not decrease
  2583. assigned-addresses statistics when a DECLINE message is received and
  2584. processed successfully. While technically a declined address is no longer
  2585. assigned, the primary usage of the assigned-addresses statistic is to
  2586. monitor pool utilization. Most people would forget to include
  2587. declined-addresses in the calculation, and simply do
  2588. assigned-addresses/total-addresses. This would have a bias towards
  2589. under-representing pool utilization. As this has a potential for major
  2590. issues, we decided not to decrease assigned addresses immediately after
  2591. receiving Decline, but to do it later when we recover the address back to
  2592. the available pool.</para>
  2593. </section>
  2594. <section id="dhcp6-stats">
  2595. <title>Statistics in DHCPv6 server</title>
  2596. <note>
  2597. <para>This section describes DHCPv6-specific statistics. For a general
  2598. overview and usage of statistics, see <xref linkend="stats" />.</para>
  2599. </note>
  2600. <para>
  2601. The DHCPv6 server supports the following statistics:
  2602. </para>
  2603. <table frame="all" id="dhcp6-statistics">
  2604. <title>DHCPv6 Statistics</title>
  2605. <tgroup cols='3'>
  2606. <colspec colname='statistic' align='center'/>
  2607. <colspec colname='type' align='center'/>
  2608. <colspec colname='description' align='left'/>
  2609. <thead>
  2610. <row>
  2611. <entry>Statistic</entry>
  2612. <entry>Data Type</entry>
  2613. <entry>Description</entry>
  2614. </row>
  2615. </thead>
  2616. <tbody>
  2617. <row>
  2618. <entry>pkt6-received</entry>
  2619. <entry>integer</entry>
  2620. <entry>Number of DHCPv6 packets received. This includes all packets:
  2621. valid, bogus, corrupted, rejected etc. This statistic is expected
  2622. to grow rapidly.</entry>
  2623. </row>
  2624. <row>
  2625. <entry>pkt6-receive-drop</entry>
  2626. <entry>integer</entry>
  2627. <entry>Number of incoming packets that were dropped. Exact reason
  2628. for dropping packets is logged, but the most common reasons may
  2629. be: an unacceptable or not supported packet type, direct responses
  2630. are forbidden, the server-id sent by the client does not match the
  2631. server's server-id or the packet is malformed.</entry>
  2632. </row>
  2633. <row>
  2634. <entry>pkt6-parse-failed</entry>
  2635. <entry>integer</entry>
  2636. <entry>Number of incoming packets that could not be parsed.
  2637. A non-zero value of this statistic indicates that the server
  2638. received a malformed or truncated packet. This may indicate problems
  2639. in your network, faulty clients, faulty relay agents or server
  2640. code bug.</entry>
  2641. </row>
  2642. <row>
  2643. <entry>pkt6-solicit-received</entry>
  2644. <entry>integer</entry>
  2645. <entry>
  2646. Number of SOLICIT packets received. This statistic is expected
  2647. to grow. Its increase means that clients that just booted
  2648. started their configuration process and their initial packets
  2649. reached your server.
  2650. </entry>
  2651. </row>
  2652. <row>
  2653. <entry>pkt6-advertise-received</entry>
  2654. <entry>integer</entry>
  2655. <entry>
  2656. Number of ADVERTISE packets received. Advertise packets are sent
  2657. by the server and the server is never expected to receive them. A non-zero
  2658. value of this statistic indicates an error ocurring in the network.
  2659. One likely cause would be a misbehaving relay agent that incorrectly
  2660. forwards ADVERTISE messages towards the server, rather back to the
  2661. clients.
  2662. </entry>
  2663. </row>
  2664. <row>
  2665. <entry>pkt6-request-received</entry>
  2666. <entry>integer</entry>
  2667. <entry>Number of REQUEST packets received. This statistic
  2668. is expected to grow. Its increase means that clients that just booted
  2669. received the server's response (ADVERTISE), accepted it and are now
  2670. requesting an address (REQUEST).
  2671. </entry>
  2672. </row>
  2673. <row>
  2674. <entry>pkt6-reply-received</entry>
  2675. <entry>integer</entry>
  2676. <entry>Number of REPLY packets received. This statistic is
  2677. expected to remain zero at all times, as REPLY packets are sent by
  2678. the server and the server is never expected to receive
  2679. them. A non-zero value indicates an error. One likely cause would be
  2680. a misbehaving relay agent that incorrectly forwards REPLY messages
  2681. towards the server, rather back to the clients.
  2682. </entry>
  2683. </row>
  2684. <row>
  2685. <entry>pkt6-renew-received</entry>
  2686. <entry>integer</entry>
  2687. <entry>Number of RENEW packets received. This statistic
  2688. is expected to grow. Its increase means that clients received their
  2689. addresses and prefixes and are trying to renew them.
  2690. </entry>
  2691. </row>
  2692. <row>
  2693. <entry>pkt6-rebind-received</entry>
  2694. <entry>integer</entry>
  2695. <entry>Number of REBIND packets received. A non-zero value
  2696. indicates that clients didn't receive responses to their RENEW messages
  2697. (regular lease renewal mechanism) and are attempting to find any server
  2698. that is able to take over their leases. It may mean that some server's
  2699. REPLY messages never reached the clients.
  2700. </entry>
  2701. </row>
  2702. <row>
  2703. <entry>pkt6-release-received</entry>
  2704. <entry>integer</entry>
  2705. <entry>Number of RELEASE packets received. This statistic is expected
  2706. to grow when a device is being shut down in the network. It
  2707. indicates that the address or prefix assigned is reported as no longer
  2708. needed. Note that many devices, especially wireless, do not send RELEASE,
  2709. because of design choice or due to moving out of range.
  2710. </entry>
  2711. </row>
  2712. <row>
  2713. <entry>pkt6-decline-received</entry>
  2714. <entry>integer</entry>
  2715. <entry>
  2716. Number of DECLINE packets received. This statistic is expected to
  2717. remain close to zero. Its increase means that a client leased an
  2718. address, but discovered that the address is currently used by an
  2719. unknown device in your network. If this statistic is growing, it
  2720. may indicate misconfigured server or devices that have statically
  2721. assigned conflicting addresses.
  2722. </entry>
  2723. </row>
  2724. <row>
  2725. <entry>pkt6-infrequest-received</entry>
  2726. <entry>integer</entry>
  2727. <entry>
  2728. Number of INFORMATION-REQUEST packets received. This statistic
  2729. is expected to grow if there are devices that are using
  2730. stateless DHCPv6. INFORMATION-REQUEST messages are used by
  2731. clients that request stateless configuration, i.e. options
  2732. and parameters other than addresses or prefixes.
  2733. </entry>
  2734. </row>
  2735. <row>
  2736. <entry>pkt6-unknown-received</entry>
  2737. <entry>integer</entry>
  2738. <entry>Number of packets received of an unknown type. Non-zero
  2739. value of this statistic indicates that the server received a
  2740. packet that it wasn't able to recognize: either with unsupported
  2741. type or possibly malformed.</entry>
  2742. </row>
  2743. <row>
  2744. <entry>pkt6-sent</entry>
  2745. <entry>integer</entry>
  2746. <entry>Number of DHCPv6 packets sent. This statistic is expected
  2747. to grow every time the server transmits a packet. In general, it
  2748. should roughly match pkt6-received, as most incoming packets cause
  2749. the server to respond. There are exceptions (e.g. server receiving a
  2750. REQUEST with server-id matching other server), so do not worry, if
  2751. it is lesser than pkt6-received.</entry>
  2752. </row>
  2753. <row>
  2754. <entry>pkt6-advertise-sent</entry>
  2755. <entry>integer</entry>
  2756. <entry>Number of ADVERTISE packets sent. This statistic is
  2757. expected to grow in most cases after a SOLICIT is processed. There
  2758. are certain uncommon, but valid cases where incoming SOLICIT is
  2759. dropped, but in general this statistic is expected to be close to
  2760. pkt6-solicit-received.</entry>
  2761. </row>
  2762. <row>
  2763. <entry>pkt6-reply-sent</entry>
  2764. <entry>integer</entry>
  2765. <entry>Number of REPLY packets sent. This statistic is expected to
  2766. grow in most cases after a SOLICIT (with rapid-commit), REQUEST,
  2767. RENEW, REBIND, RELEASE, DECLINE or INFORMATION-REQUEST is
  2768. processed. There are certain cases where there is no response.
  2769. </entry>
  2770. </row>
  2771. <row>
  2772. <entry>subnet[id].total-nas</entry>
  2773. <entry>integer</entry>
  2774. <entry>
  2775. This statistic shows the total number of NA addresses available for
  2776. DHCPv6 management for a given subnet. In other words, this is the sum
  2777. of all addresses in all configured pools. This statistic changes only
  2778. during configuration changes. Note it does not take into account any
  2779. addresses that may be reserved due to host reservation. The
  2780. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  2781. statistic is exposed for each subnet separately. This statistic is
  2782. reset during a reconfiguration event.
  2783. </entry>
  2784. </row>
  2785. <row>
  2786. <entry>subnet[id].assigned-nas</entry>
  2787. <entry>integer</entry>
  2788. <entry>
  2789. This statistic shows the number of NA addresses in a given subnet that
  2790. are assigned. This statistic increases every time a new lease is allocated
  2791. (as a result of receiving a REQUEST message) and is decreased every time a
  2792. lease is released (a RELEASE message is received) or expires. The
  2793. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  2794. statistic is exposed for each subnet separately. This statistic is
  2795. reset during a reconfiguration event.
  2796. </entry>
  2797. </row>
  2798. <row>
  2799. <entry>subnet[id].total-pds</entry>
  2800. <entry>integer</entry>
  2801. <entry>
  2802. This statistic shows the total number of PD prefixes available for
  2803. DHCPv6 management for a given subnet. In other words, this is the sum
  2804. of all prefixes in all configured pools. This statistic changes only
  2805. during configuration changes. Note it does not take into account any
  2806. prefixes that may be reserved due to host reservation. The
  2807. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  2808. statistic is exposed for each subnet separately. This statistic is
  2809. reset during a reconfiguration event.
  2810. </entry>
  2811. </row>
  2812. <row>
  2813. <entry>subnet[id].assigned-pds</entry>
  2814. <entry>integer</entry>
  2815. <entry>
  2816. This statistic shows the number of PD prefixes in a given subnet that
  2817. are assigned. This statistic increases every time a new lease is allocated
  2818. (as a result of receiving a REQUEST message) and is decreased every time a
  2819. lease is released (a RELEASE message is received) or expires. The
  2820. <emphasis>id</emphasis> is the subnet-id of a given subnet. This statistic
  2821. is exposed for each subnet separately. This statistic is reset during a
  2822. reconfiguration event.
  2823. </entry>
  2824. </row>
  2825. <row>
  2826. <entry>declined-addresses</entry>
  2827. <entry>integer</entry>
  2828. <entry>
  2829. This statistic shows the number of IPv6 adresses that are
  2830. currently declined. This statistic counts the number of leases
  2831. currently unavailable. Once a lease is recovered, this
  2832. statistic will be decreased. Ideally, this statistic should be
  2833. zero. If this statistic is non-zero (or worse increasing),
  2834. a network administrator should investigate if there is
  2835. a misbehaving device in his network. This is a global statistic
  2836. that covers all subnets.
  2837. </entry>
  2838. </row>
  2839. <row>
  2840. <entry>subnet[id].declined-addresses</entry>
  2841. <entry>integer</entry>
  2842. <entry>
  2843. This statistic shows the number of IPv6 adresses that are
  2844. currently declined in a given subnet. This statistic counts the
  2845. number of leases currently unavailable. Once a lease is
  2846. recovered, this statistic will be decreased. Ideally, this
  2847. statistic should be zero. If this statistic is
  2848. non-zero (or worse increasing), a network administrator should
  2849. investigate if there is a misbehaving device in his network. The
  2850. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  2851. statistic is exposed for each subnet separately.
  2852. </entry>
  2853. </row>
  2854. <row>
  2855. <entry>reclaimed-declined-addresses</entry>
  2856. <entry>integer</entry>
  2857. <entry>
  2858. This statistic shows the number of IPv6 adresses that were
  2859. declined, but have now been recovered. Unlike
  2860. declined-addresses, this statistic never decreases. It can be used
  2861. as a long term indicator of how many actual valid Declines were
  2862. processed and recovered from. This is a global statistic that
  2863. covers all subnets.
  2864. </entry>
  2865. </row>
  2866. <row>
  2867. <entry>subnet[id].reclaimed-declined-addresses</entry>
  2868. <entry>integer</entry>
  2869. <entry>
  2870. This statistic shows the number of IPv6 adresses that were
  2871. declined, but have now been recovered. Unlike
  2872. declined-addresses, this statistic never decreases. It can be used
  2873. as a long term indicator of how many actual valid Declines were
  2874. processed and recovered from. The
  2875. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  2876. statistic is exposed for each subnet separately.
  2877. </entry>
  2878. </row>
  2879. </tbody>
  2880. </tgroup>
  2881. </table>
  2882. </section>
  2883. <section id="dhcp6-ctrl-channel">
  2884. <title>Management API for the DHCPv6 server</title>
  2885. <para>
  2886. Management API has been introduced in Kea 0.9.2-beta. It allows issuing specific
  2887. management commands, like statistics retrieval, reconfiguration or shutdown.
  2888. For more details, see <xref linkend="ctrl-channel" />. Currently the only
  2889. supported communication channel type is UNIX stream socket. By default there
  2890. are no sockets open. To instruct Kea to open a socket, the following entry
  2891. in the configuration file can be used:
  2892. <screen>
  2893. "Dhcp6": {
  2894. "control-socket": {
  2895. "socket-type": "unix",
  2896. "socket-name": <userinput>"/path/to/the/unix/socket"</userinput>
  2897. },
  2898. "subnet6": [
  2899. ...
  2900. ],
  2901. ...
  2902. }
  2903. </screen>
  2904. </para>
  2905. <para>
  2906. The length of the path specified by the <command>socket-name</command>
  2907. parameter is restricted by the maximum length for the unix socket name
  2908. on your operating system, i.e. the size of the <command>sun_path</command>
  2909. field in the <command>sockaddr_un</command> structure, decreased by 1.
  2910. This value varies on different operating systems between 91 and 107
  2911. characters. The typical values are 107 on Linux and 103 on FreeBSD.
  2912. </para>
  2913. <para>
  2914. Communication over control channel is conducted using JSON structures.
  2915. See the Control Channel section in the Kea Developer's Guide for more details.
  2916. </para>
  2917. <para>DHCPv6 server supports <command>statistic-get</command>,
  2918. <command>statistic-reset</command>, <command>statistic-remove</command>,
  2919. <command>statistic-get-all</command>, <command>statistic-reset-all</command>
  2920. and <command>statistic-remove-all</command>, specified in
  2921. <xref linkend="command-stats"/>. It also supports
  2922. <command>list-commands</command> and <command>shutdown</command>,
  2923. specified in <xref linkend="command-list-commands" /> and
  2924. <xref linkend="command-shutdown" />, respectively.</para>
  2925. </section>
  2926. <section id="dhcp6-std">
  2927. <title>Supported DHCPv6 Standards</title>
  2928. <para>The following standards are currently
  2929. supported:</para>
  2930. <itemizedlist>
  2931. <listitem>
  2932. <simpara><emphasis>Dynamic Host Configuration Protocol for IPv6</emphasis>,
  2933. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>:
  2934. Supported messages are SOLICIT,
  2935. ADVERTISE, REQUEST, RELEASE, RENEW, REBIND, INFORMATION-REQUEST,
  2936. CONFIRM and REPLY.</simpara>
  2937. </listitem>
  2938. <listitem>
  2939. <simpara><emphasis>IPv6 Prefix Options for
  2940. Dynamic Host Configuration Protocol (DHCP) version 6</emphasis>,
  2941. <ulink url="http://tools.ietf.org/html/rfc3633">RFC 3633</ulink>:
  2942. Supported options are IA_PD and
  2943. IA_PREFIX. Also supported is the status code NoPrefixAvail.</simpara>
  2944. </listitem>
  2945. <listitem>
  2946. <simpara><emphasis>DNS Configuration options for Dynamic Host
  2947. Configuration Protocol for IPv6 (DHCPv6)</emphasis>,
  2948. <ulink url="http://tools.ietf.org/html/rfc3646">RFC 3646</ulink>:
  2949. Supported option is DNS_SERVERS.</simpara>
  2950. </listitem>
  2951. <listitem>
  2952. <simpara><emphasis>The Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
  2953. Relay Agent Remote-ID Option</emphasis>,
  2954. <ulink url="http://tools.ietf.org/html/rfc4649">RFC 4649</ulink>:
  2955. REMOTE-ID option is supported.</simpara>
  2956. </listitem>
  2957. <listitem>
  2958. <simpara><emphasis>The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) Client
  2959. Fully Qualified Domain Name (FQDN) Option</emphasis>,
  2960. <ulink url="http://tools.ietf.org/html/rfc4704">RFC 4704</ulink>:
  2961. Supported option is CLIENT_FQDN.</simpara>
  2962. </listitem>
  2963. <listitem>
  2964. <simpara><emphasis>Relay-Supplied DHCP Options</emphasis>,
  2965. <ulink url="http://tools.ietf.org/html/rfc6422">RFC 6422</ulink>:
  2966. Full functionality is supported: OPTION_RSOO, ability of the server
  2967. to echo back the options, checks whether an option is RSOO-enabled,
  2968. ability to mark additional options as RSOO-enabled.</simpara>
  2969. </listitem>
  2970. <listitem>
  2971. <simpara><emphasis>Client Link-Layer Address Option in
  2972. DHCPv6</emphasis>,
  2973. <ulink url="http://tools.ietf.org/html/rfc6939">RFC
  2974. 6939</ulink>: Supported option is client link-layer
  2975. address option.</simpara>
  2976. </listitem>
  2977. <listitem>
  2978. <simpara><emphasis>Issues and Recommendations with Multiple
  2979. Stateful DHCPv6 Options</emphasis>,
  2980. <ulink url="http://tools.ietf.org/html/rfc7550">RFC
  2981. 7550</ulink>: All recommendations related to the DHCPv6 server
  2982. operation are supported.</simpara>
  2983. </listitem>
  2984. </itemizedlist>
  2985. </section>
  2986. <section id="dhcp6-limit">
  2987. <title>DHCPv6 Server Limitations</title>
  2988. <para> These are the current limitations and known problems
  2989. with the DHCPv6 server
  2990. software. Most of them are reflections of the early stage of
  2991. development and should be treated as <quote>not implemented
  2992. yet</quote>, rather than actual limitations.</para>
  2993. <itemizedlist>
  2994. <listitem> <!-- see tickets #3234, #3281 -->
  2995. <para>
  2996. On-line configuration has some limitations. Adding new subnets or
  2997. modifying existing ones work, as is removing the last subnet from
  2998. the list. However, removing non-last (e.g. removing subnet 1,2 or 3 if
  2999. there are 4 subnets configured) will cause issues. The problem is
  3000. caused by simplistic subnet-id assignment. The subnets are always
  3001. numbered, starting from 1. That subnet-id is then used in leases
  3002. that are stored in the lease database. Removing non-last subnet will
  3003. cause the configuration information to mismatch data in the lease
  3004. database. It is possible to manually update subnet-id fields in
  3005. MySQL or PostgreSQL database, but it is awkward and error prone
  3006. process. A better reconfiguration support is planned.
  3007. </para>
  3008. </listitem>
  3009. <listitem>
  3010. <simpara>
  3011. The server will allocate, renew or rebind a maximum of one lease
  3012. for a particular IA option (IA_NA or IA_PD) sent by a client.
  3013. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink> and
  3014. <ulink url="http://tools.ietf.org/html/rfc3633">RFC 3633</ulink> allow
  3015. for multiple addresses or prefixes to be allocated for a single IA.
  3016. </simpara>
  3017. </listitem>
  3018. <listitem>
  3019. <simpara>Temporary addresses are not supported.</simpara>
  3020. </listitem>
  3021. <listitem>
  3022. <simpara>
  3023. Duplication report (DECLINE) and client reconfiguration (RECONFIGURE) are
  3024. not yet supported.
  3025. </simpara>
  3026. </listitem>
  3027. </itemizedlist>
  3028. </section>
  3029. <!--
  3030. <section id="dhcp6-srv-examples">
  3031. <title>Kea DHCPv6 server examples</title>
  3032. <para>
  3033. This section provides easy to use example. Each example can be read
  3034. separately. It is not intended to be read sequentially as there will
  3035. be many repetitions between examples. They are expected to serve as
  3036. easy to use copy-paste solutions to many common deployments.
  3037. </para>
  3038. @todo: add simple configuration for direct clients
  3039. @todo: add configuration for relayed clients
  3040. @todo: add client classification example
  3041. </section> -->
  3042. </chapter>