dhcp6-srv.xml 166 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888
  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 tree. 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 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 configuration 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 esthetic 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 four database backends available: memfile (which is the
  277. default backend), MySQL, PostgreSQL and CQL.</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>Lease Database Configuration</title>
  383. <note>
  384. <para>Lease 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>Lease database configuration is controlled through the
  390. Dhcp6/lease-database parameters. The type of the database must be set to
  391. "memfile", "mysql", "postgresql" or "cql", 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
  397. (see <xref linkend="mysql-database-create"/>,
  398. <xref linkend="pgsql-database-create"/>
  399. or <xref linkend="cql-database-create"/>).
  400. <screen>
  401. "Dhcp6": { "lease-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
  402. </screen>
  403. If the database is located on a different system than the DHCPv6 server, the
  404. database host name must also be specified (although it should be noted that this
  405. configuration may have a severe impact on server performance):
  406. <screen>
  407. "Dhcp6": { "lease-database": { <userinput>"host": <replaceable>remote-host-name</replaceable></userinput>, ... }, ... }
  408. </screen>
  409. The usual state of affairs will be to have the database on the same machine as
  410. the DHCPv6 server. In this case, set the value to the empty string:
  411. <screen>
  412. "Dhcp6": { "lease-database": { <userinput>"host" : ""</userinput>, ... }, ... }
  413. </screen>
  414. Should the database be located on a different system, you may need to specify a longer interval
  415. for the connection timeout:
  416. <screen>
  417. "Dhcp6": { "lease-database": { <userinput>"connect-timeout" : <replaceable>timeout-in-seconds</replaceable></userinput>, ... }, ... }
  418. </screen>
  419. The default value of five seconds should be more than adequate for local connections.
  420. If a timeout is given though, it should be an integer greater than zero.
  421. </para>
  422. <para>Finally, the credentials of the account under which the server will
  423. access the database should be set:
  424. <screen>
  425. "Dhcp6": { "lease-database": { <userinput>"user": "<replaceable>user-name</replaceable>"</userinput>,
  426. <userinput>"password": "<replaceable>password</replaceable>"</userinput>,
  427. ... },
  428. ... }
  429. </screen>
  430. If there is no password to the account, set the password to the empty string
  431. "". (This is also the default.)</para>
  432. </section>
  433. </section>
  434. <section id="hosts6-storage">
  435. <title>Hosts Storage</title>
  436. <para>Kea is also able to store information about host reservations in the
  437. database. Hosts database configuration uses the same syntax as lease
  438. database. In fact, Kea server opens independent connections for each
  439. purpose, be it lease or hosts information. This gives the solution most
  440. flexibility. Kea can be used to keep leases and host reservations
  441. separately, but can also point to the same database. Currently the only
  442. supported hosts database type is MySQL.</para>
  443. <para>Please note that usage of hosts storage is optional. User can define
  444. all host reservations in the configuration file. That is the recommended way
  445. if the number of reservations is small. However, with the number of
  446. reservations growing it's more convenient to use host storage. Please note
  447. that both storages (configuration file and MySQL) can be used together. If
  448. hosts are defined in both places, the definitions from configuration file
  449. are checked first and external storage is checked later, if
  450. necessary.</para>
  451. <para>All hosts leases issued by the server are stored in the hosts
  452. database. Currently there is only one available backend: MySQL. Other host
  453. backends will become available in future Kea versions.</para>
  454. <section id="hosts-database-configuration6">
  455. <title>IPv6 Hosts Database Configuration</title>
  456. <para>Hosts database configuration is controlled through the Dhcp6/hosts-database
  457. parameters. If enabled, the type of the database must be set to "mysql". Other
  458. hosts backends may be added in later Kea versions.
  459. <screen>
  460. "Dhcp6": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
  461. </screen>
  462. Next, the name of the database to hold the leases must be set: this is the
  463. name used when the lease database was created (see <xref linkend="mysql-database-create"/>).
  464. <screen>
  465. "Dhcp6": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
  466. </screen>
  467. If the database is located on a different system to the DHCPv6 server, the
  468. database host name must also be specified (although it should be noted that this
  469. configuration may have a severe impact on server performance):
  470. <screen>
  471. "Dhcp6": { "hosts-database": { <userinput>"host": <replaceable>remote-host-name</replaceable></userinput>, ... }, ... }
  472. </screen>
  473. The usual state of affairs will be to have the database on the same machine as
  474. the DHCPv6 server. In this case, set the value to the empty string:
  475. <screen>
  476. "Dhcp6": { "hosts-database": { <userinput>"host" : ""</userinput>, ... }, ... }
  477. </screen>
  478. </para>
  479. <para>Finally, the credentials of the account under which the server will
  480. access the database should be set:
  481. <screen>
  482. "Dhcp6": { "hosts-database": { <userinput>"user": "<replaceable>user-name</replaceable>"</userinput>,
  483. <userinput>"password": "<replaceable>password</replaceable>"</userinput>,
  484. ... },
  485. ... }
  486. </screen>
  487. If there is no password to the account, set the password to the empty string
  488. "". (This is also the default.)</para>
  489. </section>
  490. <section id="read-only-database-configuration6">
  491. <title>Using Read Only Databases for Host Reservations</title>
  492. <para>
  493. In some deployments the database user, which name is specified in the database backend
  494. configuration, may not have write privileges to the database. This is often
  495. required by the policy within a given network to secure the data from being
  496. unintentionally modified. In many cases administrators have inventory databases
  497. deployed, which contain substantially more information about the hosts than
  498. static reservations assigned to them. The inventory database can be used to create
  499. a view of a Kea hosts database and such view is often read only.
  500. </para>
  501. <para>
  502. Kea host database backends operate with implicit configuration to both read from
  503. and write to the database. If the host database is read only for the
  504. particular user, the backend will fail to start and consequently the server
  505. will refuse to start/reconfigure. If the administrator intends to use the
  506. read only host database for retrieving reservations for clients, to assign
  507. specific addresses and options, it is possible to explicitly configure
  508. Kea to start in "read-only" mode. This is controlled by the
  509. <command>readonly</command> boolean parameter as follows:
  510. <screen>
  511. "Dhcp4": { "hosts-database": { <userinput>"readonly": true</userinput>, ... }, ... }
  512. </screen>
  513. Setting this parameter to <userinput>false</userinput> would configure the
  514. database backend to operate in "read-write" mode, which is also a default
  515. configuration if the parameter is not specified.
  516. </para>
  517. <note><para>The <command>readonly</command> parameter is currently only supported
  518. for MySQL and PostgreSQL databases.</para></note>
  519. </section>
  520. </section>
  521. <section id="dhcp6-interface-selection">
  522. <title>Interface selection</title>
  523. <para>The DHCPv6 server has to be configured to listen on specific network
  524. interfaces. The simplest network interface configuration instructs the server to
  525. listen on all available interfaces:
  526. <screen>
  527. "Dhcp6": {
  528. "interfaces-config": {
  529. "interfaces": [ <userinput>"*"</userinput> ]
  530. }
  531. ...
  532. }
  533. </screen>
  534. The asterisk plays the role of a wildcard and means "listen on all interfaces".
  535. However, it is usually a good idea to explicitly specify interface names:
  536. <screen>
  537. "Dhcp6": {
  538. "interfaces-config": {
  539. "interfaces": [ <userinput>"eth1", "eth3"</userinput> ]
  540. },
  541. ...
  542. }
  543. </screen>
  544. </para>
  545. <para>It is possible to use wildcard interface name (asterisk) concurrently
  546. with the actual interface names:
  547. <screen>
  548. "Dhcp6": {
  549. "interfaces-config": {
  550. "interfaces": [ <userinput>"eth1", "eth3", "*"</userinput> ]
  551. },
  552. ...
  553. }
  554. </screen>
  555. It is anticipated that this will form of usage only be used where it is desired to
  556. temporarily override a list of interface names and listen on all interfaces.
  557. </para>
  558. </section>
  559. <section id="ipv6-subnet-id">
  560. <title>IPv6 Subnet Identifier</title>
  561. <para>
  562. The subnet identifier is a unique number associated with a particular subnet.
  563. In principle, it is used to associate clients' leases with respective subnets.
  564. When the subnet identifier is not specified for a subnet being configured, it will
  565. be automatically assigned by the configuration mechanism. The identifiers
  566. are assigned from 1 and are monotonically increased for each subsequent
  567. subnet: 1, 2, 3 ....
  568. </para>
  569. <para>
  570. If there are multiple subnets configured with auto-generated identifiers and
  571. one of them is removed, the subnet identifiers may be renumbered. For example:
  572. if there are four subnets and the third is removed the last subnet will be assigned
  573. the identifier that the third subnet had before removal. As a result, the leases
  574. stored in the lease database for subnet 3 are now associated with
  575. subnet 4, which may have unexpected consequences. In the future it is planned
  576. to implement a mechanism to preserve auto-generated subnet ids upon removal
  577. of one of the subnets. Currently, the only remedy for this issue is to
  578. manually specify a unique subnet identifier for each subnet.
  579. </para>
  580. <para>
  581. The following configuration will assign the specified subnet
  582. identifier to the newly configured subnet:
  583. <screen>
  584. "Dhcp6": {
  585. "subnet6": [
  586. {
  587. "subnet": "2001:db8:1::/64",
  588. <userinput>"id": 1024</userinput>,
  589. ...
  590. }
  591. ]
  592. }
  593. </screen>
  594. This identifier will not change for this subnet unless the "id" parameter is
  595. removed or set to 0. The value of 0 forces auto-generation of the subnet
  596. identifier.
  597. </para>
  598. <!-- @todo: describe whether database needs to be updated after changing
  599. id -->
  600. </section>
  601. <section id="dhcp6-unicast">
  602. <title>Unicast traffic support</title>
  603. <para>
  604. When the DHCPv6 server starts, by default it listens to the DHCP traffic
  605. sent to multicast address ff02::1:2 on each interface that it is
  606. configured to listen on (see <xref linkend="dhcp6-interface-selection"/>).
  607. In some cases it is useful to configure a server to handle incoming
  608. traffic sent to the global unicast addresses as well. The most common
  609. reason for that is to have relays send their traffic to the server
  610. directly. To configure the server to listen on a specific unicast address, the
  611. notation to specify interfaces has been extended. An interface name can be
  612. optionally followed by a slash, followed by the global unicast address on which
  613. the server should listen. This will be done in addition to normal
  614. link-local binding + listening on ff02::1:2 address. The sample configuration
  615. below shows how to listen on 2001:db8::1 (a global address)
  616. configured on the eth1 interface.
  617. </para>
  618. <para>
  619. <screen>
  620. "Dhcp6": {
  621. "interfaces-config": {
  622. "interfaces": [ <userinput>"eth1/2001:db8::1"</userinput> ]
  623. },
  624. ...
  625. "option-data": [
  626. {
  627. "name": "unicast",
  628. "data": "2001:db8::1"
  629. } ],
  630. ...
  631. }
  632. </screen>
  633. This configuration will cause the server to listen on
  634. eth1 on link-local address, multicast group (ff02::1:2) and 2001:db8::1.
  635. </para>
  636. <para>
  637. Usually unicast support is associated with a server unicast option
  638. which allows clients to send unicast messages to the server.
  639. The example above contains a server unicast option specification
  640. which causes the client to send messages to the specified
  641. unicast address.
  642. </para>
  643. <para>
  644. It is possible to mix interface names, wildcards and interface name/addresses
  645. on the list of interfaces. It is not possible to specify more than one
  646. unicast address on a given interface.
  647. </para>
  648. <para>
  649. Care should be taken to specify proper unicast addresses. The server will
  650. attempt to bind to those addresses specified, without any additional checks.
  651. This approach is selected on purpose, so the software can be used to
  652. communicate over uncommon addresses if the administrator so desires.
  653. </para>
  654. </section>
  655. <section id="dhcp6-address-config">
  656. <title>Subnet and Address Pool</title>
  657. <para>
  658. The essential role of a DHCPv6 server is address assignment. For this,
  659. the server has to be configured with at least one subnet and one pool of dynamic
  660. addresses to be managed. For example, assume that the server
  661. is connected to a network segment that uses the 2001:db8:1::/64
  662. prefix. The Administrator of that network has decided that addresses from range
  663. 2001:db8:1::1 to 2001:db8:1::ffff are going to be managed by the Dhcp6
  664. server. Such a configuration can be achieved in the following way:
  665. <screen>
  666. "Dhcp6": {
  667. <userinput>"subnet6": [
  668. {
  669. "subnet": "2001:db8:1::/64",
  670. "pools": [
  671. {
  672. "pool": "2001:db8:1::1-2001:db8:1::ffff"
  673. }
  674. ],
  675. ...
  676. }
  677. ]</userinput>
  678. }</screen>
  679. Note that subnet is defined as a simple string, but the pool parameter
  680. is actually a list of pools: for this reason, the pool definition is
  681. enclosed in square brackets, even though only one range of addresses
  682. is specified.</para>
  683. <para>Each <command>pool</command> is a structure that contains the
  684. parameters that describe a single pool. Currently there is only one
  685. parameter, <command>pool</command>, which gives the range of addresses
  686. in the pool. Additional parameters will be added in future releases of
  687. Kea.</para>
  688. <para>It is possible to define more than one pool in a
  689. subnet: continuing the previous example, further assume that
  690. 2001:db8:1:0:5::/80 should also be managed by the server. It could be written as
  691. 2001:db8:1:0:5:: to 2001:db8:1::5:ffff:ffff:ffff, but typing so many 'f's
  692. is cumbersome. It can be expressed more simply as 2001:db8:1:0:5::/80. Both
  693. formats are supported by Dhcp6 and can be mixed in the pool list.
  694. For example, one could define the following pools:
  695. <screen>
  696. "Dhcp6": {
  697. <userinput>"subnet6": [
  698. {
  699. "subnet": "2001:db8:1::/64",
  700. "pools": [
  701. { "pool": "2001:db8:1::1-2001:db8:1::ffff" },
  702. { "pool": "2001:db8:1:05::/80" }
  703. ]</userinput>,
  704. ...
  705. }
  706. ]
  707. }</screen>
  708. The number of pools is not limited, but for performance reasons it is recommended to
  709. use as few as possible.
  710. </para>
  711. <para>
  712. The server may be configured to serve more than one subnet. To add a second subnet,
  713. use a command similar to the following:
  714. <screen>
  715. "Dhcp6": {
  716. <userinput>"subnet6": [
  717. {
  718. "subnet": "2001:db8:1::/64",
  719. "pools": [
  720. { "pool": "2001:db8:1::1-2001:db8:1::ffff" }
  721. ]
  722. },
  723. {
  724. "subnet": "2001:db8:2::/64",
  725. "pools": [
  726. { "pool": "2001:db8:2::/64" }
  727. ]
  728. },
  729. </userinput>
  730. ...
  731. ]
  732. }</screen>
  733. In this example, we allow the server to
  734. dynamically assign all addresses available in the whole subnet. Although
  735. rather wasteful, it is certainly a valid configuration to dedicate the
  736. whole /64 subnet for that purpose. Note that the Kea server does not preallocate
  737. the leases, so there is no danger in using gigantic address pools.
  738. </para>
  739. <para>
  740. When configuring a DHCPv6 server using prefix/length notation, please pay
  741. attention to the boundary values. When specifying that the server can use
  742. a given pool, it will also be able to allocate the first (typically network
  743. address) address from that pool. For example for pool 2001:db8:2::/64 the
  744. 2001:db8:2:: address may be assigned as well. If you want to avoid this,
  745. use the "min-max" notation.
  746. </para>
  747. </section>
  748. <section>
  749. <!-- @todo: add real meat to the prefix delegation config this is just place holder stuff -->
  750. <title>Subnet and Prefix Delegation Pools</title>
  751. <para>
  752. Subnets may also be configured to delegate prefixes, as defined in
  753. <ulink url="http://tools.ietf.org/html/rfc3633">RFC 3633</ulink>.
  754. A subnet may have one or more prefix delegation pools. Each pool has
  755. a prefixed address, which is specified as a prefix and a prefix length,
  756. as well as a delegated prefix length. <command>delegated-len</command>
  757. must not be shorter (that is it must be numerically greater or equal)
  758. than <command>prefix-len</command>.
  759. If both <command>delegated-len</command>
  760. and <command>prefix-len</command> are equal, the server will be able to
  761. delegate only one prefix. The delegated <command>prefix</command> does
  762. not have to match the <command>subnet</command> prefix.
  763. </para>
  764. <para> Below is a sample subnet configuration which enables prefix
  765. delegation for the subnet:
  766. <screen>
  767. "Dhcp6": {
  768. "subnet6": [
  769. {
  770. "subnet": "2001:d8b:1::/64",
  771. <userinput>"pd-pools": [
  772. {
  773. "prefix": "3000:1::",
  774. "prefix-len": 64,
  775. "delegated-len": 96
  776. }
  777. ]</userinput>
  778. }
  779. ],
  780. ...
  781. }</screen>
  782. </para>
  783. </section>
  784. <section id="dhcp6-std-options">
  785. <title>Standard DHCPv6 options</title>
  786. <para>
  787. One of the major features of a DHCPv6 server is to provide configuration
  788. options to clients. Although there are several options that require
  789. special behavior, most options are sent by the server only if the client
  790. explicitly requests them. The following example shows how to
  791. configure DNS servers, which is one of the most frequently used
  792. options. Numbers in the first column are added for easier reference and
  793. will not appear on screen. Options specified in this way are considered
  794. global and apply to all configured subnets.
  795. <screen>
  796. "Dhcp6": {
  797. "option-data": [
  798. {
  799. <userinput>"name": "dns-servers",
  800. "code": 23,
  801. "space": "dhcp6",
  802. "csv-format": true,
  803. "data": "2001:db8::cafe, 2001:db8::babe"</userinput>
  804. },
  805. ...
  806. ]
  807. }
  808. </screen>
  809. </para>
  810. <para>
  811. The <command>option-data></command> line creates a new entry in
  812. the option-data table. This table contains
  813. information on all global options that the server is supposed to configure
  814. in all subnets. The <command>name</command> line specifies the option name.
  815. (For a complete list
  816. of currently supported names, see <xref
  817. linkend="dhcp6-std-options-list"/>.) The next line specifies the option code,
  818. which must match one of the values from that list. The line beginning with
  819. <command>space</command> specifies the option space, which must always be set
  820. to "dhcp6" as these are standard DHCPv6 options. For other name spaces,
  821. including custom option spaces, see <xref
  822. linkend="dhcp6-option-spaces"/>. The next line specifies the format in
  823. which the data will be entered: use of CSV (comma separated values) is
  824. recommended. The <command>data</command> line gives the actual value to be sent to
  825. clients. Data is specified as normal text, with values separated by
  826. commas if more than one value is allowed.
  827. </para>
  828. <para>
  829. Options can also be configured as hexadecimal values. If "csv-format" is
  830. set to false, the option data must be specified as a string of hexadecimal
  831. numbers. The
  832. following commands configure the DNS-SERVERS option for all
  833. subnets with the following addresses: 2001:db8:1::cafe and
  834. 2001:db8:1::babe.
  835. <screen>
  836. "Dhcp6": {
  837. "option-data": [
  838. {
  839. <userinput>"name": "dns-servers",
  840. "code": 23,
  841. "space": "dhcp6",
  842. "csv-format": false,
  843. "data": "2001 0DB8 0001 0000 0000 0000 0000 CAFE
  844. 2001 0DB8 0001 0000 0000 0000 0000 BABE"</userinput>
  845. },
  846. ...
  847. ]
  848. }
  849. </screen>
  850. The value for the setting of the "data" element is split across two
  851. lines in this document for clarity: when entering the command, the
  852. whole string should be entered on the same line. Care should be taken
  853. to use proper encoding when using hexadecimal format as Kea's ability
  854. to validate data correctness in hexadecimal is limited.
  855. </para>
  856. <para>
  857. Most of the parameters in the "option-data" structure are optional and
  858. can be omitted in some circumstances as discussed in the
  859. <xref linkend="dhcp6-option-data-defaults"/>.
  860. </para>
  861. <para>
  862. It is possible to override options on a per-subnet basis. If
  863. clients connected to most of your subnets are expected to get the
  864. same values of a given option, you should use global options: you
  865. can then override specific values for a small number of subnets.
  866. On the other hand, if you use different values in each subnet,
  867. it does not make sense to specify global option values
  868. (Dhcp6/option-data), rather you should set only subnet-specific values
  869. (Dhcp6/subnet[X]/option-data[Y]).
  870. </para>
  871. <para>
  872. The following commands override the global
  873. DNS servers option for a particular subnet, setting a single DNS
  874. server with address 2001:db8:1::3.
  875. <screen>
  876. "Dhcp6": {
  877. "subnet6": [
  878. {
  879. <userinput>"option-data": [
  880. {
  881. "name": "dns-servers",
  882. "code": 23,
  883. "space": "dhcp6",
  884. "csv-format": true,
  885. "data": "2001:db8:1::3"
  886. },
  887. ...
  888. ]</userinput>,
  889. ...
  890. },
  891. ...
  892. ],
  893. ...
  894. }
  895. </screen>
  896. </para>
  897. <para>
  898. The currently supported standard DHCPv6 options are
  899. listed in <xref linkend="dhcp6-std-options-list"/>.
  900. The "Name" and "Code"
  901. are the values that should be used as a name in the option-data
  902. structures. "Type" designates the format of the data: the meanings of
  903. the various types is given in <xref linkend="dhcp-types"/>.
  904. </para>
  905. <para>
  906. Experimental options (like standard options but with a code
  907. which was not assigned by IANA) are listed in
  908. <xref linkend="dhcp6-exp-options-list"/>.
  909. </para>
  910. <para>
  911. Some options are designated as arrays, which means that more than one
  912. value is allowed in such an option. For example the option dns-servers
  913. allows the specification of more than one IPv6 address, allowing
  914. clients to obtain the addresses of multiple DNS servers.
  915. </para>
  916. <!-- @todo: describe record types -->
  917. <para>
  918. The <xref linkend="dhcp6-custom-options"/> describes the configuration
  919. syntax to create custom option definitions (formats). It is generally not
  920. allowed to create custom definitions for standard options, even if the
  921. definition being created matches the actual option format defined in the
  922. RFCs. There is an exception from this rule for standard options for which
  923. Kea does not provide a definition yet. In order to use such options,
  924. a server administrator must create a definition as described in
  925. <xref linkend="dhcp6-custom-options"/> in the 'dhcp6' option space. This
  926. definition should match the option format described in the relevant
  927. RFC but the configuration mechanism would allow any option format as it has
  928. no means to validate the format at the moment.
  929. </para>
  930. <para>
  931. <table frame="all" id="dhcp6-std-options-list">
  932. <title>List of standard DHCPv6 options</title>
  933. <tgroup cols='4'>
  934. <colspec colname='name'/>
  935. <colspec colname='code' align='center'/>
  936. <colspec colname='type' align='center'/>
  937. <colspec colname='array' align='center'/>
  938. <thead>
  939. <row><entry>Name</entry><entry>Code</entry><entry>Type</entry><entry>Array?</entry></row>
  940. </thead>
  941. <tbody>
  942. <!-- Our engine uses those options on its own, admin must not configure them on his own
  943. <row><entry>clientid</entry><entry>1</entry><entry>binary</entry><entry>false</entry></row>
  944. <row><entry>serverid</entry><entry>2</entry><entry>binary</entry><entry>false</entry></row>
  945. <row><entry>ia-na</entry><entry>3</entry><entry>record</entry><entry>false</entry></row>
  946. <row><entry>ia-ta</entry><entry>4</entry><entry>uint32</entry><entry>false</entry></row>
  947. <row><entry>iaaddr</entry><entry>5</entry><entry>record</entry><entry>false</entry></row>
  948. <row><entry>oro</entry><entry>6</entry><entry>uint16</entry><entry>true</entry></row> -->
  949. <row><entry>preference</entry><entry>7</entry><entry>uint8</entry><entry>false</entry></row>
  950. <!-- Our engine uses those options on its own, admin must not configure them on his own
  951. <row><entry>elapsed-time</entry><entry>8</entry><entry>uint16</entry><entry>false</entry></row>
  952. <row><entry>relay-msg</entry><entry>9</entry><entry>binary</entry><entry>false</entry></row>
  953. <row><entry>auth</entry><entry>11</entry><entry>binary</entry><entry>false</entry></row>
  954. -->
  955. <row><entry>unicast</entry><entry>12</entry><entry>ipv6-address</entry><entry>false</entry></row>
  956. <!--
  957. <row><entry>status-code</entry><entry>13</entry><entry>record</entry><entry>false</entry></row>
  958. <row><entry>rapid-commit</entry><entry>14</entry><entry>empty</entry><entry>false</entry></row>
  959. <row><entry>user-class</entry><entry>15</entry><entry>binary</entry><entry>false</entry></row>
  960. <row><entry>vendor-class</entry><entry>16</entry><entry>record</entry><entry>false</entry></row>
  961. -->
  962. <!-- Vendor-specific Information is configurable by the administrator -->
  963. <row><entry>vendor-opts</entry><entry>17</entry><entry>uint32</entry><entry>false</entry></row>
  964. <!--
  965. <row><entry>interface-id</entry><entry>18</entry><entry>binary</entry><entry>false</entry></row>
  966. <row><entry>reconf-msg</entry><entry>19</entry><entry>uint8</entry><entry>false</entry></row>
  967. <row><entry>reconf-accept</entry><entry>20</entry><entry>empty</entry><entry>false</entry></row> -->
  968. -->
  969. <row><entry>sip-server-dns</entry><entry>21</entry><entry>fqdn</entry><entry>true</entry></row>
  970. <row><entry>sip-server-addr</entry><entry>22</entry><entry>ipv6-address</entry><entry>true</entry></row>
  971. <row><entry>dns-servers</entry><entry>23</entry><entry>ipv6-address</entry><entry>true</entry></row>
  972. <row><entry>domain-search</entry><entry>24</entry><entry>fqdn</entry><entry>true</entry></row>
  973. <!-- <row><entry>ia-pd</entry><entry>25</entry><entry>record</entry><entry>false</entry></row> -->
  974. <!-- <row><entry>iaprefix</entry><entry>26</entry><entry>record</entry><entry>false</entry></row> -->
  975. <row><entry>nis-servers</entry><entry>27</entry><entry>ipv6-address</entry><entry>true</entry></row>
  976. <row><entry>nisp-servers</entry><entry>28</entry><entry>ipv6-address</entry><entry>true</entry></row>
  977. <row><entry>nis-domain-name</entry><entry>29</entry><entry>fqdn</entry><entry>true</entry></row>
  978. <row><entry>nisp-domain-name</entry><entry>30</entry><entry>fqdn</entry><entry>true</entry></row>
  979. <row><entry>sntp-servers</entry><entry>31</entry><entry>ipv6-address</entry><entry>true</entry></row>
  980. <row><entry>information-refresh-time</entry><entry>32</entry><entry>uint32</entry><entry>false</entry></row>
  981. <row><entry>bcmcs-server-dns</entry><entry>33</entry><entry>fqdn</entry><entry>true</entry></row>
  982. <row><entry>bcmcs-server-addr</entry><entry>34</entry><entry>ipv6-address</entry><entry>true</entry></row>
  983. <row><entry>geoconf-civic</entry><entry>36</entry><entry>record (uint8, uint16, binary)</entry><entry>false</entry></row>
  984. <row><entry>remote-id</entry><entry>37</entry><entry>record (uint32, binary)</entry><entry>false</entry></row>
  985. <row><entry>subscriber-id</entry><entry>38</entry><entry>binary</entry><entry>false</entry></row>
  986. <row><entry>client-fqdn</entry><entry>39</entry><entry>record (uint8, fqdn)</entry><entry>false</entry></row>
  987. <row><entry>pana-agent</entry><entry>40</entry><entry>ipv6-address</entry><entry>true</entry></row>
  988. <row><entry>new-posix-timezone</entry><entry>41</entry><entry>string</entry><entry>false</entry></row>
  989. <row><entry>new-tzdb-timezone</entry><entry>42</entry><entry>string</entry><entry>false</entry></row>
  990. <row><entry>ero</entry><entry>43</entry><entry>uint16</entry><entry>true</entry></row>
  991. <row><entry>lq-query</entry><entry>44</entry><entry>record (uint8, ipv6-address)</entry><entry>false</entry></row>
  992. <row><entry>client-data</entry><entry>45</entry><entry>empty</entry><entry>false</entry></row>
  993. <row><entry>clt-time</entry><entry>46</entry><entry>uint32</entry><entry>false</entry></row>
  994. <row><entry>lq-relay-data</entry><entry>47</entry><entry>record (ipv6-address, binary)</entry><entry>false</entry></row>
  995. <row><entry>lq-client-link</entry><entry>48</entry><entry>ipv6-address</entry><entry>true</entry></row>
  996. <row><entry>bootfile-url</entry><entry>59</entry><entry>string</entry><entry>false</entry></row>
  997. <row><entry>bootfile-param</entry><entry>60</entry><entry>binary</entry><entry>false</entry></row>
  998. <row><entry>client-arch-type</entry><entry>61</entry><entry>uint16</entry><entry>true</entry></row>
  999. <row><entry>nii</entry><entry>62</entry><entry>record (uint8, uint8, uint8)</entry><entry>false</entry></row>
  1000. <row><entry>erp-local-domain-name</entry><entry>65</entry><entry>fqdn</entry><entry>false</entry></row>
  1001. <row><entry>rsoo</entry><entry>66</entry><entry>empty</entry><entry>false</entry></row>
  1002. <row><entry>client-linklayer-addr</entry><entry>79</entry><entry>binary</entry><entry>false</entry></row>
  1003. <!-- <row><entry>dhcpv4-message</entry><entry>87</entry><entry>binary</entry><entry>false</entry></row> -->
  1004. <row><entry>dhcp4o6-server-addr</entry><entry>88</entry><entry>ipv6-address</entry><entry>true</entry></row>
  1005. </tbody>
  1006. </tgroup>
  1007. </table>
  1008. </para>
  1009. <para>
  1010. <table frame="all" id="dhcp6-exp-options-list">
  1011. <title>List of experimental DHCPv6 options</title>
  1012. <tgroup cols='4'>
  1013. <colspec colname='name'/>
  1014. <colspec colname='code' align='center'/>
  1015. <colspec colname='type' align='center'/>
  1016. <colspec colname='array' align='center'/>
  1017. <thead>
  1018. <row><entry>Name</entry><entry>Code</entry><entry>Type</entry><entry>Array?</entry></row>
  1019. </thead>
  1020. <tbody>
  1021. <row><entry>public-key</entry><entry>701</entry><entry>binary</entry><entry>false</entry></row>
  1022. <row><entry>certificate</entry><entry>702</entry><entry>binary</entry><entry>false</entry></row>
  1023. <row><entry>signature</entry><entry>703</entry><entry>record (uint8, uint8, binary)</entry><entry>false</entry></row>
  1024. <row><entry>timestamp</entry><entry>704</entry><entry>binary</entry><entry>false</entry></row>
  1025. </tbody>
  1026. </tgroup>
  1027. </table>
  1028. </para>
  1029. </section>
  1030. <section id="dhcp6-custom-options">
  1031. <title>Custom DHCPv6 options</title>
  1032. <para>It is also possible to define options other than the standard ones.
  1033. Assume that we want to define a new DHCPv6 option called "foo" which will have
  1034. code 100 and will convey a single unsigned 32 bit integer value. We can define
  1035. such an option by using the following commands:
  1036. <screen>
  1037. "Dhcp6": {
  1038. "option-def": [
  1039. {
  1040. <userinput>"name": "foo",
  1041. "code": 100,
  1042. "type": "uint32",
  1043. "array": false,
  1044. "record-types": "",
  1045. "space": "dhcp6",
  1046. "encapsulate": ""</userinput>
  1047. }, ...
  1048. ],
  1049. ...
  1050. }
  1051. </screen>
  1052. The "false" value of the "array" parameter determines that the option does
  1053. NOT comprise an array of "uint32" values but rather a single value. Two
  1054. other parameters have been left blank: "record-types" and "encapsulate".
  1055. The former specifies the comma separated list of option data fields if the
  1056. option comprises a record of data fields. The "record-fields" value should
  1057. be non-empty if the "type" is set to "record". Otherwise it must be left
  1058. blank. The latter parameter specifies the name of the option space being
  1059. encapsulated by the particular option. If the particular option does not
  1060. encapsulate any option space it should be left blank. Note that the above
  1061. set of comments define the format of the new option and do not set its
  1062. values.
  1063. </para>
  1064. <para>The <command>name</command>, <command>code</command> and
  1065. <command>type</command> parameters are required, all others are
  1066. optional. The <command>array</command> default value is
  1067. <command>false</command>. The <command>record-types</command>
  1068. and <command>encapsulate</command> default values are blank
  1069. (i.e. ""). The default <command>space</command> is "dhcp6".
  1070. </para>
  1071. <para>Once the new option format is defined, its value is set
  1072. in the same way as for a standard option. For example the following
  1073. commands set a global value that applies to all subnets.
  1074. <screen>
  1075. "Dhcp6": {
  1076. "option-data": [
  1077. {
  1078. <userinput>"name": "foo",
  1079. "code": 100,
  1080. "space": "dhcp6",
  1081. "csv-format": true,
  1082. "data": "12345"</userinput>
  1083. }, ...
  1084. ],
  1085. ...
  1086. }
  1087. </screen>
  1088. </para>
  1089. <para>New options can take more complex forms than simple use of
  1090. primitives (uint8, string, ipv6-address etc): it is possible to
  1091. define an option comprising a number of existing primitives.
  1092. </para>
  1093. <para>
  1094. Assume we want to define a new option that will consist of an IPv6
  1095. address, followed by an unsigned 16 bit integer, followed by a
  1096. boolean value, followed by a text string. Such an option could
  1097. be defined in the following way:
  1098. <screen>
  1099. "Dhcp6": {
  1100. "option-def": [
  1101. {
  1102. <userinput>"name": "bar",
  1103. "code": 101,
  1104. "space": "dhcp6",
  1105. "type": "record",
  1106. "array": false,
  1107. "record-types": "ipv6-address, uint16, boolean, string",
  1108. "encapsulate": ""</userinput>
  1109. }, ...
  1110. ],
  1111. ...
  1112. }
  1113. </screen>
  1114. The "type" is set to "record" to indicate that the option contains
  1115. multiple values of different types. These types are given as a comma-separated
  1116. list in the "record-types" field and should be those listed in <xref linkend="dhcp-types"/>.
  1117. </para>
  1118. <para>
  1119. The values of the option are set as follows:
  1120. <screen>
  1121. "Dhcp6": {
  1122. "option-data": [
  1123. {
  1124. <userinput>"name": "bar",
  1125. "space": "dhcp6",
  1126. "code": 101,
  1127. "csv-format": true,
  1128. "data": "2001:db8:1::10, 123, false, Hello World"</userinput>
  1129. }
  1130. ],
  1131. ...
  1132. }</screen>
  1133. <command>csv-format</command> is set <command>true</command> to indicate
  1134. that the <command>data</command> field comprises a command-separated list
  1135. of values. The values in the "data" must correspond to the types set in
  1136. the "record-types" field of the option definition.
  1137. </para>
  1138. <note>
  1139. <para>In the general case, boolean values are specified as <command>true</command> or
  1140. <command>false</command>, without quotes. Some specific boolean parameters may
  1141. accept also <command>"true"</command>, <command>"false"</command>,
  1142. <command>0</command>, <command>1</command>, <command>"0"</command> and
  1143. <command>"1"</command>. Future Kea versions will accept all those values
  1144. for all boolean parameters.</para>
  1145. </note>
  1146. </section>
  1147. <section id="dhcp6-vendor-opts">
  1148. <title>DHCPv6 vendor specific options</title>
  1149. <para>
  1150. Currently there are two option spaces defined for the DHCPv6
  1151. daemon: "dhcp6" (for top level DHCPv6 options) and "vendor-opts-space",
  1152. which is empty by default, but options can be defined in it.
  1153. Those options will be carried in the Vendor-specific
  1154. Information option (code 17). The following examples show how to
  1155. define an option "foo" with code 1 that consists of an IPv6 address,
  1156. an unsigned 16 bit integer and a string. The "foo" option is
  1157. conveyed in a Vendor-specific Information option. This option
  1158. comprises a single uint32 value that is set to "12345".
  1159. The sub-option "foo" follows the data field holding this value.
  1160. <screen>
  1161. "Dhcp6": {
  1162. "option-def": [
  1163. {
  1164. <userinput>"name": "foo",
  1165. "code": 1,
  1166. "space": "vendor-opts-space",
  1167. "type": "record",
  1168. "array": false,
  1169. "record-types": "ipv6-address, uint16, string",
  1170. "encapsulate": ""</userinput>
  1171. }
  1172. ],
  1173. ...
  1174. }</screen>
  1175. (Note that the option space is set to <command>vendor-opts-space</command>.)
  1176. Once the option format is defined, the next step is to define actual values
  1177. for that option:
  1178. <screen>
  1179. "Dhcp6": {
  1180. "option-data": [
  1181. {
  1182. <userinput>"name": "foo",
  1183. "space": "vendor-opts-space",
  1184. "data": "2001:db8:1::10, 123, Hello World"</userinput>
  1185. },
  1186. ...
  1187. ],
  1188. ...
  1189. }</screen>
  1190. We should also define a value (enterprise-number) for the
  1191. Vendor-specific Information option, that conveys our option "foo".
  1192. <screen>
  1193. "Dhcp6": {
  1194. "option-data": [
  1195. ...,
  1196. {
  1197. <userinput>"name": "vendor-opts",
  1198. "data": "12345"</userinput>
  1199. }
  1200. ],
  1201. ...
  1202. }</screen>
  1203. Alternatively, the option can be specified using its code.
  1204. <screen>
  1205. "Dhcp6": {
  1206. "option-data": [
  1207. ...,
  1208. {
  1209. <userinput>"code": 17,
  1210. "data": "12345"</userinput>
  1211. }
  1212. ],
  1213. ...
  1214. }</screen>
  1215. </para>
  1216. </section>
  1217. <section id="dhcp6-option-spaces">
  1218. <title>Nested DHCPv6 options (custom option spaces)</title>
  1219. <para>It is sometimes useful to define completely new option
  1220. spaces. This is useful if the user wants his new option to
  1221. convey sub-options that use a separate numbering scheme, for
  1222. example sub-options with codes 1 and 2. Those option codes
  1223. conflict with standard DHCPv6 options, so a separate option
  1224. space must be defined.
  1225. </para>
  1226. <para>Note that it is not required to create a new option space when
  1227. defining sub-options for a standard option because it is
  1228. created by default if the standard option is meant to convey
  1229. any sub-options (see <xref linkend="dhcp6-vendor-opts"/>).
  1230. </para>
  1231. <para>
  1232. Assume that we want to have a DHCPv6 option called "container"
  1233. with code 102 that conveys two sub-options with codes 1 and 2.
  1234. First we need to define the new sub-options:
  1235. <screen>
  1236. "Dhcp6": {
  1237. "option-def": [
  1238. {
  1239. <userinput>"name": "subopt1",
  1240. "code": 1,
  1241. "space": "isc",
  1242. "type": "ipv6-address",
  1243. "record-types": "",
  1244. "array": false,
  1245. "encapsulate": ""</userinput>
  1246. },
  1247. {
  1248. <userinput>"name": "subopt2",
  1249. "code": 2,
  1250. "space": "isc",
  1251. "type": "string",
  1252. "record-types": "",
  1253. "array": false
  1254. "encapsulate": ""</userinput>
  1255. }
  1256. ],
  1257. ...
  1258. }</screen>
  1259. Note that we have defined the options to belong to a new option space
  1260. (in this case, "isc").
  1261. </para>
  1262. <para>
  1263. The next step is to define a regular DHCPv6 option and specify that it
  1264. should include options from the isc option space:
  1265. <screen>
  1266. "Dhcp6": {
  1267. "option-def": [
  1268. ...,
  1269. {
  1270. <userinput>"name": "container",
  1271. "code": 102,
  1272. "space": "dhcp6",
  1273. "type": "empty",
  1274. "array": false,
  1275. "record-types": "",
  1276. "encapsulate": "isc"</userinput>
  1277. }
  1278. ],
  1279. ...
  1280. }</screen>
  1281. The name of the option space in which the sub-options are defined is set in
  1282. the <command>encapsulate</command> field. The <command>type</command> field
  1283. is set to <command>empty</command> which limits this option to only carrying
  1284. data in sub-options.
  1285. </para>
  1286. <para>
  1287. Finally, we can set values for the new options:
  1288. <screen>
  1289. "Dhcp6": {
  1290. "option-data": [
  1291. {
  1292. <userinput>"name": "subopt1",
  1293. "code": 1,
  1294. "space": "isc",
  1295. "data": "2001:db8::abcd"</userinput>
  1296. },
  1297. }
  1298. <userinput>"name": "subopt2",
  1299. "code": 2,
  1300. "space": "isc",
  1301. "data": "Hello world"</userinput>
  1302. },
  1303. {
  1304. <userinput>"name": "container",
  1305. "code": 102,
  1306. "space": "dhcp6"</userinput>
  1307. }
  1308. ],
  1309. ...
  1310. }
  1311. </screen>
  1312. </para>
  1313. <para>Note that it is possible to create an option which carries some data
  1314. in addition to the sub-options defined in the encapsulated option space.
  1315. For example, if the "container" option from the previous example was
  1316. required to carry an uint16 value as well as the sub-options, the "type"
  1317. value would have to be set to "uint16" in the option definition. (Such an
  1318. option would then have the following data structure: DHCP header, uint16
  1319. value, sub-options.) The value specified with the "data" parameter &mdash; which
  1320. should be a valid integer enclosed in quotes, e.g. "123" &mdash; would then be
  1321. assigned to the uint16 field in the "container" option.
  1322. </para>
  1323. </section>
  1324. <section id="dhcp6-option-data-defaults">
  1325. <title>Unspecified parameters for DHCPv6 option configuration</title>
  1326. <para>In many cases it is not required to specify all parameters for
  1327. an option configuration and the default values can be used. However, it is
  1328. important to understand the implications of not specifying some of them
  1329. as it may result in configuration errors. The list below explains
  1330. the behavior of the server when a particular parameter is not explicitly
  1331. specified:
  1332. <itemizedlist>
  1333. <listitem>
  1334. <simpara><command>name</command> - the server requires an option name or
  1335. option code to identify an option. If this parameter is unspecified, the
  1336. option code must be specified.
  1337. </simpara>
  1338. </listitem>
  1339. <listitem>
  1340. <simpara><command>code</command> - the server requires an option name or
  1341. option code to identify an option. This parameter may be left unspecified if
  1342. the <command>name</command> parameter is specified. However, this also
  1343. requires that the particular option has its definition (it is either a
  1344. standard option or an administrator created a definition for the option
  1345. using an 'option-def' structure), as the option definition associates an
  1346. option with a particular name. It is possible to configure an option
  1347. for which there is no definition (unspecified option format).
  1348. Configuration of such options requires the use of option code.
  1349. </simpara>
  1350. </listitem>
  1351. <listitem>
  1352. <simpara><command>space</command> - if the option space is unspecified it
  1353. will default to 'dhcp6' which is an option space holding DHCPv6 standard
  1354. options.
  1355. </simpara>
  1356. </listitem>
  1357. <listitem>
  1358. <simpara><command>data</command> - if the option data is unspecified it
  1359. defaults to an empty value. The empty value is mostly used for the
  1360. options which have no payload (boolean options), but it is legal to specify
  1361. empty values for some options which carry variable length data and which
  1362. spec allows for the length of 0. For such options, the data parameter
  1363. may be omitted in the configuration.</simpara>
  1364. </listitem>
  1365. <listitem>
  1366. <simpara><command>csv-format</command> - if this value is not specified
  1367. and the definition for the particular option exists, the server will assume
  1368. that the option data is specified as a list of comma separated values to be
  1369. assigned to individual fields of the DHCP option. If the definition
  1370. does not exist for this option, the server will assume that the data
  1371. parameter contains the option payload in the binary format (represented
  1372. as a string of hexadecimal digits). Note that not specifying this
  1373. parameter doesn't imply that it defaults to a fixed value, but
  1374. the configuration data interpretation also depends on the presence
  1375. of the option definition. An administrator must be aware if the
  1376. definition for the particular option exists when this parameter
  1377. is not specified. It is generally recommended to not specify this
  1378. parameter only for the options for which the definition exists, e.g.
  1379. standard options. Setting <command>csv-format</command> to an explicit
  1380. value will cause the server to strictly check the format of the option
  1381. data specified.
  1382. </simpara>
  1383. </listitem>
  1384. </itemizedlist>
  1385. </para>
  1386. </section>
  1387. <section id="dhcp6-config-subnets">
  1388. <title>IPv6 Subnet Selection</title>
  1389. <para>
  1390. The DHCPv6 server may receive requests from local (connected to the
  1391. same subnet as the server) and remote (connecting via relays) clients.
  1392. As the server may have many subnet configurations defined, it must select
  1393. an appropriate subnet for a given request.
  1394. </para>
  1395. <para>
  1396. The server can not assume which of the configured subnets are local. In IPv4
  1397. it is possible as there is a reasonable expectation that the
  1398. server will have a (global) IPv4 address configured on the interface,
  1399. and can use that information to detect whether a subnet is local or
  1400. not. That assumption is not true in IPv6, the DHCPv6 server must be able
  1401. to operate while only having link-local addresses. Therefore an optional
  1402. &quot;interface&quot; parameter is available within a subnet definition
  1403. to designate that a given subnet is local, i.e. reachable directly over
  1404. the specified interface. For example the server that is intended to serve
  1405. a local subnet over eth0 may be configured as follows:
  1406. <screen>
  1407. "Dhcp6": {
  1408. "subnet6": [
  1409. {
  1410. "subnet": "2001:db8:beef::/48",
  1411. "pools": [
  1412. {
  1413. "pool": "2001:db8:beef::/48"
  1414. }
  1415. ],
  1416. <userinput>"interface": "eth0"</userinput>
  1417. }
  1418. ],
  1419. ...
  1420. }
  1421. </screen>
  1422. </para>
  1423. </section>
  1424. <section id="dhcp6-rapid-commit">
  1425. <title>Rapid Commit</title>
  1426. <para>The Rapid Commit option, described in
  1427. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>, is supported
  1428. by the Kea DHCPv6 server. However, support is disabled by default for
  1429. all subnets. It can be enabled for a particular subnet using the
  1430. <command>rapid-commit</command> parameter as shown below:
  1431. <screen>
  1432. "Dhcp6": {
  1433. "subnet6": [
  1434. {
  1435. "subnet": "2001:db8:beef::/48",
  1436. <userinput>"rapid-commit": true</userinput>,
  1437. "pools": [
  1438. {
  1439. "pool": "2001:db8:beef::1-2001:db8:beef::10"
  1440. }
  1441. ],
  1442. }
  1443. ],
  1444. ...
  1445. }
  1446. </screen>
  1447. </para>
  1448. <para>
  1449. This setting only affects the subnet for which the
  1450. <command>rapid-commit</command> is set to <command>true</command>.
  1451. For clients connected to other subnets, the server will ignore the
  1452. Rapid Commit option sent by the client and will follow the 4-way
  1453. exchange procedure, i.e. respond with the Advertise for the Solicit
  1454. containing Rapid Commit option.
  1455. </para>
  1456. </section>
  1457. <section id="dhcp6-relays">
  1458. <title>DHCPv6 Relays</title>
  1459. <para>
  1460. A DHCPv6 server with multiple subnets defined must select the
  1461. appropriate subnet when it receives a request from a client. For clients
  1462. connected via relays, two mechanisms are used:
  1463. </para>
  1464. <para>
  1465. The first uses the linkaddr field in the RELAY_FORW message. The name
  1466. of this field is somewhat misleading in that it does not contain a link-layer
  1467. address: instead, it holds an address (typically a global address) that is
  1468. used to identify a link. The DHCPv6 server checks if the address belongs
  1469. to a defined subnet and, if it does, that subnet is selected for the client's
  1470. request.
  1471. </para>
  1472. <para>
  1473. The second mechanism is based on interface-id options. While forwarding a client's
  1474. message, relays may insert an interface-id option into the message that
  1475. identifies the interface on the relay that received the message. (Some
  1476. relays allow configuration of that parameter, but it is sometimes
  1477. hardcoded and may range from the very simple (e.g. "vlan100") to the very cryptic:
  1478. one example seen on real hardware was "ISAM144|299|ipv6|nt:vp:1:110"). The
  1479. server can use this information to select the appropriate subnet.
  1480. The information is also returned to the relay which then knows the
  1481. interface to use to transmit the response to the client. In order for
  1482. this to work successfully, the relay interface IDs must be unique within
  1483. the network and the server configuration must match those values.
  1484. </para>
  1485. <para>
  1486. When configuring the DHCPv6 server, it should be noted that two
  1487. similarly-named parameters can be configured for a subnet:
  1488. <itemizedlist>
  1489. <listitem><simpara>
  1490. "interface" defines which local network interface can be used
  1491. to access a given subnet.
  1492. </simpara></listitem>
  1493. <listitem><simpara>
  1494. "interface-id" specifies the content of the interface-id option
  1495. used by relays to identify the interface on the relay to which
  1496. the response packet is sent.
  1497. </simpara></listitem>
  1498. </itemizedlist>
  1499. The two are mutually exclusive: a subnet cannot be both reachable locally
  1500. (direct traffic) and via relays (remote traffic). Specifying both is a
  1501. configuration error and the DHCPv6 server will refuse such a configuration.
  1502. </para>
  1503. <para>
  1504. To specify interface-id with value "vlan123", the following commands can
  1505. be used:
  1506. <screen>
  1507. "Dhcp6": {
  1508. "subnet6": [
  1509. {
  1510. "subnet": "2001:db8:beef::/48",
  1511. "pools": [
  1512. {
  1513. "pool": "2001:db8:beef::/48"
  1514. }
  1515. ],
  1516. <userinput>"interface-id": "vlan123"</userinput>
  1517. }
  1518. ],
  1519. ...
  1520. }
  1521. </screen>
  1522. </para>
  1523. </section>
  1524. <section id="dhcp6-rsoo">
  1525. <title>Relay-Supplied Options</title>
  1526. <para><ulink url="http://tools.ietf.org/html/rfc6422">RFC 6422</ulink>
  1527. defines a mechanism called Relay-Supplied DHCP Options. In certain cases relay
  1528. agents are the only entities that may have specific information. They can
  1529. insert options when relaying messages from the client to the server. The
  1530. server will then do certain checks and copy those options to the response
  1531. that will be sent to the client.</para>
  1532. <para>There are certain conditions that must be met for the option to be
  1533. included. First, the server must not provide the option by itself. In
  1534. other words, if both relay and server provide an option, the server always
  1535. takes precedence. Second, the option must be RSOO-enabled. IANA maintains a
  1536. list of RSOO-enabled options <ulink url="http://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#options-relay-supplied">here</ulink>.
  1537. However, there may be cases when system administrators want to echo other
  1538. options. Kea can be instructed to treat other options as RSOO-enabled.
  1539. For example, to mark options 110, 120 and 130 as RSOO-enabled, the following
  1540. syntax should be used:
  1541. <screen>
  1542. "Dhcp6": {
  1543. <userinput>"relay-supplied-options": [ "110", "120", "130" ],</userinput>
  1544. ...
  1545. }
  1546. </screen>
  1547. </para>
  1548. <para>As of March 2015, only option 65 is RSOO-enabled by IANA. This
  1549. option will always be treated as such and there's no need to explicitly
  1550. mark it. Also, when enabling standard options, it is possible to use their
  1551. names, rather than option code, e.g. (e.g. use
  1552. <command>dns-servers</command> instead of <command>23</command>). See
  1553. <xref linkend="dhcp6-std-options-list" /> for the names. In certain cases
  1554. it could also work for custom options, but due to the nature of the parser
  1555. code this may be unreliable and should be avoided.
  1556. </para>
  1557. </section>
  1558. <section id="dhcp6-client-classifier">
  1559. <title>Client Classification in DHCPv6</title>
  1560. <para>
  1561. The DHCPv6 server includes support for client classification. At the
  1562. current time the capabilities of the classification process are limited
  1563. but it is expected they will be expanded in the future. For a deeper
  1564. discussion of the classification process see <xref linkend="classify"/>.
  1565. </para>
  1566. <para>
  1567. In certain cases it is useful to differentiate between different types
  1568. of clients and treat them accordingly. It is envisaged that client
  1569. classification will be used for changing the behavior of almost any part of
  1570. the DHCP message processing, including the assignment of leases from different
  1571. pools, the assignment of different options (or different values of the same
  1572. options) etc. In the current release of the software however, there are
  1573. only two mechanisms that take advantage of client classification:
  1574. subnet selection and assignment of different options.
  1575. </para>
  1576. <para>
  1577. Kea can be instructed to limit access to given subnets based on class information.
  1578. This is particularly useful for cases where two types of devices share the
  1579. same link and are expected to be served from two different subnets. The
  1580. primary use case for such a scenario is cable networks. There are two
  1581. classes of devices: the cable modem itself, which should be handed a lease
  1582. from subnet A and all other devices behind the modem that should get a lease
  1583. from subnet B. That segregation is essential to prevent overly curious
  1584. users from playing with their cable modems. For details on how to set up
  1585. class restrictions on subnets, see <xref linkend="classification-subnets"/>.
  1586. </para>
  1587. <para>
  1588. The process of doing classification is conducted in three steps. The first step
  1589. is to assess an incoming packet and assign it to zero or more classes. The
  1590. second step is to choose a subnet, possibly based on the class information.
  1591. The third step is to assign options again possibly based on the class
  1592. information.
  1593. </para>
  1594. <para>
  1595. There are two methods of doing classification. The first is automatic and relies
  1596. on examining the values in the vendor class options. Information from these
  1597. options is extracted and a class name is constructed from it and added to
  1598. the class list for the packet. The second allows you to specify an expression
  1599. that is evaluated for each packet. If the result is true the packet is
  1600. a member of the class.
  1601. </para>
  1602. <note><para>
  1603. Care should be taken with client classification as it is easy for
  1604. clients that do not meet class criteria to be denied any service altogether.
  1605. </para></note>
  1606. <section>
  1607. <title>Defining and Using Custom Classes</title>
  1608. <para>
  1609. The following example shows how to configure a class using an expression
  1610. and a subnet making use of that class. This configuration defines the
  1611. class named &quot;Client_enterprise&quot;. It is comprised
  1612. of all clients who's client identifiers start with the given hex string (which
  1613. would indicate a DUID based on an enterprise id of 0xAABBCCDD).
  1614. They will be given an address from 2001:db8:1::0 to 2001:db8:1::FFFF and
  1615. 2001:db8:0::1 and 2001:db8:2::1 for their domain name servers. For a deeper
  1616. discussion of the classification process see <xref linkend="classify"/>.
  1617. <screen>
  1618. "Dhcp6": {
  1619. "client-classes": [
  1620. {<userinput>
  1621. "name": "Client_enterprise",
  1622. "test": "substring(option[1].hex,0,6) == 0x0002AABBCCDD'",
  1623. "option-data": [
  1624. {
  1625. "name": "dns-servers",
  1626. "code": 23,
  1627. "space": "dhcp6",
  1628. "csv-format": true,
  1629. "data": "2001:db8:0::1, 2001:db8:2::1"
  1630. }
  1631. ]</userinput>
  1632. },
  1633. ...
  1634. ],
  1635. "subnet6": [
  1636. {
  1637. "subnet": "2001:db8:1::/64",
  1638. "pools": [ { "pool": "2001:db8:1::-2001:db8:1::ffff" } ],
  1639. <userinput>"client-class": "Client_enterprise"</userinput>
  1640. }
  1641. ],
  1642. ...
  1643. }</screen>
  1644. </para>
  1645. <para>
  1646. This example shows a configuration using an automatically generated
  1647. "VENDOR_CLASS_" class. The Administrator of the network has
  1648. decided that addresses from range 2001:db8:1::1 to 2001:db8:1::ffff are
  1649. going to be managed by the Dhcp6 server and only clients belonging to the
  1650. eRouter1.0 client class are allowed to use that pool.
  1651. <screen>
  1652. "Dhcp6": {
  1653. "subnet6": [
  1654. {
  1655. "subnet": "2001:db8:1::/64",
  1656. "pools": [
  1657. {
  1658. "pool": "2001:db8:1::-2001:db8:1::ffff"
  1659. }
  1660. ],
  1661. <userinput>"client-class": "VENDOR_CLASS_eRouter1.0"</userinput>
  1662. }
  1663. ],
  1664. ...
  1665. }
  1666. </screen>
  1667. </para>
  1668. </section>
  1669. </section>
  1670. <section id="dhcp6-ddns-config">
  1671. <title>DDNS for DHCPv6</title>
  1672. <para>
  1673. As mentioned earlier, kea-dhcp6 can be configured to generate requests to
  1674. the DHCP-DDNS server (referred to here as "D2") to update
  1675. DNS entries. These requests are known as NameChangeRequests or NCRs.
  1676. Each NCR contains the following information:
  1677. <orderedlist>
  1678. <listitem><para>
  1679. Whether it is a request to add (update) or remove DNS entries
  1680. </para></listitem>
  1681. <listitem><para>
  1682. Whether the change requests forward DNS updates (AAAA records), reverse
  1683. DNS updates (PTR records), or both.
  1684. </para></listitem>
  1685. <listitem><para>
  1686. The FQDN, lease address, and DHCID
  1687. </para></listitem>
  1688. </orderedlist>
  1689. The parameters controlling the generation of NCRs for submission to D2
  1690. are contained in the "dhcp-ddns" section of kea-dhcp6
  1691. configuration. The mandatory parameters for the DHCP DDNS configuration
  1692. are <command>enable-updates</command> which is unconditionally
  1693. required, and <command>qualifying-suffix</command> which has no
  1694. default value and is required when <command>enable-updates</command>
  1695. is set to <command>true</command>.
  1696. The two (disabled and enabled) minimal DHCP DDNS configurations are:
  1697. <screen>
  1698. "Dhcp6": {
  1699. "dhcp-ddns": {
  1700. <userinput>"enable-updates": false</userinput>
  1701. },
  1702. ...
  1703. }
  1704. </screen>
  1705. and for example:
  1706. <screen>
  1707. "Dhcp6": {
  1708. "dhcp-ddns": {
  1709. <userinput>"enable-updates": true,
  1710. "qualifying-suffix": "example."</userinput>
  1711. },
  1712. ...
  1713. }
  1714. </screen>
  1715. The default values for the "dhcp-ddns" section are as follows:
  1716. <itemizedlist>
  1717. <listitem><simpara>
  1718. <command>"server-ip": "127.0.0.1"</command>
  1719. </simpara></listitem>
  1720. <listitem><simpara>
  1721. <command>"server-port": 53001</command>
  1722. </simpara></listitem>
  1723. <listitem><simpara>
  1724. <command>"sender-ip": ""</command>
  1725. </simpara></listitem>
  1726. <listitem><simpara>
  1727. <command>"sender-port": 0</command>
  1728. </simpara></listitem>
  1729. <listitem><simpara>
  1730. <command>"max-queue-size": 1024</command>
  1731. </simpara></listitem>
  1732. <listitem><simpara>
  1733. <command>"ncr-protocol": "UDP"</command>
  1734. </simpara></listitem>
  1735. <listitem><simpara>
  1736. <command>"ncr-format": "JSON"</command>
  1737. </simpara></listitem>
  1738. <listitem><simpara>
  1739. <command>"override-no-update": false</command>
  1740. </simpara></listitem>
  1741. <listitem><simpara>
  1742. <command>"override-client-update": false</command>
  1743. </simpara></listitem>
  1744. <listitem><simpara>
  1745. <command>"replace-client-name": "never"</command>
  1746. </simpara></listitem>
  1747. <listitem><simpara>
  1748. <command>"generated-prefix": "myhost"</command>
  1749. </simpara></listitem>
  1750. </itemizedlist>
  1751. </para>
  1752. <section id="dhcpv6-d2-io-config">
  1753. <title>DHCP-DDNS Server Connectivity</title>
  1754. <para>
  1755. In order for NCRs to reach the D2 server, kea-dhcp6 must be able
  1756. to communicate with it. kea-dhcp6 uses the following configuration
  1757. parameters to control how it communications with D2:
  1758. <itemizedlist>
  1759. <listitem><simpara>
  1760. <command>enable-updates</command> - determines whether or not kea-dhcp6 will
  1761. generate NCRs. If missing, this value is assumed to be false hence DDNS updates
  1762. are disabled. To enable DDNS updates set this value to true:
  1763. </simpara></listitem>
  1764. <listitem><simpara>
  1765. <command>server-ip</command> - IP address on which D2 listens for requests. The default is
  1766. the local loopback interface at address 127.0.0.1. You may specify
  1767. either an IPv4 or IPv6 address.
  1768. </simpara></listitem>
  1769. <listitem><simpara>
  1770. <command>server-port</command> - port on which D2 listens for requests. The default value
  1771. is 53001.
  1772. </simpara></listitem>
  1773. <listitem><simpara>
  1774. <command>sender-ip</command> - IP address which kea-dhcp6 should use to send requests to D2.
  1775. The default value is blank which instructs kea-dhcp6 to select a suitable
  1776. address.
  1777. </simpara></listitem>
  1778. <listitem><simpara>
  1779. <command>sender-port</command> - port which kea-dhcp6 should use to send requests to D2. The
  1780. default value of 0 instructs kea-dhcp6 to select a suitable port.
  1781. </simpara></listitem>
  1782. <listitem><simpara>
  1783. <command>max-queue-size</command> - maximum number of requests allowed to queue waiting to
  1784. be sent to D2. This value guards against requests accumulating
  1785. uncontrollably if they are being generated faster than they can be
  1786. delivered. If the number of requests queued for transmission reaches
  1787. this value, DDNS updating will be turned off until the queue backlog has
  1788. been sufficiently reduced. The intent is to allow kea-dhcp6 to
  1789. continue lease operations. The default value is 1024.
  1790. </simpara></listitem>
  1791. <listitem><simpara>
  1792. <command>ncr-protocol</command> - Socket protocol use when sending requests to D2. Currently
  1793. only UDP is supported. TCP may be available in an upcoming release.
  1794. </simpara></listitem>
  1795. <listitem><simpara>
  1796. <command>ncr-format</command> - Packet format to use when sending requests to D2.
  1797. Currently only JSON format is supported. Other formats may be available
  1798. in future releases.
  1799. </simpara></listitem>
  1800. </itemizedlist>
  1801. By default, kea-dhcp-ddns is assumed to running on the same machine as kea-dhcp6, and
  1802. all of the default values mentioned above should be sufficient.
  1803. If, however, D2 has been configured to listen on a different address or
  1804. port, these values must altered accordingly. For example, if D2 has been
  1805. configured to listen on 2001:db8::5 port 900, the following commands
  1806. would be required:
  1807. <screen>
  1808. "Dhcp6": {
  1809. "dhcp-ddns": {
  1810. <userinput>"server-ip": "2001:db8::5",
  1811. "server-port": 900</userinput>,
  1812. ...
  1813. },
  1814. ...
  1815. }
  1816. </screen>
  1817. </para>
  1818. </section>
  1819. <section id="dhcpv6-d2-rules-config">
  1820. <title>When does kea-dhcp6 generate DDNS request</title>
  1821. <para>kea-dhcp6 follows the behavior prescribed for DHCP servers in
  1822. <ulink url="http://tools.ietf.org/html/rfc4704">RFC 4704</ulink>.
  1823. It is important to keep in mind that kea-dhcp6 provides the initial
  1824. decision making of when and what to update and forwards that
  1825. information to D2 in the form of NCRs. Carrying out the actual
  1826. DNS updates and dealing with such things as conflict resolution
  1827. are the purview of D2 (<xref linkend="dhcp-ddns-server"/>).</para>
  1828. <para>
  1829. This section describes when kea-dhcp6 will generate NCRs and the
  1830. configuration parameters that can be used to influence this decision.
  1831. It assumes that the "enable-updates" parameter is true.
  1832. </para>
  1833. <note>
  1834. <para>
  1835. Currently the interface between kea-dhcp6 and D2 only supports requests
  1836. which update DNS entries for a single IP address. If a lease grants
  1837. more than one address, kea-dhcp6 will create the DDNS update request for
  1838. only the first of these addresses. Support for multiple address
  1839. mappings may be provided in a future release.
  1840. </para>
  1841. </note>
  1842. <para>
  1843. In general, kea-dhcp6 will generate DDNS update requests when:
  1844. <orderedlist>
  1845. <listitem><para>
  1846. A new lease is granted in response to a REQUEST
  1847. </para></listitem>
  1848. <listitem><para>
  1849. An existing lease is renewed but the FQDN associated with it has
  1850. changed.
  1851. </para></listitem>
  1852. <listitem><para>
  1853. An existing lease is released in response to a RELEASE
  1854. </para></listitem>
  1855. </orderedlist>
  1856. In the second case, lease renewal, two DDNS requests will be issued: one
  1857. request to remove entries for the previous FQDN and a second request to
  1858. add entries for the new FQDN. In the last case, a lease release, a
  1859. single DDNS request to remove its entries will be made. The decision
  1860. making involved when granting a new lease is more involved and is
  1861. discussed next.
  1862. </para>
  1863. <para>
  1864. kea-dhcp6 will generate a DDNS update request only if the REQUEST
  1865. contains the FQDN option (code 39). By default kea-dhcp6 will
  1866. respect the FQDN N and S flags specified by the client as shown in the
  1867. following table:
  1868. </para>
  1869. <table id="dhcp6-fqdn-flag-table">
  1870. <title>Default FQDN Flag Behavior</title>
  1871. <tgroup cols='4' align='left'>
  1872. <colspec colname='cflags'/>
  1873. <colspec colname='meaning'/>
  1874. <colspec colname='response'/>
  1875. <colspec colname='sflags'/>
  1876. <thead>
  1877. <row>
  1878. <entry>Client Flags:N-S</entry>
  1879. <entry>Client Intent</entry>
  1880. <entry>Server Response</entry>
  1881. <entry>Server Flags:N-S-O</entry>
  1882. </row>
  1883. </thead>
  1884. <tbody>
  1885. <row>
  1886. <entry>0-0</entry>
  1887. <entry>
  1888. Client wants to do forward updates, server should do reverse updates
  1889. </entry>
  1890. <entry>Server generates reverse-only request</entry>
  1891. <entry>1-0-0</entry>
  1892. </row>
  1893. <row>
  1894. <entry>0-1</entry>
  1895. <entry>Server should do both forward and reverse updates</entry>
  1896. <entry>Server generates request to update both directions</entry>
  1897. <entry>0-1-0</entry>
  1898. </row>
  1899. <row>
  1900. <entry>1-0</entry>
  1901. <entry>Client wants no updates done</entry>
  1902. <entry>Server does not generate a request</entry>
  1903. <entry>1-0-0</entry>
  1904. </row>
  1905. </tbody>
  1906. </tgroup>
  1907. </table>
  1908. <para>
  1909. The first row in the table above represents "client delegation". Here
  1910. the DHCP client states that it intends to do the forward DNS updates and
  1911. the server should do the reverse updates. By default, kea-dhcp6 will honor
  1912. the client's wishes and generate a DDNS request to D2 to update only
  1913. reverse DNS data. The parameter, "override-client-update", can be used
  1914. to instruct the server to override client delegation requests. When
  1915. this parameter is true, kea-dhcp6 will disregard requests for client
  1916. delegation and generate a DDNS request to update both forward and
  1917. reverse DNS data. In this case, the N-S-O flags in the server's
  1918. response to the client will be 0-1-1 respectively.
  1919. </para>
  1920. <para>
  1921. (Note that the flag combination N=1, S=1 is prohibited according to
  1922. RFC 4702. If such a combination is received from the client, the packet
  1923. will be dropped by kea-dhcp6.)
  1924. </para>
  1925. <para>
  1926. To override client delegation, issue the following commands:
  1927. </para>
  1928. <screen>
  1929. "Dhcp6": {
  1930. "dhcp-ddns": {
  1931. <userinput>"override-client-update": true</userinput>,
  1932. ...
  1933. },
  1934. ...
  1935. }
  1936. </screen>
  1937. <para>
  1938. The third row in the table above describes the case in which the client
  1939. requests that no DNS updates be done. The parameter, "override-no-update",
  1940. can be used to instruct the server to disregard the client's wishes. When
  1941. this parameter is true, kea-dhcp6 will generate DDNS update requests to
  1942. kea-dhcp-ddns even if the client requests no updates be done. The N-S-O
  1943. flags in the server's response to the client will be 0-1-1.
  1944. </para>
  1945. <para>
  1946. To override client delegation, issue the following commands:
  1947. </para>
  1948. <screen>
  1949. "Dhcp6": {
  1950. "dhcp-ddns": {
  1951. <userinput>"override-no-update": true</userinput>,
  1952. ...
  1953. },
  1954. ...
  1955. }
  1956. </screen>
  1957. </section>
  1958. <section id="dhcpv6-fqdn-name-generation">
  1959. <title>kea-dhcp6 name generation for DDNS update requests</title>
  1960. <para>Each NameChangeRequest must of course include the fully qualified
  1961. domain name whose DNS entries are to be affected. kea-dhcp6 can be
  1962. configured to supply a portion or all of that name based upon what it
  1963. receives from the client.</para>
  1964. <para>
  1965. The default rules for constructing the FQDN that will be used for DNS
  1966. entries are:
  1967. <orderedlist>
  1968. <listitem><para>
  1969. If the DHCPREQUEST contains the client FQDN option, the candidate name
  1970. is taken from there.
  1971. </para></listitem>
  1972. <listitem><para>
  1973. If the candidate name is a partial (i.e. unqualified) name then add a
  1974. configurable suffix to the name and use the result as the FQDN.
  1975. </para></listitem>
  1976. <listitem><para>
  1977. If the candidate name provided is empty, generate a FQDN using a
  1978. configurable prefix and suffix.
  1979. </para></listitem>
  1980. <listitem><para>
  1981. If the client provided neither option, then no DNS action will be taken.
  1982. </para></listitem>
  1983. </orderedlist>
  1984. These rules can amended by setting the
  1985. <command>replace-client-name</command> parameter which provides the
  1986. following modes of behavior:
  1987. <itemizedlist>
  1988. <listitem><para>
  1989. <command>never</command> - Use the name the client sent. If the client
  1990. sent no name, do not generate one. This is the default mode.
  1991. </para></listitem>
  1992. <listitem><para>
  1993. <command>always</command> - Replace the name the client sent. If the
  1994. client sent no name, generate one for the client.
  1995. </para></listitem>
  1996. <listitem><para>
  1997. <command>when-present</command> - Replace the name the client sent.
  1998. If the client sent no name, do not generate one.
  1999. </para></listitem>
  2000. <listitem><para>
  2001. <command>when-not-present</command> - Use the name the client sent.
  2002. If the client sent no name, generate one for the client.
  2003. </para></listitem>
  2004. </itemizedlist>
  2005. <note>
  2006. Note that formerly, this parameter was a boolean and permitted only values
  2007. of <command>true</command> and <command>false</command>. Boolean values
  2008. will still be accepted but may eventually be deprecated. A value of
  2009. <command>true</command> equates to <command>when-present</command>,
  2010. <command>false</command> equates to <command>never</command>.
  2011. </note>
  2012. For example, To instruct kea-dhcp6 to always generate the FQDN for a
  2013. client, set the parameter <command>replace-client-name</command> to
  2014. <command>always</command> as follows:
  2015. </para>
  2016. <screen>
  2017. "Dhcp6": {
  2018. "dhcp-ddns": {
  2019. <userinput>"replace-client-name": "always"</userinput>,
  2020. ...
  2021. },
  2022. ...
  2023. }
  2024. </screen>
  2025. <para>
  2026. The prefix used when generating a FQDN is specified by the
  2027. "generated-prefix" parameter. The default value is "myhost". To alter
  2028. its value, simply set it to the desired string:
  2029. </para>
  2030. <screen>
  2031. "Dhcp6": {
  2032. "dhcp-ddns": {
  2033. <userinput>"generated-prefix": "another.host"</userinput>,
  2034. ...
  2035. },
  2036. ...
  2037. }
  2038. </screen>
  2039. <para>
  2040. The suffix used when generating a FQDN or when qualifying a
  2041. partial name is specified by
  2042. the <command>qualifying-suffix</command> parameter. This
  2043. parameter has no default value, thus it is mandatory when
  2044. DDNS updates are enabled.
  2045. To set its value simply set it to the desired string:
  2046. </para>
  2047. <screen>
  2048. "Dhcp6": {
  2049. "dhcp-ddns": {
  2050. <userinput>"qualifying-suffix": "foo.example.org"</userinput>,
  2051. ...
  2052. },
  2053. ...
  2054. }
  2055. </screen>
  2056. </section>
  2057. <para>
  2058. When qualifying a partial name, kea-dhcp6 will construct a name with the
  2059. format:
  2060. </para>
  2061. <para>
  2062. [candidate-name].[qualifying-suffix].
  2063. </para>
  2064. <para>
  2065. where candidate-name is the partial name supplied in the REQUEST.
  2066. For example, if FQDN domain name value was "some-computer" and
  2067. qualifying-suffix "example.com", the generated FQDN would be:
  2068. </para>
  2069. <para>
  2070. some-computer.example.com.
  2071. </para>
  2072. <para>
  2073. When generating the entire name, kea-dhcp6 will construct name of the
  2074. format:
  2075. </para>
  2076. <para>
  2077. [generated-prefix]-[address-text].[qualifying-suffix].
  2078. </para>
  2079. <para>
  2080. where address-text is simply the lease IP address converted to a
  2081. hyphenated string. For example, if lease address is 3001:1::70E,
  2082. the qualifying suffix "example.com", and the default value is used for
  2083. <command>generated-prefix</command>, the generated FQDN would be:
  2084. </para>
  2085. <para>
  2086. myhost-3001-1--70E.example.com.
  2087. </para>
  2088. </section>
  2089. <section id="dhcp6-dhcp4o6-config">
  2090. <title>DHCPv4-over-DHCPv6 DHCPv6 side</title>
  2091. <para>
  2092. The support of DHCPv4-over-DHCPv6 transport
  2093. <ulink url="http://tools.ietf.org/html/rfc7341">RFC 7341</ulink>
  2094. is implemented using cooperating DHCPv4 and DHCPv6 servers.
  2095. This section is about the configuration of the DHCPv6 side
  2096. (the DHCPv4 side is described in <xref linkend="dhcp4-dhcp4o6-config"/>).
  2097. </para>
  2098. <note>
  2099. DHCPv4-over-DHCPv6 support is experimental and the details of
  2100. the inter-process communication can change: DHCPv4 and DHCPv6
  2101. should run the same version of Kea.
  2102. </note>
  2103. <para>
  2104. There is only one specific parameter for the DHCPv6 side:
  2105. <command>dhcp4o6-port</command> which specifies the first of the
  2106. two consecutive ports of the UDP sockets used for the communication
  2107. between the DHCPv6 and DHCPv4 servers (the DHCPv6 server is bound
  2108. to ::1 on <command>port</command> and connected to ::1 on
  2109. <command>port</command> + 1).
  2110. </para>
  2111. <para>
  2112. Two other configuration entries are in general required: unicast traffic
  2113. support (see <xref linkend="dhcp6-unicast"/>) and DHCP 4o6 server
  2114. address option (name "dhcp4o6-server-addr", code 88).
  2115. </para>
  2116. <para>
  2117. The following configuration was used during some tests:
  2118. <screen>
  2119. {
  2120. # DHCPv6 conf
  2121. "Dhcp6": {
  2122. "interfaces-config": {
  2123. "interfaces": [ "eno33554984/2001:db8:1:1::1" ]
  2124. },
  2125. "lease-database": {
  2126. "type": "memfile",
  2127. "name": "leases6"
  2128. },
  2129. "preferred-lifetime": 3000,
  2130. "valid-lifetime": 4000,
  2131. "renew-timer": 1000,
  2132. "rebind-timer": 2000,
  2133. "subnet6": [ {
  2134. "subnet": "2001:db8:1:1::/64",
  2135. "interface": "eno33554984",
  2136. "pools": [ { "pool": "2001:db8:1:1::1:0/112" } ]
  2137. } ],
  2138. <userinput>"dhcp4o6-port": 6767,
  2139. "option-data": [ {
  2140. "name": "dhcp4o6-server-addr",
  2141. "code": 88,
  2142. "space": "dhcp6",
  2143. "csv-format": true,
  2144. "data": "2001:db8:1:1::1"
  2145. } ]
  2146. </userinput>
  2147. },
  2148. "Logging": {
  2149. "loggers": [ {
  2150. "name": "kea-dhcp6",
  2151. "output_options": [ {
  2152. "output": "/tmp/kea-dhcp6.log"
  2153. } ],
  2154. "severity": "DEBUG",
  2155. "debuglevel": 0
  2156. } ]
  2157. }
  2158. }
  2159. </screen>
  2160. </para>
  2161. <note>
  2162. Relayed DHCPv4-QUERY DHCPv6 messages are not yet supported.
  2163. </note>
  2164. </section>
  2165. </section>
  2166. <!-- Host reservation is a large topic. There will be many subsections,
  2167. so it should be a section on its own. -->
  2168. <section id="host-reservation-v6">
  2169. <title>Host reservation in DHCPv6</title>
  2170. <para>There are many cases where it is useful to provide a configuration on
  2171. a per host basis. The most obvious one is to reserve specific, static IPv6
  2172. address or/and prefix for exclusive use by a given client (host) &dash; returning
  2173. client will get the same address or/and prefix every time and other clients will
  2174. never get that address. Note that there may be cases when the
  2175. new reservation has been made for the client for the address or prefix being
  2176. currently in use by another client. We call this situation a "conflict". The
  2177. conflicts get resolved automatically over time as described in the subsequent
  2178. sections. Once conflict is resolved, the client will keep receiving the reserved
  2179. configuration when it renews.</para>
  2180. <para>Another example when the host reservations are applicable is when a host
  2181. that has specific requirements, e.g. a printer that needs additional DHCP options
  2182. or a cable modem needs specific parameters. Yet another possible use case for
  2183. host reservation is to define unique names for hosts. Although not all of
  2184. the presented use cases are implemented yet, Kea software will support them
  2185. in the near future.</para>
  2186. <para>Hosts reservations are defined as parameters for each subnet. Each host
  2187. can be identified by either DUID or its hardware/MAC address. See
  2188. <xref linkend="mac-in-dhcpv6"/> for details. There is an optional
  2189. <command>reservations</command> array in the
  2190. <command>Subnet6</command> structure. Each element in that array
  2191. is a structure, that holds information about a single host. In
  2192. particular, such a structure has to have an identifier that
  2193. uniquely identifies a host. In DHCPv6 context, such an identifier
  2194. is a hardware (MAC) address or a DUID. Also, either one or more
  2195. addresses or prefixes should be specified. It is possible to
  2196. specify a hostname. Additional capabilities are planned.</para>
  2197. <para>The following example shows how to reserve addresses and prefixes
  2198. for specific hosts:
  2199. <screen>
  2200. "subnet6": [
  2201. {
  2202. "subnet": "2001:db8:1::/48",
  2203. "pools": [ { "pool": "2001:db8:1::/80" } ],
  2204. "pd-pools": [
  2205. {
  2206. "prefix": "2001:db8:1:8000::",
  2207. "prefix-len": 56,
  2208. "delegated-len": 64
  2209. }
  2210. ],
  2211. <userinput>"reservations": [
  2212. {
  2213. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  2214. "ip-addresses": [ "2001:db8:1::100" ]
  2215. },
  2216. {
  2217. "hw-address": "00:01:02:03:04:05",
  2218. "ip-addresses": [ "2001:db8:1::101" ]
  2219. },
  2220. {
  2221. "duid": "01:02:03:04:05:06:07:08:09:0A",
  2222. "ip-addresses": [ "2001:db8:1::102" ],
  2223. "prefixes": [ "2001:db8:2:abcd::/64" ],
  2224. "hostname": "foo.example.com"
  2225. }
  2226. ]</userinput>
  2227. }
  2228. ]
  2229. </screen>
  2230. This example makes 3 reservations. The first one reserves 2001:db8:1::100 address
  2231. for the client using DUID 01:02:03:04:05:0A:0B:0C:0D:0E. The second one
  2232. also reserves an address, but does so using MAC or hardware address, rather than
  2233. DUID. The third example is most advanced. It reserves an address, a prefix and
  2234. a hostname at the same time.
  2235. </para>
  2236. <para>Note that DHCPv6 allows for a single client to lease multiple addresses
  2237. and multiple prefixes at the same time. In the upcoming Kea releases, it will
  2238. be possible to have multiple addresses and prefixes reserved for a single
  2239. host. Therefore <command>ip-addresses</command> and <command>prefixes</command>
  2240. are plural and are actually arrays. As of 0.9.1 having more than one IPv6
  2241. address or prefix is only partially supported.</para>
  2242. <para>Making a reservation for a mobile host that may visit multiple subnets
  2243. requires a separate host definition in each subnet it is expected to visit.
  2244. It is not allowed to define multiple host definitions with the same hardware
  2245. address in a single subnet. It is a valid configuration, if such definitions
  2246. are specified in different subnets, though. The reservation for a given host
  2247. should include only one identifier, either DUID or hardware address. Defining
  2248. both for the same host is considered a configuration error, but as of 0.9.1
  2249. beta, it is not rejected.
  2250. </para>
  2251. <para>Adding host reservation incurs a performance penalty. In principle,
  2252. when the server that does not support host reservation responds to a query,
  2253. it needs to check whether there is a lease for a given address being
  2254. considered for allocation or renewal. The server that also supports host
  2255. reservation, has to perform additional checks: not only if the address is
  2256. currently used (if there is a lease for it), but also whether the address
  2257. could be used by someone else (if there is a reservation for it). That
  2258. additional check incurs performance penalty.</para>
  2259. <section id="reservation6-types">
  2260. <title>Address/prefix reservation types</title>
  2261. <para>In a typical scenario there's an IPv6 subnet defined with a certain
  2262. part of it dedicated for dynamic address allocation by the DHCPv6
  2263. server. There may be an additional address space defined for prefix
  2264. delegation. Those dynamic parts are referred to as dynamic pools, address
  2265. and prefix pools or simply pools. In principle, the host reservation can
  2266. reserve any address or prefix that belongs to the subnet. The reservations
  2267. that specify an address that belongs to configured pools are called
  2268. <command>in-pool reservations</command>. In contrast, those that do not
  2269. belong to dynamic pools are called <command>out-of-pool
  2270. reservations</command>. There is no formal difference in the reservation
  2271. syntax. As of 0.9.1, both reservation types are handled
  2272. uniformly. However, upcoming releases may offer improved performance if
  2273. there are only out-of-pool reservations as the server will be able to skip
  2274. reservation checks when dealing with existing leases. Therefore, system
  2275. administrators are encouraged to use out-of-pool reservations, if
  2276. possible.</para>
  2277. </section>
  2278. <section id="reservation6-conflict">
  2279. <title>Conflicts in DHCPv6 reservations</title>
  2280. <para>As reservations and lease information are stored in different places,
  2281. conflicts may arise. Consider the following series of events. The server
  2282. has configured the dynamic pool of addresses from the range of 2001:db8::10
  2283. to 2001:db8::20. Host A requests an address and gets 2001:db8::10. Now the
  2284. system administrator decides to reserve an address for host B. He decides
  2285. to reserve 2001:db8::10 for that purpose. In general, reserving an address
  2286. that is currently assigned to someone else is not recommended, but there
  2287. are valid use cases where such an operation is warranted.</para>
  2288. <para>The server now has a conflict to resolve. Let's analyze the
  2289. situation here. If host B boots up and request an address, the server is
  2290. not able to assign the reserved address 2001:db8::10. A naive approach
  2291. would to be immediately remove the lease for host A and create a new one
  2292. for host B. That would not solve the problem, though, because as soon as
  2293. host B get the address, it will detect that the address is already in use
  2294. by someone else (host A) and would send Decline. Therefore in this
  2295. situation, the server has to temporarily assign a different address from the
  2296. dynamic pool (not matching what has been reserved) to host B.</para>
  2297. <para>When the host A renews its address, the server will discover that
  2298. the address being renewed is now reserved for someone else (host
  2299. B). Therefore the server will remove the lease for 2001:db8::10 and select
  2300. a new address and will create a new lease for it. It will send two
  2301. addresses in its response: the old address with lifetimes set to 0 to
  2302. explicitly indicate that it is no longer valid and a new address with
  2303. non-zero lifetimes. When the host B renews its temporarily assigned
  2304. address, the server will detect that the existing lease does not match
  2305. reservation, so it will release the current address host B has and will
  2306. create a new lease matching the reservation. Similar as before, the server
  2307. will send two addresses: the temporarily assigned one with zeroed
  2308. lifetimes, and the new one that matches reservation with proper lifetimes
  2309. set.</para>
  2310. <para>This recovery will succeed, even if other hosts will attempt to get
  2311. the reserved address. Had the host C requested address 2001:db8::10 after
  2312. the reservation was made, the server will propose a different address.</para>
  2313. <para>This recovery mechanism allows the server to fully recover from a
  2314. case where reservations conflict with existing leases. This procedure
  2315. takes time and will roughly take as long as renew-timer value specified.
  2316. The best way to avoid such recovery is to not define new reservations that
  2317. conflict with existing leases. Another recommendation is to use
  2318. out-of-pool reservations. If the reserved address does not belong to a
  2319. pool, there is no way that other clients could get this address (note that
  2320. having multiple reservations for the same address is not allowed).
  2321. </para>
  2322. </section>
  2323. <section id="reservation6-hostname">
  2324. <title>Reserving a hostname</title>
  2325. <para>When the reservation for the client includes the <command>hostname
  2326. </command>, the server will assign this hostname to the client and send
  2327. it back in the Client FQDN, if the client sent the FQDN option to the
  2328. server. The reserved hostname always takes precedence over the hostname
  2329. supplied by the client (via the FQDN option) or the autogenerated
  2330. (from the IPv6 address) hostname.</para>
  2331. <para>The server qualifies the reserved hostname with the value
  2332. of the <command>qualifying-suffix</command> parameter. For example, the
  2333. following subnet configuration:
  2334. <screen>
  2335. "subnet6": [
  2336. {
  2337. "subnet": "2001:db8:1::/48",
  2338. "pools": [ { "pool": "2001:db8:1::/80" } ],
  2339. "reservations": [
  2340. {
  2341. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  2342. "ip-addresses": [ "2001:db8:1::100" ]
  2343. "hostname": "alice-laptop"
  2344. }
  2345. ]
  2346. }
  2347. ],
  2348. "dhcp-ddns": {
  2349. "enable-updates": true,
  2350. "qualifying-suffix": "example.isc.org."
  2351. }
  2352. </screen>
  2353. will result in assigning the "alice-laptop.example.isc.org." hostname to the
  2354. client using the DUID "01:02:03:04:05:0A:0B:0C:0D:0E". If the <command>qualifying-suffix
  2355. </command> is not specified, the default (empty) value will be used, and
  2356. in this case the value specified as a <command>hostname</command> will
  2357. be treated as fully qualified name. Thus, by leaving the
  2358. <command>qualifying-suffix</command> empty it is possible to qualify
  2359. hostnames for the different clients with different domain names:
  2360. <screen>
  2361. "subnet6": [
  2362. {
  2363. "subnet": "2001:db8:1::/48",
  2364. "pools": [ { "pool": "2001:db8:1::/80" } ],
  2365. "reservations": [
  2366. {
  2367. "duid": "01:02:03:04:05:0A:0B:0C:0D:0E",
  2368. "ip-addresses": [ "2001:db8:1::100" ]
  2369. "hostname": "mark-desktop.example.org."
  2370. }
  2371. ]
  2372. }
  2373. ],
  2374. "dhcp-ddns": {
  2375. "enable-updates": true,
  2376. }
  2377. </screen>
  2378. will result in assigning the "mark-desktop.example.org." hostname to the
  2379. client using the DUID "01:02:03:04:05:0A:0B:0C:0D:0E".
  2380. </para>
  2381. </section>
  2382. <section id="reservation6-options">
  2383. <title>Including specific DHCPv6 options in reservations</title>
  2384. <para>Kea 1.1.0 introduced the ability to specify options on a
  2385. per host basis. The options follow the same rules as any other
  2386. options. These can be standard options (see <xref
  2387. linkend="dhcp6-std-options" />), custom options (see <xref
  2388. linkend="dhcp6-custom-options"/>) or vendor specific options
  2389. (see <xref linkend="dhcp6-vendor-opts" />). The following
  2390. example showcases how standard options can be defined.</para>
  2391. <screen>
  2392. "reservations": [
  2393. {
  2394. "duid": "01:02:03:05:06:07:08",
  2395. "ip-addresses": [ "2001:db8:1::2" ],
  2396. <userinput>"option-data": [
  2397. {
  2398. "option-data": [ {
  2399. "name": "dns-servers",
  2400. "data": "3000:1::234"
  2401. },
  2402. {
  2403. "name": "nis-servers",
  2404. "data": "3000:1::234"
  2405. }
  2406. } ]</userinput>
  2407. } ]</screen>
  2408. <para>Vendor specific options can be reserved in a similar manner:</para>
  2409. <screen>
  2410. "reservations": [
  2411. {
  2412. "duid": "aa:bb:cc:dd:ee:ff",
  2413. "ip-addresses": [ "2001:db8::1" ],
  2414. <userinput>"option-data": [
  2415. {
  2416. "name": "vendor-opts",
  2417. "data": 4491"
  2418. },
  2419. {
  2420. "name": "tftp-servers",
  2421. "space": "vendor-4491",
  2422. "data": "3000:1::234"
  2423. } ]</userinput>
  2424. } ]</screen>
  2425. <para>
  2426. Options defined on host level have the highest priority. In other words,
  2427. if there are options defined with the same type on global, subnet, class and
  2428. host level, the host specific values will be used.
  2429. </para>
  2430. </section>
  2431. <section id="reservations6-mysql">
  2432. <title>Storing host reservations in MySQL</title>
  2433. <para>
  2434. It is possible to store host reservations in MySQL. See <xref
  2435. linkend="hosts6-storage" /> for information how to configure Kea to use
  2436. reservations stored in MySQL. Kea does not provide any dedicated tools
  2437. for managing MySQL reservations. See Kea wiki <ulink
  2438. url="http://kea.isc.org/wiki/HostReservationsHowTo" /> for detailed
  2439. information and examples of how reservations can be inserted into the
  2440. database.
  2441. </para>
  2442. </section>
  2443. <section id="reservations6-pgsql">
  2444. <title>Storing host reservations in PostgreSQL</title>
  2445. <para>Kea currently does not support storing reservations in
  2446. PostgreSQL, but this feature is planned for Kea 1.1.0.</para>
  2447. </section>
  2448. <section id="reservations6-cql">
  2449. <title>Storing host reservations in CQL (Cassandra)</title>
  2450. <para>Kea currently does not support storing reservations in
  2451. Cassandra (CQL).</para>
  2452. </section>
  2453. <section id="reservations6-tuning">
  2454. <title>Fine Tuning IPv6 Host Reservation</title>
  2455. <para>Host reservation capability introduces additional restrictions for the
  2456. allocation engine during lease selection and renewal. In particular, three
  2457. major checks are necessary. First, when selecting a new lease, it is not
  2458. sufficient for a candidate lease to not be used by another DHCP client. It
  2459. also must not be reserved for another client. Second, when renewing a lease,
  2460. additional check must be performed whether the address being renewed is not
  2461. reserved for another client. Finally, when a host renews an address or a
  2462. prefix, the server has to check whether there's a reservation for this host,
  2463. so the existing (dynamically allocated) address should be revoked and the
  2464. reserved one be used instead.</para>
  2465. <para>Some of those checks may be unnecessary in certain deployments. Not
  2466. performing them may improve performance. The Kea server provides the
  2467. <command>reservation-mode</command> configuration parameter to select the
  2468. types of reservations allowed for the particular subnet. Each reservation
  2469. type has different constraints for the checks to be performed by the
  2470. server when allocating or renewing a lease for the client.
  2471. Allowed values are:
  2472. <itemizedlist>
  2473. <listitem><simpara> <command>all</command> - enables all host reservation
  2474. types. This is the default value. This setting is the safest and the most
  2475. flexible. It allows in-pool and out-of-pool reservations. As all checks
  2476. are conducted, it is also the slowest.
  2477. </simpara></listitem>
  2478. <listitem><simpara> <command>out-of-pool</command> - allows only out of
  2479. pool host reservations. With this setting in place, the server may assume
  2480. that all host reservations are for addresses that do not belong to the
  2481. dynamic pool. Therefore it can skip the reservation checks when dealing
  2482. with in-pool addresses, thus improving performance. Do not use this mode
  2483. if any of your reservations use in-pool address. Caution is advised when
  2484. using this setting. Kea 0.9.1 does not sanity check the reservations against
  2485. <command>reservation-mode</command>. Misconfiguration may cause problems.
  2486. </simpara></listitem>
  2487. <listitem><simpara>
  2488. <command>disabled</command> - host reservation support is disabled. As there
  2489. are no reservations, the server will skip all checks. Any reservations defined
  2490. will be completely ignored. As the checks are skipped, the server may
  2491. operate faster in this mode.
  2492. </simpara></listitem>
  2493. </itemizedlist>
  2494. </para>
  2495. <para>
  2496. An example configuration that disables reservation looks like follows:
  2497. <screen>
  2498. "Dhcp6": {
  2499. "subnet6": [
  2500. {
  2501. "subnet": "2001:db8:1::/64",
  2502. <userinput>"reservation-mode": "disabled"</userinput>,
  2503. ...
  2504. }
  2505. ]
  2506. }
  2507. </screen>
  2508. </para>
  2509. <para>Another aspect of the host reservations are different types of
  2510. identifiers. Currently (June 2016) Kea supports two types of identifiers
  2511. in DHCPv6: hw-address and duid, but more identifier types
  2512. are likely to be added in the future. This is beneficial from a
  2513. usability perspective. However, there is a drawback. For each incoming
  2514. packet Kea has to to extract each identifier type and then query the
  2515. database to see if there's a reservation done by this particular
  2516. identifier. If there is not, the next identifier is extracted and next
  2517. query is issued. This process continues until either a reservation is
  2518. found or all identifier types have been checked. Over time with an increasing
  2519. number of supported identifier types, Kea would become slower and
  2520. slower.</para>
  2521. <para>To address this problem, a parameter called
  2522. <command>host-reservation-identifiers</command> has been introduced. It
  2523. takes a list of identifier types as a parameter. Kea will check only those
  2524. identifier types enumerated in host-reservation-identifiers. From the
  2525. performance perspective the number of identifier types should be kept to
  2526. minimum, ideally limited to one. If your deployment uses several
  2527. reservation types, please enumerate them from most to least frequently
  2528. used as this increases the chances of Kea finding the reservation using the
  2529. fewest number of queries. An example of host reservation identifiers looks
  2530. as follows:
  2531. <screen>
  2532. <userinput>"host-reservation-identifiers": [ "duid", "hw-address" ],</userinput>
  2533. "subnet6": [
  2534. {
  2535. "subnet": "2001:db8:1::/64",
  2536. ...
  2537. }
  2538. ]</screen>
  2539. </para>
  2540. <para>
  2541. If not specified, the default value is:
  2542. <screen>
  2543. <userinput>"host-reservation-identifiers": [ "hw-address", "duid" ]</userinput>
  2544. </screen>
  2545. </para>
  2546. <!-- see CfgHostOperations::createConfig6() in
  2547. src/lib/dhcpsrv/cfg_host_operations.cc -->
  2548. </section>
  2549. <!-- @todo: add support for per IA reservation (that specifies IAID in
  2550. the ip-addresses and prefixes) -->
  2551. </section>
  2552. <!-- end of host reservations section -->
  2553. <section id="dhcp6-serverid">
  2554. <title>Server Identifier in DHCPv6</title>
  2555. <para>The DHCPv6 protocol uses a "server identifier" (also known
  2556. as a DUID) for clients to be able to discriminate between several
  2557. servers present on the same link.
  2558. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>
  2559. defines three DUID types: DUID-LLT, DUID-EN and DUID-LL.
  2560. <ulink url="http://tools.ietf.org/html/rfc6355">RFC 6355</ulink>
  2561. also defines DUID-UUID. Future specifications may introduce new
  2562. DUID types.</para>
  2563. <para>Kea DHCPv6 server generates a server identifier once, upon
  2564. the first startup, and stores it in a file. This identifier isn't
  2565. modified across restarts of the server (stable identifier).</para>
  2566. <para>Kea follows recommendation from
  2567. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>
  2568. to use DUID-LLT as a default server identifier. However, we have
  2569. received reports that some deployments require different DUID
  2570. types, and there is a need to administratively select both DUID
  2571. type and/or its contents.</para>
  2572. <para>The server identifier can be configured using parameters
  2573. within the <command>server-id</command> map element in the global
  2574. scope of the Kea configuration file. The following example
  2575. demonstrates how to select DUID-EN as a server identifier:
  2576. <screen>
  2577. "Dhcp6": {
  2578. "server-id": {
  2579. "type": "EN"
  2580. },
  2581. ...
  2582. }
  2583. </screen>
  2584. </para>
  2585. <para>Currently supported values for <command>type</command>
  2586. parameter are: "LLT", "EN" and "LL", for DUID-LLT, DUID-EN and
  2587. DUID-LL respectively.</para>
  2588. <para>When a new DUID type is selected the server will generate its
  2589. value and replace any existing DUID in the file. The server will
  2590. use the new server identifier in all future interactions with the
  2591. clients.</para>
  2592. <note><para>If the new server identifier is created after some clients
  2593. have obtained their leases, the clients using old identifier will not
  2594. be able to renew the leases. The server will ignore messages
  2595. containing the old server identifier. Clients will continue sending
  2596. Renew until they transition to rebinding state. In this state they
  2597. will start sending Rebind messages to multicast address and without
  2598. a server identifier. The server will respond to the Rebind messages
  2599. with a new server identifier and the clients will associate the
  2600. new server identifier with their leases. Although the clients will
  2601. be able to keep their leases and will eventually learn the new server
  2602. identifier, this will be at the cost of increased number of renewals
  2603. and multicast traffic due to a need to rebind. Therefore it is
  2604. recommended to avoid modification of the server identifier type
  2605. and its value if the server has already assigned leases and these
  2606. leases are still valid.</para></note>
  2607. <para>There are cases when an administrator needs to explicitly
  2608. specify a DUID value, rather than allow the server to generate it.
  2609. The following example demonstrates how to explicitly set all
  2610. components of a DUID-LLT.
  2611. <screen>
  2612. "Dhcp6": {
  2613. "server-id": {
  2614. "type": "LLT",
  2615. "htype": 8,
  2616. "identifier": "A65DC7410F05",
  2617. "time": 2518920166
  2618. },
  2619. ...
  2620. }
  2621. </screen>
  2622. where:
  2623. <itemizedlist>
  2624. <listitem><simpara><command>htype</command> is a 16-bit unsigned value
  2625. specifying hardware type,</simpara></listitem>
  2626. <listitem><simpara><command>identifier</command> is a link layer
  2627. address, specified as a string of hexadecimal digits,</simpara>
  2628. </listitem>
  2629. <listitem><simpara><command>time</command> is a 32-bit unsigned
  2630. time value.</simpara></listitem>
  2631. </itemizedlist>
  2632. </para>
  2633. <para>The hexadecimal representation of the DUID generated as a result
  2634. of the configuration specified above will be:
  2635. <screen>
  2636. 00:01:00:08:96:23:AB:E6:A6:5D:C7:41:0F:05
  2637. ------------------------------------------
  2638. |type|htype| time | identifier |
  2639. </screen>
  2640. </para>
  2641. <para>It is allowed to use special value of 0 for "htype" and "time",
  2642. which indicates that the server should use ANY value for these
  2643. components. If the server already uses a DUID-LLT it will use the
  2644. values from this DUID. If the server uses a DUID of a different type
  2645. or doesn't use any DUID yet, it will generate these values.
  2646. Similarly, if the "identifier" is assigned an empty string, the
  2647. value of the identifier will be generated. Omitting any of these
  2648. parameters is equivalent to setting them to those special values.
  2649. </para>
  2650. <para>For example, the following configuration:
  2651. <screen>
  2652. "Dhcp6": {
  2653. "server-id": {
  2654. "type": "LLT",
  2655. "htype": 0,
  2656. "identifier": "",
  2657. "time": 2518920166
  2658. },
  2659. ...
  2660. }
  2661. </screen>
  2662. indicates that the server should use ANY link layer address and
  2663. hardware type. If the server is already using DUID-LLT it will
  2664. use link layer address and hardware type from the existing DUID.
  2665. If the server is not using any DUID yet, it will use link layer
  2666. address and hardware type from one of the available network
  2667. interfaces. The server will use explicit value of time. If it
  2668. is different than a time value present in the currently used
  2669. DUID, this value will be replaced. This will effectively cause
  2670. modification of the current server identifier.
  2671. </para>
  2672. <para>
  2673. The following example demonstrates an explicit configuration of
  2674. a DUID-EN:
  2675. <screen>
  2676. "Dhcp6": {
  2677. "server-id": {
  2678. "type": "EN",
  2679. "enterprise-id": 2495,
  2680. "identifier": "87ABEF7A5BB545"
  2681. },
  2682. ...
  2683. }
  2684. </screen>
  2685. where:
  2686. <itemizedlist>
  2687. <listitem><simpara><command>enterprise-id</command> is a 32-bit
  2688. unsigned value holding enterprise number,</simpara></listitem>
  2689. <listitem><simpara><command>identifier</command> is a variable
  2690. length identifier within DUID-EN.</simpara></listitem>
  2691. </itemizedlist>
  2692. </para>
  2693. <para>
  2694. The hexadecimal representation of the DUID-EN created according to
  2695. the configuration above is:
  2696. <screen>
  2697. 00:02:00:00:09:BF:87:AB:EF:7A:5B:B5:45
  2698. --------------------------------------
  2699. |type| ent-id | identifier |
  2700. </screen>
  2701. </para>
  2702. <para>As in the case of the DUID-LLT, special values can be used for the
  2703. configuration of the DUID-EN. If the "enterprise-id" is 0, the server
  2704. will use a value from the existing DUID-EN. If the server is not using
  2705. any DUID or the existing DUID has a different type, the ISC enterprise
  2706. id will be used. When an empty string is used for "identifier", the
  2707. identifier from the existing DUID-EN will be used. If the server is
  2708. not using any DUID-EN the new 6-bytes long identifier will be generated.
  2709. </para>
  2710. <para>DUID-LL is configured in the same way as DUID-LLT with an exception
  2711. that the <command>time</command> parameter has no effect for DUID-LL,
  2712. because this DUID type only comprises a hardware type and link layer
  2713. address. The following example demonstrates how to configure DUID-LL:
  2714. <screen>
  2715. "Dhcp6": {
  2716. "server-id": {
  2717. "type": "LL",
  2718. "htype": 8,
  2719. "identifier": "A65DC7410F05"
  2720. },
  2721. ...
  2722. }
  2723. </screen>
  2724. </para>
  2725. <para>
  2726. which will result in the following server identifier:
  2727. <screen>
  2728. 00:03:00:08:A6:5D:C7:41:0F:05
  2729. ------------------------------
  2730. |type|htype| identifier |
  2731. </screen>
  2732. </para>
  2733. <para>Server stores a generated server identifier in the following
  2734. location: <userinput>[kea-install-dir]/var/kea/kea-dhcp6-serverid
  2735. </userinput>.
  2736. </para>
  2737. <para>In some uncommon deployments where no stable storage is
  2738. available, it is desired to configure the server to not try to
  2739. store the server identifier on the stable storage. It is controlled
  2740. by the value of <command>persist</command> boolean parameter:
  2741. <screen>
  2742. "Dhcp6": {
  2743. "server-id": {
  2744. "type": "EN",
  2745. "enterprise-id": 2495,
  2746. "identifier": "87ABEF7A5BB545",
  2747. "persist": false
  2748. },
  2749. ...
  2750. }
  2751. </screen>
  2752. </para>
  2753. <para>The default value of the "persist" parameter is
  2754. <command>true</command> which configures the server to store the
  2755. server identifier on a disk.</para>
  2756. <para>In the example above, the server is configured to not store
  2757. the generated server identifier on a disk. But, if the server
  2758. identifier is not modified in the configuration the same value
  2759. will be used after server restart, because entire server
  2760. identifier is explicitly specified in a configuration.</para>
  2761. </section>
  2762. <section id="stateless-dhcp6">
  2763. <title>Stateless DHCPv6 (Information-Request Message)</title>
  2764. <para>Typically DHCPv6 is used to assign both addresses and options. These
  2765. assignments (leases) have state that changes over time, hence
  2766. their name, stateful. DHCPv6 also supports a stateless mode,
  2767. where clients request configuration options only. This mode is
  2768. considered lightweight from the server perspective, as it does not require
  2769. any state tracking; hence its name.</para>
  2770. <para>The Kea server supports stateless mode. Clients can send
  2771. Information-Request messages and the server will send back
  2772. answers with the requested options (providing the options are
  2773. available in the server configuration). The server will attempt to
  2774. use per-subnet options first. If that fails - for whatever reason - it
  2775. will then try to provide options defined in the global scope.</para>
  2776. <para>Stateless and stateful mode can be used together. No special
  2777. configuration directives are required to handle this. Simply use the
  2778. configuration for stateful clients and the stateless clients will get
  2779. just options they requested.</para>
  2780. <para>This usage of global options allows for an interesting case.
  2781. It is possible to run a server that provides just options and no
  2782. addresses or prefixes. If the options have the same value in each
  2783. subnet, the configuration can define required options in the global
  2784. scope and skip subnet definitions altogether. Here's a simple example of
  2785. such a configuration:
  2786. <screen>
  2787. "Dhcp6": {
  2788. "interfaces-config": {
  2789. "interfaces": [ "ethX" ]
  2790. },
  2791. <userinput>"option-data": [ {
  2792. "name": "dns-servers",
  2793. "data": "2001:db8::1, 2001:db8::2"
  2794. } ]</userinput>,
  2795. "lease-database": { "type": "memfile" }
  2796. }
  2797. </screen>
  2798. This very simple configuration will provide DNS server information
  2799. to all clients in the network, regardless of their location. Note the
  2800. specification of the memfile lease database: this is required since,
  2801. as of version 0.9.1, Kea requires a lease database to be specified
  2802. even if it is not used.</para>
  2803. </section>
  2804. <section id="dhcp6-rfc7550">
  2805. <title>Support for RFC 7550</title>
  2806. <para>The <ulink url="http://tools.ietf.org/html/rfc7550">RFC 7550</ulink>
  2807. has introduced some changes to the DHCPv6 protocol to resolve a few issues
  2808. with the coexistence of multiple stateful options in the messages sent
  2809. between the clients and servers.</para>
  2810. <para>The typical example is when the client, such as a requesting
  2811. router, requests an allocation of both addresses and prefixes when
  2812. it performs the 4-way (SARR) exchange with the server. If the
  2813. server is not configured to allocate any prefixes but it can allocate
  2814. some addresses, it will respond with the IA_NA(s) containing allocated
  2815. addresses and the IA_PD(s) containing the NoPrefixAvail status code. If
  2816. the client can operate without prefixes it may transition to the
  2817. 'bound' state when it sends Renew/Rebind messages to the server,
  2818. according to the T1 and T2 times, to extend the lifetimes of the
  2819. allocated addresses. If the client is still interested in obtaining
  2820. prefixes from the server it may also include IA_PD in the Renew/Rebind
  2821. to request allocation of the prefixes. If the server still cannot
  2822. allocate the prefixes, it will respond with the IA_PD(s) containing
  2823. NoPrefixAvail status code. However, if the server can now allocate
  2824. the prefixes it will do so, and send them in the IA_PD(s) to the client.
  2825. Allocation of leases during the Renew/Rebind was not supported in the
  2826. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>
  2827. and <ulink url="http://tools.ietf.org/html/rfc3633">RFC 3633</ulink>,
  2828. and has been introduced in
  2829. <ulink url="http://tools.ietf.org/html/rfc7550">RFC 7550</ulink>.
  2830. Kea supports this new behavior and it doesn't provide any configuration
  2831. mechanisms to disable it.
  2832. </para>
  2833. <para>
  2834. The following are the other behaviors specified in the
  2835. <ulink url="http://tools.ietf.org/html/rfc7550">RFC 7550</ulink>
  2836. supported by the Kea DHCPv6 server:
  2837. <itemizedlist>
  2838. <listitem><simpara>set T1/T2 timers to the same value for all
  2839. stateful (IA_NA and IA_PD) options to facilitate renewal of all
  2840. client's leases at the same time (in a single message exchange),
  2841. </simpara></listitem>
  2842. <listitem><simpara>NoAddrsAvail and NoPrefixAvail status codes
  2843. are placed in the IA_NA and IA_PD options in the Advertise message,
  2844. rather than as the top level options.</simpara></listitem>
  2845. </itemizedlist>
  2846. </para>
  2847. </section>
  2848. <section id="dhcp6-relay-override">
  2849. <title>Using specific relay agent for a subnet</title>
  2850. <para>
  2851. The relay has to have an interface connected to the link on which
  2852. the clients are being configured. Typically the relay has a global IPv6
  2853. address configured on the interface that belongs to the subnet from which
  2854. the server will assign addresses. In the typical case, the
  2855. server is able to use the IPv6 address inserted by the relay (in the link-addr
  2856. field in RELAY-FORW message) to select the appropriate subnet.
  2857. </para>
  2858. <para>
  2859. However, that is not always the case. The relay
  2860. address may not match the subnet in certain deployments. This
  2861. usually means that there is more than one subnet allocated for a given
  2862. link. The two most common examples where this is the case are long lasting
  2863. network renumbering (where both old and new address space is still being
  2864. used) and a cable network. In a cable network both cable modems and the
  2865. devices behind them are physically connected to the same link, yet
  2866. they use distinct addressing. In such case, the DHCPv6 server needs
  2867. additional information (like the value of interface-id option or IPv6
  2868. address inserted in the link-addr field in RELAY-FORW message) to
  2869. properly select an appropriate subnet.
  2870. </para>
  2871. <para>
  2872. The following example assumes that there is a subnet 2001:db8:1::/64
  2873. that is accessible via relay that uses 3000::1 as its IPv6 address.
  2874. The server will be able to select this subnet for any incoming packets
  2875. that came from a relay that has an address in 2001:db8:1::/64 subnet.
  2876. It will also select that subnet for a relay with address 3000::1.
  2877. <screen>
  2878. "Dhcp6": {
  2879. "subnet6": [
  2880. {
  2881. "subnet": "2001:db8:1::/64",
  2882. "pools": [
  2883. {
  2884. "pool": "2001:db8:1::1-2001:db8:1::ffff"
  2885. }
  2886. ],
  2887. <userinput>"relay": {
  2888. "ip-address": "3000::1"
  2889. }</userinput>
  2890. }
  2891. ]
  2892. }
  2893. </screen>
  2894. </para>
  2895. </section>
  2896. <section id="dhcp6-client-class-relay">
  2897. <title>Segregating IPv6 clients in a cable network</title>
  2898. <para>
  2899. In certain cases, it is useful to mix relay address information,
  2900. introduced in <xref linkend="dhcp6-relay-override"/> with client
  2901. classification, explained in <xref linkend="classify"/>.
  2902. One specific example is a cable network, where typically modems
  2903. get addresses from a different subnet than all devices connected
  2904. behind them.
  2905. </para>
  2906. <para>
  2907. Let's assume that there is one CMTS (Cable Modem Termination System)
  2908. with one CM MAC (a physical link that modems are connected to).
  2909. We want the modems to get addresses from the 3000::/64 subnet,
  2910. while everything connected behind modems should get addresses from
  2911. another subnet (2001:db8:1::/64). The CMTS that acts as a relay
  2912. an uses address 3000::1. The following configuration can serve
  2913. that configuration:
  2914. <screen>
  2915. "Dhcp6": {
  2916. "subnet6": [
  2917. {
  2918. "subnet": "3000::/64",
  2919. "pools": [
  2920. { "pool": "3000::2 - 3000::ffff" }
  2921. ],
  2922. <userinput>"client-class": "VENDOR_CLASS_docsis3.0",
  2923. "relay": {
  2924. "ip-address": "3000::1"
  2925. }</userinput>
  2926. },
  2927. {
  2928. "subnet": "2001:db8:1::/64",
  2929. "pools": [
  2930. {
  2931. "pool": "2001:db8:1::1-2001:db8:1::ffff"
  2932. }
  2933. ],
  2934. <userinput>"relay": {
  2935. "ip-address": "3000::1"
  2936. }</userinput>
  2937. }
  2938. ]
  2939. }
  2940. </screen>
  2941. </para>
  2942. </section>
  2943. <section id="mac-in-dhcpv6">
  2944. <title>MAC/Hardware addresses in DHCPv6</title>
  2945. <para>MAC/hardware addresses are available in DHCPv4 messages
  2946. from the clients and administrators
  2947. frequently use that information to perform certain tasks, like per host
  2948. configuration, address reservation for specific MAC addresses and other.
  2949. Unfortunately, the DHCPv6 protocol does not provide any completely reliable way
  2950. to retrieve that information. To mitigate that issue a number of mechanisms
  2951. have been implemented in Kea that attempt to gather that information. Each
  2952. of those mechanisms works in certain cases, but may fail in other cases.
  2953. Whether the mechanism works or not in the particular deployment is
  2954. somewhat dependent on the network topology and the technologies used.</para>
  2955. <para>Kea allows for configuration which of the supported methods should be
  2956. used and in which order. This configuration may be considered a fine tuning
  2957. of the DHCP deployment. In a typical deployment the default
  2958. value of <command>"any"</command> is sufficient and there is no
  2959. need to select specific methods. Changing the value of this parameter
  2960. is the most useful in cases when an administrator wants to disable
  2961. certain method, e.g. if the administrator trusts the network infrastructure
  2962. more than the information provided by the clients themselves, the
  2963. administrator may prefer information provided by the relays over that
  2964. provided by the clients. The format of this parameter is as follows:
  2965. <screen>
  2966. "Dhcp6": {
  2967. <userinput>"mac-sources": [ "method1", "method2", "method3", ... ]</userinput>,
  2968. "subnet6": [ ... ],
  2969. ...
  2970. }
  2971. </screen>
  2972. When not specified, a special value of <emphasis>any</emphasis> is used, which
  2973. instructs the server to attempt to use all the methods in sequence and use
  2974. value returned by the first one that succeeds.</para>
  2975. <para>Supported methods are:
  2976. <itemizedlist>
  2977. <listitem>
  2978. <simpara><command>any</command> - not an actual method, just a keyword that
  2979. instructs Kea to try all other methods and use the first one that succeeds.
  2980. This is the default operation if no <command>mac-sources</command> are defined.
  2981. </simpara>
  2982. </listitem>
  2983. <listitem>
  2984. <simpara><command>raw</command> - In principle, a DHCPv6 server could use raw
  2985. sockets to receive incoming traffic and extract MAC/hardware address
  2986. information. This is currently not implemented for DHCPv6 and this value has
  2987. no effect.
  2988. </simpara>
  2989. </listitem>
  2990. <listitem>
  2991. <simpara><command>duid</command> - DHCPv6 uses DUID identifiers instead of
  2992. MAC addresses. There are currently four DUID types defined, with two of them
  2993. (DUID-LLT, which is the default one and DUID-LL) convey MAC address information.
  2994. Although RFC 3315 forbids it, it is possible to parse those DUIDs and extract
  2995. necessary information from them. This method is not completely reliable, as
  2996. clients may use other DUID types, namely DUID-EN or DUID-UUID.
  2997. </simpara>
  2998. </listitem>
  2999. <listitem>
  3000. <simpara><command>ipv6-link-local</command> - Another possible acquisition
  3001. method comes from the source IPv6 address. In typical usage, clients are
  3002. sending their packets from IPv6 link-local addresses. There's a good chance
  3003. that those addresses are based on EUI-64, which contains MAC address. This
  3004. method is not completely reliable, as clients may use other link-local address
  3005. types. In particular, privacy extensions, defined in RFC 4941, do not use
  3006. MAC addresses. Also note that successful extraction requires that the
  3007. address's u-bit must be set to 1 and its g-bit set to 0, indicating that it
  3008. is an interface identifier as per
  3009. <ulink url="http://tools.ietf.org/html/rfc2373#section-2.5.1">
  3010. RFC 2373, section 2.5.1</ulink>.
  3011. </simpara>
  3012. </listitem>
  3013. <listitem>
  3014. <simpara><command>client-link-addr-option</command> - One extension defined
  3015. to alleviate missing MAC issues is client link-layer address option, defined
  3016. in <ulink url="http://tools.ietf.org/html/rfc6939">RFC 6939</ulink>. This is
  3017. an option that is inserted by a relay and contains information about client's
  3018. MAC address. This method requires a relay agent that supports the option and
  3019. is configured to insert it. This method is useless for directly connected
  3020. clients. This parameter can also be specified as <command>rfc6939</command>,
  3021. which is an alias for <command>client-link-addr-option</command>.
  3022. </simpara>
  3023. </listitem>
  3024. <listitem>
  3025. <simpara><command>remote-id</command> - <ulink
  3026. url="http://tools.ietf.org/html/rfc4649">RFC 4649</ulink>
  3027. defines remote-id option that is inserted by a relay agent. Depending
  3028. on the relay agent configuration, the inserted option may convey client's
  3029. MAC address information. This parameter can also be specified as
  3030. <command>rfc4649</command>, which is an alias for <command>remote-id</command>.
  3031. </simpara>
  3032. </listitem>
  3033. <listitem>
  3034. <simpara><command>subscriber-id</command> - Another option
  3035. that is somewhat similar to the previous one is subscriber-id,
  3036. defined in <ulink url="http://tools.ietf.org/html/rfc4580">RFC
  3037. 4580</ulink>. It is, too, inserted by a relay agent that is
  3038. configured to insert it. This parameter can also be specified
  3039. as <command>rfc4580</command>, which is an alias for
  3040. <command>subscriber-id</command>. This method is currently not
  3041. implemented.
  3042. </simpara>
  3043. </listitem>
  3044. <listitem>
  3045. <simpara><command>docsis-cmts</command> - Yet another possible source of MAC
  3046. address information are DOCSIS options inserted by a CMTS that acts
  3047. as a DHCPv6 relay agent in cable networks. This method attempts to extract
  3048. MAC address information from suboption 1026 (cm mac) of the vendor specific option
  3049. with vendor-id=4491. This vendor option is extracted from the relay-forward message,
  3050. not the original client's message.
  3051. </simpara>
  3052. </listitem>
  3053. <listitem>
  3054. <simpara><command>docsis-modem</command> - Yet another possible source of MAC
  3055. address information are DOCSIS options inserted by the cable modem itself.
  3056. This method attempts to extract MAC address information from suboption 36 (device id)
  3057. of the vendor specific option with vendor-id=4491. This vendor option is extracted from
  3058. the original client's message, not from any relay options.
  3059. </simpara>
  3060. </listitem>
  3061. </itemizedlist>
  3062. </para>
  3063. </section>
  3064. <section id="dhcp6-decline">
  3065. <title>Duplicate Addresses (DECLINE support)</title>
  3066. <para>The DHCPv6 server is configured with a certain pool of
  3067. addresses that it is expected to hand out to the DHCPv6 clients.
  3068. It is assumed that the server is authoritative and has complete
  3069. jurisdiction over those addresses. However, due to various
  3070. reasons, such as misconfiguration or a faulty client implementation
  3071. that retains its address beyond the valid lifetime, there may be
  3072. devices connected that use those addresses without the server's
  3073. approval or knowledge.</para>
  3074. <para>Such an unwelcome event can be detected
  3075. by legitimate clients (using Duplicate Address Detection) and
  3076. reported to the DHCPv6 server using a DECLINE message. The server
  3077. will do a sanity check (if the client declining an address really
  3078. was supposed to use it), then will a conduct clean up operation
  3079. and confirm it by sending back a REPLY message. Any DNS entries
  3080. related to that address will be removed, the fact will be logged
  3081. and hooks will be triggered. After that is done, the address
  3082. will be marked as declined (which indicates that it is used by
  3083. an unknown entity and thus not available for assignment to
  3084. anyone) and a probation time will be set on it. Unless otherwise
  3085. configured, the probation period lasts 24 hours. After that
  3086. period, the server will recover the lease, i.e. put it back into
  3087. the available state. The address will be available for assignment
  3088. again. It should be noted that if the underlying issue of a
  3089. misconfigured device is not resolved, the duplicate address
  3090. scenario will repeat. On the other hand, it provides an
  3091. opportunity to recover from such an event automatically, without
  3092. any sysadmin intervention.</para>
  3093. <para>To configure the decline probation period to a value different
  3094. than the default, the following syntax can be used:
  3095. <screen>
  3096. "Dhcp6": {
  3097. <userinput>"decline-probation-period": 3600</userinput>,
  3098. "subnet6": [ ... ],
  3099. ...
  3100. }
  3101. </screen>
  3102. The parameter is expressed in seconds, so the example above will instruct
  3103. the server to recycle declined leases after an hour.</para>
  3104. <para>There are several statistics and hook points associated with the
  3105. Decline handling procedure. The lease6_decline hook is triggered after the
  3106. incoming Decline message has been sanitized and the server is about to decline
  3107. the lease. The declined-addresses statistic is increased after the hook
  3108. returns (both global and subnet specific variants).</para>
  3109. <para>Once the probation time elapses, the declined lease is recovered
  3110. using the standard expired lease reclamation procedure, with several
  3111. additional steps. In particular, both declined-addresses statistics
  3112. (global and subnet specific) are decreased. At the same time,
  3113. reclaimed-declined-addresses statistics (again in two variants, global and
  3114. subnet specific) are increased.</para>
  3115. <para>Note about statistics: The server does not decrease
  3116. assigned-addresses statistics when a DECLINE message is received and
  3117. processed successfully. While technically a declined address is no longer
  3118. assigned, the primary usage of the assigned-addresses statistic is to
  3119. monitor pool utilization. Most people would forget to include
  3120. declined-addresses in the calculation, and simply do
  3121. assigned-addresses/total-addresses. This would have a bias towards
  3122. under-representing pool utilization. As this has a potential for major
  3123. issues, we decided not to decrease assigned addresses immediately after
  3124. receiving Decline, but to do it later when we recover the address back to
  3125. the available pool.</para>
  3126. </section>
  3127. <section id="dhcp6-stats">
  3128. <title>Statistics in DHCPv6 server</title>
  3129. <note>
  3130. <para>This section describes DHCPv6-specific statistics. For a general
  3131. overview and usage of statistics, see <xref linkend="stats" />.</para>
  3132. </note>
  3133. <para>
  3134. The DHCPv6 server supports the following statistics:
  3135. </para>
  3136. <table frame="all" id="dhcp6-statistics">
  3137. <title>DHCPv6 Statistics</title>
  3138. <tgroup cols='3'>
  3139. <colspec colname='statistic' align='center'/>
  3140. <colspec colname='type' align='center'/>
  3141. <colspec colname='description' align='left'/>
  3142. <thead>
  3143. <row>
  3144. <entry>Statistic</entry>
  3145. <entry>Data Type</entry>
  3146. <entry>Description</entry>
  3147. </row>
  3148. </thead>
  3149. <tbody>
  3150. <row>
  3151. <entry>pkt6-received</entry>
  3152. <entry>integer</entry>
  3153. <entry>Number of DHCPv6 packets received. This includes all packets:
  3154. valid, bogus, corrupted, rejected etc. This statistic is expected
  3155. to grow rapidly.</entry>
  3156. </row>
  3157. <row>
  3158. <entry>pkt6-receive-drop</entry>
  3159. <entry>integer</entry>
  3160. <entry>Number of incoming packets that were dropped. Exact reason
  3161. for dropping packets is logged, but the most common reasons may
  3162. be: an unacceptable or not supported packet type, direct responses
  3163. are forbidden, the server-id sent by the client does not match the
  3164. server's server-id or the packet is malformed.</entry>
  3165. </row>
  3166. <row>
  3167. <entry>pkt6-parse-failed</entry>
  3168. <entry>integer</entry>
  3169. <entry>Number of incoming packets that could not be parsed.
  3170. A non-zero value of this statistic indicates that the server
  3171. received a malformed or truncated packet. This may indicate problems
  3172. in your network, faulty clients, faulty relay agents or server
  3173. code bug.</entry>
  3174. </row>
  3175. <row>
  3176. <entry>pkt6-solicit-received</entry>
  3177. <entry>integer</entry>
  3178. <entry>
  3179. Number of SOLICIT packets received. This statistic is expected
  3180. to grow. Its increase means that clients that just booted
  3181. started their configuration process and their initial packets
  3182. reached your server.
  3183. </entry>
  3184. </row>
  3185. <row>
  3186. <entry>pkt6-advertise-received</entry>
  3187. <entry>integer</entry>
  3188. <entry>
  3189. Number of ADVERTISE packets received. Advertise packets are sent
  3190. by the server and the server is never expected to receive them. A non-zero
  3191. value of this statistic indicates an error occurring in the network.
  3192. One likely cause would be a misbehaving relay agent that incorrectly
  3193. forwards ADVERTISE messages towards the server, rather back to the
  3194. clients.
  3195. </entry>
  3196. </row>
  3197. <row>
  3198. <entry>pkt6-request-received</entry>
  3199. <entry>integer</entry>
  3200. <entry>Number of REQUEST packets received. This statistic
  3201. is expected to grow. Its increase means that clients that just booted
  3202. received the server's response (ADVERTISE), accepted it and are now
  3203. requesting an address (REQUEST).
  3204. </entry>
  3205. </row>
  3206. <row>
  3207. <entry>pkt6-reply-received</entry>
  3208. <entry>integer</entry>
  3209. <entry>Number of REPLY packets received. This statistic is
  3210. expected to remain zero at all times, as REPLY packets are sent by
  3211. the server and the server is never expected to receive
  3212. them. A non-zero value indicates an error. One likely cause would be
  3213. a misbehaving relay agent that incorrectly forwards REPLY messages
  3214. towards the server, rather back to the clients.
  3215. </entry>
  3216. </row>
  3217. <row>
  3218. <entry>pkt6-renew-received</entry>
  3219. <entry>integer</entry>
  3220. <entry>Number of RENEW packets received. This statistic
  3221. is expected to grow. Its increase means that clients received their
  3222. addresses and prefixes and are trying to renew them.
  3223. </entry>
  3224. </row>
  3225. <row>
  3226. <entry>pkt6-rebind-received</entry>
  3227. <entry>integer</entry>
  3228. <entry>Number of REBIND packets received. A non-zero value
  3229. indicates that clients didn't receive responses to their RENEW messages
  3230. (regular lease renewal mechanism) and are attempting to find any server
  3231. that is able to take over their leases. It may mean that some server's
  3232. REPLY messages never reached the clients.
  3233. </entry>
  3234. </row>
  3235. <row>
  3236. <entry>pkt6-release-received</entry>
  3237. <entry>integer</entry>
  3238. <entry>Number of RELEASE packets received. This statistic is expected
  3239. to grow when a device is being shut down in the network. It
  3240. indicates that the address or prefix assigned is reported as no longer
  3241. needed. Note that many devices, especially wireless, do not send RELEASE,
  3242. because of design choice or due to moving out of range.
  3243. </entry>
  3244. </row>
  3245. <row>
  3246. <entry>pkt6-decline-received</entry>
  3247. <entry>integer</entry>
  3248. <entry>
  3249. Number of DECLINE packets received. This statistic is expected to
  3250. remain close to zero. Its increase means that a client leased an
  3251. address, but discovered that the address is currently used by an
  3252. unknown device in your network. If this statistic is growing, it
  3253. may indicate misconfigured server or devices that have statically
  3254. assigned conflicting addresses.
  3255. </entry>
  3256. </row>
  3257. <row>
  3258. <entry>pkt6-infrequest-received</entry>
  3259. <entry>integer</entry>
  3260. <entry>
  3261. Number of INFORMATION-REQUEST packets received. This statistic
  3262. is expected to grow if there are devices that are using
  3263. stateless DHCPv6. INFORMATION-REQUEST messages are used by
  3264. clients that request stateless configuration, i.e. options
  3265. and parameters other than addresses or prefixes.
  3266. </entry>
  3267. </row>
  3268. <row>
  3269. <entry>pkt6-dhcpv4-query-received</entry>
  3270. <entry>integer</entry>
  3271. <entry>
  3272. Number of DHCPv4-QUERY packets received. This
  3273. statistic is expected to grow if there are devices
  3274. that are using DHCPv4-over-DHCPv6. DHCPv4-QUERY
  3275. messages are used by DHCPv4 clients on an IPv6 only
  3276. line so that encapsulate requests over DHCPv6.
  3277. </entry>
  3278. </row>
  3279. <row>
  3280. <entry>pkt6-dhcpv4-response-received</entry>
  3281. <entry>integer</entry>
  3282. <entry>
  3283. Number of DHCPv4-RESPONSE packets received. This
  3284. statistic is expected to remain zero at all times, as
  3285. DHCPv4-RESPONSE packets are sent by the server and the
  3286. server is never expected to receive them. A non-zero
  3287. value indicates an error. One likely cause would be a
  3288. misbehaving relay agent that incorrectly forwards
  3289. DHCPv4-RESPONSE message towards the server, rather
  3290. back to the clients.
  3291. </entry>
  3292. </row>
  3293. <row>
  3294. <entry>pkt6-unknown-received</entry>
  3295. <entry>integer</entry>
  3296. <entry>Number of packets received of an unknown type. Non-zero
  3297. value of this statistic indicates that the server received a
  3298. packet that it wasn't able to recognize: either with unsupported
  3299. type or possibly malformed.</entry>
  3300. </row>
  3301. <row>
  3302. <entry>pkt6-sent</entry>
  3303. <entry>integer</entry>
  3304. <entry>Number of DHCPv6 packets sent. This statistic is expected
  3305. to grow every time the server transmits a packet. In general, it
  3306. should roughly match pkt6-received, as most incoming packets cause
  3307. the server to respond. There are exceptions (e.g. server receiving a
  3308. REQUEST with server-id matching other server), so do not worry, if
  3309. it is lesser than pkt6-received.</entry>
  3310. </row>
  3311. <row>
  3312. <entry>pkt6-advertise-sent</entry>
  3313. <entry>integer</entry>
  3314. <entry>Number of ADVERTISE packets sent. This statistic is
  3315. expected to grow in most cases after a SOLICIT is processed. There
  3316. are certain uncommon, but valid cases where incoming SOLICIT is
  3317. dropped, but in general this statistic is expected to be close to
  3318. pkt6-solicit-received.</entry>
  3319. </row>
  3320. <row>
  3321. <entry>pkt6-reply-sent</entry>
  3322. <entry>integer</entry>
  3323. <entry>Number of REPLY packets sent. This statistic is expected to
  3324. grow in most cases after a SOLICIT (with rapid-commit), REQUEST,
  3325. RENEW, REBIND, RELEASE, DECLINE or INFORMATION-REQUEST is
  3326. processed. There are certain cases where there is no response.
  3327. </entry>
  3328. </row>
  3329. <row>
  3330. <entry>pkt6-dhcpv4-response-sent</entry>
  3331. <entry>integer</entry>
  3332. <entry>Number of DHCPv4-RESPONSE packets sent. This
  3333. statistic is expected to grow in most cases after a
  3334. DHCPv4-QUERY is processed. There are certain cases where
  3335. there is no response.
  3336. </entry>
  3337. </row>
  3338. <row>
  3339. <entry>subnet[id].total-nas</entry>
  3340. <entry>integer</entry>
  3341. <entry>
  3342. This statistic shows the total number of NA addresses available for
  3343. DHCPv6 management for a given subnet. In other words, this is the sum
  3344. of all addresses in all configured pools. This statistic changes only
  3345. during configuration changes. Note it does not take into account any
  3346. addresses that may be reserved due to host reservation. The
  3347. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  3348. statistic is exposed for each subnet separately. This statistic is
  3349. reset during a reconfiguration event.
  3350. </entry>
  3351. </row>
  3352. <row>
  3353. <entry>subnet[id].assigned-nas</entry>
  3354. <entry>integer</entry>
  3355. <entry>
  3356. This statistic shows the number of NA addresses in a given subnet that
  3357. are assigned. This statistic increases every time a new lease is allocated
  3358. (as a result of receiving a REQUEST message) and is decreased every time a
  3359. lease is released (a RELEASE message is received) or expires. The
  3360. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  3361. statistic is exposed for each subnet separately. This statistic is
  3362. reset during a reconfiguration event.
  3363. </entry>
  3364. </row>
  3365. <row>
  3366. <entry>subnet[id].total-pds</entry>
  3367. <entry>integer</entry>
  3368. <entry>
  3369. This statistic shows the total number of PD prefixes available for
  3370. DHCPv6 management for a given subnet. In other words, this is the sum
  3371. of all prefixes in all configured pools. This statistic changes only
  3372. during configuration changes. Note it does not take into account any
  3373. prefixes that may be reserved due to host reservation. The
  3374. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  3375. statistic is exposed for each subnet separately. This statistic is
  3376. reset during a reconfiguration event.
  3377. </entry>
  3378. </row>
  3379. <row>
  3380. <entry>subnet[id].assigned-pds</entry>
  3381. <entry>integer</entry>
  3382. <entry>
  3383. This statistic shows the number of PD prefixes in a given subnet that
  3384. are assigned. This statistic increases every time a new lease is allocated
  3385. (as a result of receiving a REQUEST message) and is decreased every time a
  3386. lease is released (a RELEASE message is received) or expires. The
  3387. <emphasis>id</emphasis> is the subnet-id of a given subnet. This statistic
  3388. is exposed for each subnet separately. This statistic is reset during a
  3389. reconfiguration event.
  3390. </entry>
  3391. </row>
  3392. <row>
  3393. <entry>declined-addresses</entry>
  3394. <entry>integer</entry>
  3395. <entry>
  3396. This statistic shows the number of IPv6 addresses that are
  3397. currently declined. This statistic counts the number of leases
  3398. currently unavailable. Once a lease is recovered, this
  3399. statistic will be decreased. Ideally, this statistic should be
  3400. zero. If this statistic is non-zero (or worse increasing),
  3401. a network administrator should investigate if there is
  3402. a misbehaving device in his network. This is a global statistic
  3403. that covers all subnets.
  3404. </entry>
  3405. </row>
  3406. <row>
  3407. <entry>subnet[id].declined-addresses</entry>
  3408. <entry>integer</entry>
  3409. <entry>
  3410. This statistic shows the number of IPv6 addresses that are
  3411. currently declined in a given subnet. This statistic counts the
  3412. number of leases currently unavailable. Once a lease is
  3413. recovered, this statistic will be decreased. Ideally, this
  3414. statistic should be zero. If this statistic is
  3415. non-zero (or worse increasing), a network administrator should
  3416. investigate if there is a misbehaving device in his network. The
  3417. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  3418. statistic is exposed for each subnet separately.
  3419. </entry>
  3420. </row>
  3421. <row>
  3422. <entry>reclaimed-declined-addresses</entry>
  3423. <entry>integer</entry>
  3424. <entry>
  3425. This statistic shows the number of IPv6 addresses that were
  3426. declined, but have now been recovered. Unlike
  3427. declined-addresses, this statistic never decreases. It can be used
  3428. as a long term indicator of how many actual valid Declines were
  3429. processed and recovered from. This is a global statistic that
  3430. covers all subnets.
  3431. </entry>
  3432. </row>
  3433. <row>
  3434. <entry>subnet[id].reclaimed-declined-addresses</entry>
  3435. <entry>integer</entry>
  3436. <entry>
  3437. This statistic shows the number of IPv6 addresses that were
  3438. declined, but have now been recovered. Unlike
  3439. declined-addresses, this statistic never decreases. It can be used
  3440. as a long term indicator of how many actual valid Declines were
  3441. processed and recovered from. The
  3442. <emphasis>id</emphasis> is the subnet-id of a given subnet. This
  3443. statistic is exposed for each subnet separately.
  3444. </entry>
  3445. </row>
  3446. </tbody>
  3447. </tgroup>
  3448. </table>
  3449. </section>
  3450. <section id="dhcp6-ctrl-channel">
  3451. <title>Management API for the DHCPv6 server</title>
  3452. <para>
  3453. Management API has been introduced in Kea 0.9.2-beta. It allows issuing specific
  3454. management commands, like statistics retrieval, reconfiguration or shutdown.
  3455. For more details, see <xref linkend="ctrl-channel" />. Currently the only
  3456. supported communication channel type is UNIX stream socket. By default there
  3457. are no sockets open. To instruct Kea to open a socket, the following entry
  3458. in the configuration file can be used:
  3459. <screen>
  3460. "Dhcp6": {
  3461. "control-socket": {
  3462. "socket-type": "unix",
  3463. "socket-name": <userinput>"/path/to/the/unix/socket"</userinput>
  3464. },
  3465. "subnet6": [
  3466. ...
  3467. ],
  3468. ...
  3469. }
  3470. </screen>
  3471. </para>
  3472. <para>
  3473. The length of the path specified by the <command>socket-name</command>
  3474. parameter is restricted by the maximum length for the unix socket name
  3475. on your operating system, i.e. the size of the <command>sun_path</command>
  3476. field in the <command>sockaddr_un</command> structure, decreased by 1.
  3477. This value varies on different operating systems between 91 and 107
  3478. characters. The typical values are 107 on Linux and 103 on FreeBSD.
  3479. </para>
  3480. <para>
  3481. Communication over control channel is conducted using JSON structures.
  3482. See the Control Channel section in the Kea Developer's Guide for more details.
  3483. </para>
  3484. <para>DHCPv6 server supports <command>statistic-get</command>,
  3485. <command>statistic-reset</command>, <command>statistic-remove</command>,
  3486. <command>statistic-get-all</command>, <command>statistic-reset-all</command>
  3487. and <command>statistic-remove-all</command>, specified in
  3488. <xref linkend="command-stats"/>. It also supports
  3489. <command>list-commands</command> and <command>shutdown</command>,
  3490. specified in <xref linkend="command-list-commands" /> and
  3491. <xref linkend="command-shutdown" />, respectively.</para>
  3492. </section>
  3493. <section id="dhcp6-std">
  3494. <title>Supported DHCPv6 Standards</title>
  3495. <para>The following standards are currently
  3496. supported:</para>
  3497. <itemizedlist>
  3498. <listitem>
  3499. <simpara><emphasis>Dynamic Host Configuration Protocol for IPv6</emphasis>,
  3500. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>:
  3501. Supported messages are SOLICIT,
  3502. ADVERTISE, REQUEST, RELEASE, RENEW, REBIND, INFORMATION-REQUEST,
  3503. CONFIRM and REPLY.</simpara>
  3504. </listitem>
  3505. <listitem>
  3506. <simpara><emphasis>IPv6 Prefix Options for
  3507. Dynamic Host Configuration Protocol (DHCP) version 6</emphasis>,
  3508. <ulink url="http://tools.ietf.org/html/rfc3633">RFC 3633</ulink>:
  3509. Supported options are IA_PD and
  3510. IA_PREFIX. Also supported is the status code NoPrefixAvail.</simpara>
  3511. </listitem>
  3512. <listitem>
  3513. <simpara><emphasis>DNS Configuration options for Dynamic Host
  3514. Configuration Protocol for IPv6 (DHCPv6)</emphasis>,
  3515. <ulink url="http://tools.ietf.org/html/rfc3646">RFC 3646</ulink>:
  3516. Supported option is DNS_SERVERS.</simpara>
  3517. </listitem>
  3518. <listitem>
  3519. <simpara><emphasis>The Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
  3520. Relay Agent Remote-ID Option</emphasis>,
  3521. <ulink url="http://tools.ietf.org/html/rfc4649">RFC 4649</ulink>:
  3522. REMOTE-ID option is supported.</simpara>
  3523. </listitem>
  3524. <listitem>
  3525. <simpara><emphasis>The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) Client
  3526. Fully Qualified Domain Name (FQDN) Option</emphasis>,
  3527. <ulink url="http://tools.ietf.org/html/rfc4704">RFC 4704</ulink>:
  3528. Supported option is CLIENT_FQDN.</simpara>
  3529. </listitem>
  3530. <listitem>
  3531. <simpara><emphasis>Relay-Supplied DHCP Options</emphasis>,
  3532. <ulink url="http://tools.ietf.org/html/rfc6422">RFC 6422</ulink>:
  3533. Full functionality is supported: OPTION_RSOO, ability of the server
  3534. to echo back the options, checks whether an option is RSOO-enabled,
  3535. ability to mark additional options as RSOO-enabled.</simpara>
  3536. </listitem>
  3537. <listitem>
  3538. <simpara><emphasis>Client Link-Layer Address Option in
  3539. DHCPv6</emphasis>,
  3540. <ulink url="http://tools.ietf.org/html/rfc6939">RFC
  3541. 6939</ulink>: Supported option is client link-layer
  3542. address option.</simpara>
  3543. </listitem>
  3544. <listitem>
  3545. <simpara><emphasis>Issues and Recommendations with Multiple
  3546. Stateful DHCPv6 Options</emphasis>,
  3547. <ulink url="http://tools.ietf.org/html/rfc7550">RFC
  3548. 7550</ulink>: All recommendations related to the DHCPv6 server
  3549. operation are supported.</simpara>
  3550. </listitem>
  3551. </itemizedlist>
  3552. </section>
  3553. <section id="dhcp6-limit">
  3554. <title>DHCPv6 Server Limitations</title>
  3555. <para> These are the current limitations and known problems
  3556. with the DHCPv6 server
  3557. software. Most of them are reflections of the early stage of
  3558. development and should be treated as <quote>not implemented
  3559. yet</quote>, rather than actual limitations.</para>
  3560. <itemizedlist>
  3561. <listitem> <!-- see tickets #3234, #3281 -->
  3562. <para>
  3563. On-line configuration has some limitations. Adding new subnets or
  3564. modifying existing ones work, as is removing the last subnet from
  3565. the list. However, removing non-last (e.g. removing subnet 1,2 or 3 if
  3566. there are 4 subnets configured) will cause issues. The problem is
  3567. caused by simplistic subnet-id assignment. The subnets are always
  3568. numbered, starting from 1. That subnet-id is then used in leases
  3569. that are stored in the lease database. Removing non-last subnet will
  3570. cause the configuration information to mismatch data in the lease
  3571. database. It is possible to manually update subnet-id fields in
  3572. MySQL, PostgreSQL or CQL database, but it is awkward and
  3573. error prone process. A better reconfiguration support is planned.
  3574. </para>
  3575. </listitem>
  3576. <listitem>
  3577. <simpara>
  3578. The server will allocate, renew or rebind a maximum of one lease
  3579. for a particular IA option (IA_NA or IA_PD) sent by a client.
  3580. <ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink> and
  3581. <ulink url="http://tools.ietf.org/html/rfc3633">RFC 3633</ulink> allow
  3582. for multiple addresses or prefixes to be allocated for a single IA.
  3583. </simpara>
  3584. </listitem>
  3585. <listitem>
  3586. <simpara>Temporary addresses are not supported.</simpara>
  3587. </listitem>
  3588. <listitem>
  3589. <simpara>
  3590. Duplication report (DECLINE) and client reconfiguration (RECONFIGURE) are
  3591. not yet supported.
  3592. </simpara>
  3593. </listitem>
  3594. </itemizedlist>
  3595. </section>
  3596. <!--
  3597. <section id="dhcp6-srv-examples">
  3598. <title>Kea DHCPv6 server examples</title>
  3599. <para>
  3600. This section provides easy to use example. Each example can be read
  3601. separately. It is not intended to be read sequentially as there will
  3602. be many repetitions between examples. They are expected to serve as
  3603. easy to use copy-paste solutions to many common deployments.
  3604. </para>
  3605. @todo: add simple configuration for direct clients
  3606. @todo: add configuration for relayed clients
  3607. @todo: add client classification example
  3608. </section> -->
  3609. </chapter>