bind10-guide.xml 186 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925
  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. <!ENTITY % version SYSTEM "version.ent">
  6. %version;
  7. ]>
  8. <!--
  9. - Copyright (C) 2010-2012 Internet Systems Consortium, Inc. ("ISC")
  10. -
  11. - Permission to use, copy, modify, and/or distribute this software for any
  12. - purpose with or without fee is hereby granted, provided that the above
  13. - copyright notice and this permission notice appear in all copies.
  14. -
  15. - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  16. - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  17. - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  18. - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  19. - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  20. - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  21. - PERFORMANCE OF THIS SOFTWARE.
  22. -->
  23. <book>
  24. <?xml-stylesheet href="bind10-guide.css" type="text/css"?>
  25. <bookinfo>
  26. <title>BIND 10 Guide</title>
  27. <subtitle>Administrator Reference for BIND 10</subtitle>
  28. <copyright>
  29. <year>2010-2012</year><holder>Internet Systems Consortium, Inc.</holder>
  30. </copyright>
  31. <abstract>
  32. <para>BIND 10 is a framework that features Domain Name System
  33. (DNS) suite and Dynamic Host Configuration Protocol (DHCP)
  34. servers with development managed by Internet Systems Consortium (ISC).
  35. It includes DNS libraries, modular components for controlling
  36. authoritative and recursive DNS servers, and experimental DHCPv4
  37. and DHCPv6 servers.
  38. </para>
  39. <para>
  40. This is the reference guide for BIND 10 version &__VERSION__;.
  41. The most up-to-date version of this document (in PDF, HTML,
  42. and plain text formats), along with other documents for
  43. BIND 10, can be found at <ulink url="http://bind10.isc.org/docs"/>.
  44. </para> </abstract>
  45. <releaseinfo>This is the reference guide for BIND 10 version
  46. &__VERSION__;.</releaseinfo>
  47. </bookinfo>
  48. <preface>
  49. <title>Preface</title>
  50. <section id="acknowledgements">
  51. <title>Acknowledgements</title>
  52. <!-- TODO: acknowledge all sponsors and CNNIC and CZNIC too -->
  53. <para>ISC would like to acknowledge generous support for
  54. BIND 10 development of DHCPv4 and DHCPv6 components provided
  55. by <ulink url="http://www.comcast.com/">Comcast</ulink>.</para>
  56. </section>
  57. </preface>
  58. <chapter id="intro">
  59. <title>Introduction</title>
  60. <para>
  61. BIND is the popular implementation of a DNS server, developer
  62. interfaces, and DNS tools.
  63. BIND 10 is a rewrite of BIND 9 and ISC DHCP.
  64. BIND 10 is written in C++ and Python and provides a modular
  65. environment for serving, maintaining, and developing DNS and DHCP.
  66. BIND 10 provides a EDNS0- and DNSSEC-capable authoritative
  67. DNS server and a caching recursive name server which also
  68. provides forwarding.
  69. It also provides experimental DHCPv4 and DHCPv6 servers.
  70. </para>
  71. <para>
  72. This guide covers BIND 10 version &__VERSION__;.
  73. </para>
  74. <section>
  75. <title>Supported Platforms</title>
  76. <para>
  77. BIND 10 builds have been tested on (in no particular order)
  78. Debian GNU/Linux 6 and unstable, Ubuntu 9.10, NetBSD 5,
  79. Solaris 10 and 11, FreeBSD 7 and 8, CentOS Linux 5.3,
  80. MacOS 10.6 and 10.7, and OpenBSD 5.1.
  81. It has been tested on Sparc, i386, and amd64 hardware
  82. platforms.
  83. It is planned for BIND 10 to build, install and run on
  84. Windows and standard Unix-type platforms.
  85. </para>
  86. </section>
  87. <section id="required-software">
  88. <title>Required Software at Run-time</title>
  89. <para>
  90. Running BIND 10 uses various extra software which may
  91. not be provided in some operating systems' default
  92. installations nor standard packages collections. You may
  93. need to install this required software separately.
  94. (For the build requirements, also see
  95. <xref linkend="build-requirements"/>.)
  96. </para>
  97. <para>
  98. BIND 10 requires at least Python 3.1
  99. (<ulink url="http://www.python.org/"/>).
  100. It also works with Python 3.2.
  101. </para>
  102. <para>
  103. BIND 10 uses the Botan crypto library for C++
  104. (<ulink url="http://botan.randombit.net/"/>).
  105. It requires at least Botan version 1.8.
  106. </para>
  107. <para>
  108. BIND 10 uses the log4cplus C++ logging library
  109. (<ulink url="http://log4cplus.sourceforge.net/"/>).
  110. It requires at least log4cplus version 1.0.3.
  111. <!-- TODO: It is recommended to use at least version .... -->
  112. </para>
  113. <para>
  114. The authoritative DNS server uses SQLite3
  115. (<ulink url="http://www.sqlite.org/"/>).
  116. <!-- TODO: is this still required? -->
  117. It needs at least SQLite version 3.3.9.
  118. </para>
  119. <para>
  120. The <command>b10-ddns</command>, <command>b10-xfrin</command>,
  121. <command>b10-xfrout</command>, and <command>b10-zonemgr</command>
  122. components require the libpython3 library and the Python
  123. _sqlite3.so module (which is included with Python).
  124. Python modules need to be built for the corresponding Python 3.
  125. </para>
  126. <!-- TODO: this will change ... -->
  127. </section>
  128. <section id="starting_stopping">
  129. <title>Starting and Stopping the Server</title>
  130. <para>
  131. BIND 10 is modular. Part of this modularity is
  132. accomplished using multiple cooperating processes which, together,
  133. provide the server functionality. This is a change from
  134. the previous generation of BIND software, which used a
  135. single process.
  136. </para>
  137. <para>
  138. At first, running many different processes may seem confusing.
  139. However, these processes are started, stopped, and maintained
  140. by a single command, <command>bind10</command>.
  141. This command starts a master process which will start other
  142. required processes and other processes when configured.
  143. The processes that may be started by the <command>bind10</command>
  144. command have names starting with "b10-", including:
  145. </para>
  146. <para>
  147. <itemizedlist>
  148. <listitem>
  149. <simpara>
  150. <command>b10-auth</command> &mdash;
  151. Authoritative DNS server.
  152. This process serves DNS requests.
  153. </simpara>
  154. </listitem>
  155. <listitem>
  156. <simpara>
  157. <command>b10-cfgmgr</command> &mdash;
  158. Configuration manager.
  159. This process maintains all of the configuration for BIND 10.
  160. </simpara>
  161. </listitem>
  162. <listitem>
  163. <simpara>
  164. <command>b10-cmdctl</command> &mdash;
  165. Command and control service.
  166. This process allows external control of the BIND 10 system.
  167. </simpara>
  168. </listitem>
  169. <listitem>
  170. <simpara>
  171. <command>b10-ddns</command> &mdash;
  172. Dynamic DNS update service.
  173. This process is used to handle incoming DNS update
  174. requests to allow granted clients to update zones
  175. for which BIND 10 is serving as a primary server.
  176. </simpara>
  177. </listitem>
  178. <listitem>
  179. <simpara>
  180. <command>b10-msgq</command> &mdash;
  181. Message bus daemon.
  182. This process coordinates communication between all of the other
  183. BIND 10 processes.
  184. </simpara>
  185. </listitem>
  186. <listitem>
  187. <simpara>
  188. <command>b10-resolver</command> &mdash;
  189. Recursive name server.
  190. This process handles incoming DNS queries and provides
  191. answers from its cache or by recursively doing remote lookups.
  192. </simpara>
  193. </listitem>
  194. <listitem>
  195. <simpara>
  196. <command>b10-sockcreator</command> &mdash;
  197. Socket creator daemon.
  198. This process creates sockets used by
  199. network-listening BIND 10 processes.
  200. </simpara>
  201. </listitem>
  202. <listitem>
  203. <simpara>
  204. <command>b10-stats</command> &mdash;
  205. Statistics collection daemon.
  206. This process collects and reports statistics data.
  207. </simpara>
  208. </listitem>
  209. <listitem>
  210. <simpara>
  211. <command>b10-stats-httpd</command> &mdash;
  212. HTTP server for statistics reporting.
  213. This process reports statistics data in XML format over HTTP.
  214. </simpara>
  215. </listitem>
  216. <listitem>
  217. <simpara>
  218. <command>b10-xfrin</command> &mdash;
  219. Incoming zone transfer service.
  220. This process is used to transfer a new copy
  221. of a zone into BIND 10, when acting as a secondary server.
  222. </simpara>
  223. </listitem>
  224. <listitem>
  225. <simpara>
  226. <command>b10-xfrout</command> &mdash;
  227. Outgoing zone transfer service.
  228. This process is used to handle transfer requests to
  229. send a local zone to a remote secondary server.
  230. </simpara>
  231. </listitem>
  232. <listitem>
  233. <simpara>
  234. <command>b10-zonemgr</command> &mdash;
  235. Secondary zone manager.
  236. This process keeps track of timers and other
  237. necessary information for BIND 10 to act as a slave server.
  238. </simpara>
  239. </listitem>
  240. </itemizedlist>
  241. </para>
  242. <para>
  243. These do not need to be manually started independently.
  244. </para>
  245. </section>
  246. <section id="managing_once_running">
  247. <title>Managing BIND 10</title>
  248. <para>
  249. Once BIND 10 is running, a few commands are used to interact
  250. directly with the system:
  251. <itemizedlist>
  252. <listitem>
  253. <simpara>
  254. <command>bindctl</command> &mdash;
  255. Interactive administration interface.
  256. This is a low-level command-line tool which allows
  257. a developer or an experienced administrator to control
  258. BIND 10.
  259. </simpara>
  260. </listitem>
  261. <listitem>
  262. <simpara>
  263. <command>b10-loadzone</command> &mdash;
  264. Zone file loader.
  265. This tool will load standard masterfile-format zone files into
  266. BIND 10.
  267. </simpara>
  268. </listitem>
  269. <listitem>
  270. <simpara>
  271. <command>b10-cmdctl-usermgr</command> &mdash;
  272. User access control.
  273. This tool allows an administrator to authorize additional users
  274. to manage BIND 10.
  275. </simpara>
  276. </listitem>
  277. <!-- TODO usermgr -->
  278. </itemizedlist>
  279. </para>
  280. </section>
  281. <para>
  282. The tools and modules are covered in full detail in this guide.
  283. <!-- TODO point to these -->
  284. In addition, manual pages are also provided in the default installation.
  285. </para>
  286. <!--
  287. bin/
  288. bindctl*
  289. host*
  290. lib/
  291. libauth
  292. libdns
  293. libexceptions
  294. python3.1/site-packages/isc/{cc,config}
  295. sbin/
  296. bind10
  297. share/
  298. share/bind10/
  299. auth.spec
  300. b10-cmdctl.pem
  301. bob.spec
  302. passwd.csv
  303. man/
  304. var/
  305. bind10/b10-config.db
  306. -->
  307. <para>
  308. BIND 10 also provides libraries and programmer interfaces
  309. for C++ and Python for the message bus, configuration backend,
  310. and, of course, DNS. These include detailed developer
  311. documentation and code examples.
  312. <!-- TODO: DHCP also but no Python yet. -->
  313. <!-- TODO point to this -->
  314. </para>
  315. </chapter>
  316. <chapter id="quickstart">
  317. <title>Quick start</title>
  318. <para>
  319. This quickly covers the standard steps for installing
  320. and deploying BIND 10.
  321. For further details, full customizations, and troubleshooting,
  322. see the respective chapters in the BIND 10 guide.
  323. </para>
  324. <section id="quick-start-auth-dns">
  325. <title>Quick start guide for authoritative DNS service</title>
  326. <orderedlist>
  327. <listitem>
  328. <simpara>
  329. Install required run-time and build dependencies.
  330. </simpara>
  331. </listitem>
  332. <listitem>
  333. <simpara>
  334. Download the BIND 10 source tar file from
  335. <ulink url="ftp://ftp.isc.org/isc/bind10/"/>.
  336. </simpara>
  337. </listitem>
  338. <listitem>
  339. <para>Extract the tar file:
  340. <screen>$ <userinput>gzcat bind10-<replaceable>VERSION</replaceable>.tar.gz | tar -xvf -</userinput></screen>
  341. </para>
  342. </listitem>
  343. <listitem>
  344. <para>Go into the source and run configure:
  345. <screen>$ <userinput>cd bind10-<replaceable>VERSION</replaceable></userinput>
  346. $ <userinput>./configure</userinput></screen>
  347. </para>
  348. </listitem>
  349. <listitem>
  350. <para>Build it:
  351. <screen>$ <userinput>make</userinput></screen>
  352. </para>
  353. </listitem>
  354. <listitem>
  355. <para>Install it as root (to default /usr/local):
  356. <screen>$ <userinput>make install</userinput></screen>
  357. </para>
  358. </listitem>
  359. <listitem>
  360. <para>Start the server (as root):
  361. <screen>$ <userinput>/usr/local/sbin/bind10</userinput></screen>
  362. </para>
  363. </listitem>
  364. <listitem>
  365. <para>DNS and DHCP components are not started in the default
  366. configuration. In another console, enable the authoritative
  367. DNS service (by using the <command>bindctl</command> utility
  368. to configure the <command>b10-auth</command> component to
  369. run): <screen>$ <userinput>bindctl</userinput></screen>
  370. (Login with the provided default username and password.)
  371. <screen>
  372. &gt; <userinput>config add Boss/components b10-auth</userinput>
  373. &gt; <userinput>config set Boss/components/b10-auth/special auth</userinput>
  374. &gt; <userinput>config set Boss/components/b10-auth/kind needed</userinput>
  375. &gt; <userinput>config commit</userinput>
  376. &gt; <userinput>quit</userinput>
  377. </screen>
  378. </para>
  379. </listitem>
  380. <listitem>
  381. <para>Test it; for example:
  382. <screen>$ <userinput>dig @127.0.0.1 -c CH -t TXT version.bind</userinput></screen>
  383. </para>
  384. </listitem>
  385. <listitem>
  386. <para>Load desired zone file(s), for example:
  387. <screen>$ <userinput>b10-loadzone <replaceable>-c '{"database_file": "/usr/local/var/bind10/zone.sqlite3"}'</replaceable> <replaceable>your.zone.example.org</replaceable> <replaceable>your.zone.file</replaceable></userinput></screen>
  388. </para>
  389. (If you use the sqlite3 data source with the default DB
  390. file, you can omit the -c option).
  391. </listitem>
  392. <listitem>
  393. <simpara>
  394. Test the new zone.
  395. </simpara>
  396. </listitem>
  397. </orderedlist>
  398. </section>
  399. </chapter>
  400. <chapter id="installation">
  401. <title>Installation</title>
  402. <section id="packages">
  403. <title>Packages</title>
  404. <para>
  405. Some operating systems or software package vendors may
  406. provide ready-to-use, pre-built software packages for
  407. the BIND 10 suite.
  408. Installing a pre-built package means you do not need to
  409. install build-only prerequisites and do not need to
  410. <emphasis>make</emphasis> the software.
  411. </para>
  412. <para>
  413. FreeBSD ports, NetBSD pkgsrc, and Debian
  414. <emphasis>testing</emphasis> package collections provide
  415. all the prerequisite packages.
  416. </para>
  417. </section>
  418. <section id="install-hierarchy">
  419. <title>Install Hierarchy</title>
  420. <para>
  421. The following is the standard, common layout of the
  422. complete BIND 10 installation:
  423. <itemizedlist>
  424. <listitem>
  425. <simpara>
  426. <filename>bin/</filename> &mdash;
  427. general tools and diagnostic clients.
  428. </simpara>
  429. </listitem>
  430. <listitem>
  431. <simpara>
  432. <filename>etc/bind10/</filename> &mdash;
  433. configuration files.
  434. </simpara>
  435. </listitem>
  436. <listitem>
  437. <simpara>
  438. <filename>lib/</filename> &mdash;
  439. libraries and python modules.
  440. </simpara>
  441. </listitem>
  442. <listitem>
  443. <simpara>
  444. <filename>libexec/bind10/</filename> &mdash;
  445. executables that a user wouldn't normally run directly and
  446. are not run independently.
  447. These are the BIND 10 modules which are daemons started by
  448. the <command>bind10</command> tool.
  449. </simpara>
  450. </listitem>
  451. <listitem>
  452. <simpara>
  453. <filename>sbin/</filename> &mdash;
  454. commands used by the system administrator.
  455. </simpara>
  456. </listitem>
  457. <listitem>
  458. <simpara>
  459. <filename>share/bind10/</filename> &mdash;
  460. configuration specifications.
  461. </simpara>
  462. </listitem>
  463. <listitem>
  464. <simpara>
  465. <filename>share/doc/bind10/</filename> &mdash;
  466. this guide and other supplementary documentation.
  467. </simpara>
  468. </listitem>
  469. <listitem>
  470. <simpara>
  471. <filename>share/man/</filename> &mdash;
  472. manual pages (online documentation).
  473. </simpara>
  474. </listitem>
  475. <listitem>
  476. <simpara>
  477. <filename>var/bind10/</filename> &mdash;
  478. data source and configuration databases.
  479. </simpara>
  480. </listitem>
  481. </itemizedlist>
  482. </para>
  483. </section>
  484. <section id="build-requirements">
  485. <title>Building Requirements</title>
  486. <para>
  487. In addition to the run-time requirements (listed in
  488. <xref linkend="required-software"/>), building BIND 10
  489. from source code requires various development include headers and
  490. program development tools.
  491. </para>
  492. <note>
  493. <simpara>
  494. Some operating systems have split their distribution packages into
  495. a run-time and a development package. You will need to install
  496. the development package versions, which include header files and
  497. libraries, to build BIND 10 from source code.
  498. </simpara>
  499. </note>
  500. <para>
  501. Building from source code requires the Boost
  502. build-time headers
  503. (<ulink url="http://www.boost.org/"/>).
  504. At least Boost version 1.35 is required.
  505. <!-- TODO: we don't check for this version -->
  506. <!-- NOTE: jreed has tested with 1.34, 1.38, and 1.41. -->
  507. </para>
  508. <para>
  509. To build BIND 10, also install the Botan (at least version
  510. 1.8) and the log4cplus (at least version 1.0.3)
  511. development include headers.
  512. </para>
  513. <!--
  514. TODO
  515. Debian and Ubuntu:
  516. libgmp3-dev and libbz2-dev required for botan too
  517. -->
  518. <!-- NOTE: _sqlite3 is only needed at test time; it is already listed
  519. as a dependency earlier -->
  520. <para>
  521. Building BIND 10 also requires a C++ compiler and
  522. standard development headers, make, and pkg-config.
  523. BIND 10 builds have been tested with GCC g++ 3.4.3, 4.1.2,
  524. 4.1.3, 4.2.1, 4.3.2, and 4.4.1; Clang++ 2.8; and Sun C++ 5.10.
  525. </para>
  526. <para>
  527. Visit the user-contributed wiki at <ulink
  528. url="http://bind10.isc.org/wiki/SystemSpecificNotes" />
  529. for system-specific installation tips.
  530. </para>
  531. </section>
  532. <section id="install">
  533. <title>Installation from source</title>
  534. <para>
  535. BIND 10 is open source software written in C++ and Python.
  536. It is freely available in source code form from ISC as a
  537. downloadable tar file or via BIND 10's Git code revision control
  538. service. (It may also be available in pre-compiled ready-to-use
  539. packages from operating system vendors.)
  540. </para>
  541. <section>
  542. <title>Download Tar File</title>
  543. <para>
  544. Downloading a release tar file is the recommended method to
  545. obtain the source code.
  546. </para>
  547. <para>
  548. The BIND 10 releases are available as tar file downloads from
  549. <ulink url="ftp://ftp.isc.org/isc/bind10/"/>.
  550. Periodic development snapshots may also be available.
  551. </para>
  552. <!-- TODO -->
  553. </section>
  554. <section>
  555. <title>Retrieve from Git</title>
  556. <para>
  557. Downloading this "bleeding edge" code is recommended only for
  558. developers or advanced users. Using development code in a production
  559. environment is not recommended.
  560. </para>
  561. <note>
  562. <para>
  563. When using source code retrieved via Git, additional
  564. software will be required: automake (v1.11 or newer),
  565. libtoolize, and autoconf (2.59 or newer).
  566. These may need to be installed.
  567. </para>
  568. </note>
  569. <para>
  570. The latest development code (and temporary experiments
  571. and un-reviewed code) is available via the BIND 10 code revision
  572. control system. This is powered by Git and all the BIND 10
  573. development is public.
  574. The leading development is done in the <quote>master</quote>
  575. branch.
  576. </para>
  577. <para>
  578. The code can be checked out from
  579. <filename>git://git.bind10.isc.org/bind10</filename>;
  580. for example:
  581. <screen>$ <userinput>git clone git://git.bind10.isc.org/bind10</userinput></screen>
  582. </para>
  583. <para>
  584. When checking out the code from
  585. the code version control system, it doesn't include the
  586. generated configure script, Makefile.in files, nor their
  587. related build files.
  588. They can be created by running <command>autoreconf</command>
  589. with the <option>--install</option> switch.
  590. This will run <command>autoconf</command>,
  591. <command>aclocal</command>,
  592. <command>libtoolize</command>,
  593. <command>autoheader</command>,
  594. <command>automake</command>,
  595. and related commands.
  596. </para>
  597. </section>
  598. <section id="configure">
  599. <title>Configure before the build</title>
  600. <para>
  601. BIND 10 uses the GNU Build System to discover build environment
  602. details.
  603. To generate the makefiles using the defaults, simply run:
  604. <screen>$ <userinput>./configure</userinput></screen>
  605. </para>
  606. <para>
  607. Run <command>./configure</command> with the <option>--help</option>
  608. switch to view the different options. Some commonly-used options are:
  609. <variablelist>
  610. <varlistentry>
  611. <term>--prefix</term>
  612. <listitem>
  613. <simpara>Define the installation location (the
  614. default is <filename>/usr/local/</filename>).
  615. </simpara>
  616. </listitem>
  617. </varlistentry>
  618. <varlistentry>
  619. <term>--with-boost-include</term>
  620. <listitem>
  621. <simpara>Define the path to find the Boost headers.
  622. </simpara>
  623. </listitem>
  624. </varlistentry>
  625. <varlistentry>
  626. <term>--with-pythonpath</term>
  627. <listitem>
  628. <simpara>Define the path to Python 3.1 if it is not in the
  629. standard execution path.
  630. </simpara>
  631. </listitem>
  632. </varlistentry>
  633. <varlistentry>
  634. <term>--with-gtest</term>
  635. <listitem>
  636. <simpara>Enable building the C++ Unit Tests using the
  637. Google Tests framework. Optionally this can define the
  638. path to the gtest header files and library.
  639. </simpara>
  640. </listitem>
  641. </varlistentry>
  642. <varlistentry>
  643. <term>--with-dhcp-mysql</term>
  644. <listitem>
  645. <simpara>Enable MySQL support for BIND 10 DHCP. For notes on configuring
  646. and building DHCP with MySQL see <xref linkend="dhcp-install-configure">.</xref>
  647. </simpara>
  648. </listitem>
  649. </varlistentry>
  650. </variablelist>
  651. </para>
  652. <!-- TODO: lcov -->
  653. <para>
  654. For example, the following configures it to
  655. find the Boost headers, find the
  656. Python interpreter, and sets the installation location:
  657. <screen>$ <userinput>./configure \
  658. --with-boost-include=/usr/pkg/include \
  659. --with-pythonpath=/usr/pkg/bin/python3.1 \
  660. --prefix=/opt/bind10</userinput></screen>
  661. </para>
  662. <para>
  663. If the configure fails, it may be due to missing or old
  664. dependencies.
  665. </para>
  666. </section>
  667. <section>
  668. <title>Build</title>
  669. <para>
  670. After the configure step is complete, to build the executables
  671. from the C++ code and prepare the Python scripts, run:
  672. <screen>$ <userinput>make</userinput></screen>
  673. </para>
  674. </section>
  675. <section>
  676. <title>Install</title>
  677. <para>
  678. To install the BIND 10 executables, support files,
  679. and documentation, run:
  680. <screen>$ <userinput>make install</userinput></screen>
  681. </para>
  682. <note>
  683. <para>The install step may require superuser privileges.</para>
  684. </note>
  685. <para>
  686. If required, run <command>ldconfig</command> as root with
  687. <filename>/usr/local/lib</filename> (or with ${prefix}/lib if
  688. configured with --prefix) in
  689. <filename>/etc/ld.so.conf</filename> (or the relevant linker
  690. cache configuration file for your OS):
  691. <screen>$ <userinput>ldconfig</userinput></screen>
  692. </para>
  693. <note>
  694. <para>
  695. If you do not run <command>ldconfig</command> where it is
  696. required, you may see errors like the following:
  697. <screen>
  698. program: error while loading shared libraries: libb10-something.so.1:
  699. cannot open shared object file: No such file or directory
  700. </screen>
  701. </para>
  702. </note>
  703. </section>
  704. <!-- TODO: tests -->
  705. </section>
  706. <!--
  707. <section id="install.troubleshooting">
  708. <title>Troubleshooting</title>
  709. <para>
  710. </para>
  711. </section>
  712. -->
  713. </chapter>
  714. <chapter id="bind10">
  715. <title>Starting BIND 10 with <command>bind10</command></title>
  716. <para>
  717. BIND 10 provides the <command>bind10</command> command which
  718. starts up the required processes.
  719. <command>bind10</command>
  720. will also restart some processes that exit unexpectedly.
  721. This is the only command needed to start the BIND 10 system.
  722. </para>
  723. <para>
  724. After starting the <command>b10-msgq</command> communications channel,
  725. <command>bind10</command> connects to it,
  726. runs the configuration manager, and reads its own configuration.
  727. Then it starts the other modules.
  728. </para>
  729. <para>
  730. The <command>b10-sockcreator</command>, <command>b10-msgq</command> and
  731. <command>b10-cfgmgr</command>
  732. services make up the core. The <command>b10-msgq</command> daemon
  733. provides the communication channel between every part of the system.
  734. The <command>b10-cfgmgr</command> daemon is always needed by every
  735. module, if only to send information about themselves somewhere,
  736. but more importantly to ask about their own settings, and
  737. about other modules. The <command>b10-sockcreator</command> daemon
  738. helps allocate Internet addresses and ports as needed for BIND 10
  739. network services.
  740. </para>
  741. <para>
  742. In its default configuration, the <command>bind10</command>
  743. master process will also start up
  744. <command>b10-cmdctl</command> for administration tools to
  745. communicate with the system, and
  746. <command>b10-stats</command> for statistics collection.
  747. The DNS and DHCP servers are not started by default.
  748. The configuration of components to start is covered in
  749. <xref linkend="bind10.components"/>.
  750. </para>
  751. <section id="start">
  752. <title>Starting BIND 10</title>
  753. <para>
  754. To start the BIND 10 service, simply run <command>bind10</command>
  755. as root.
  756. It will run in the foreground and your shell prompt will not
  757. be available. It will output various log messages as it starts up
  758. and is used.
  759. Run it with the <option>--verbose</option> switch to
  760. get additional debugging or diagnostic output.
  761. </para>
  762. <!-- TODO: user switch -->
  763. <!-- TODO: example: nohup /usr/local/sbin/bind10 1>bind10.log 2>&1 -->
  764. <note>
  765. <para>
  766. If the setproctitle Python module is detected at start up,
  767. the process names for the Python-based daemons will be renamed
  768. to better identify them instead of just <quote>python</quote>.
  769. This is not needed on some operating systems.
  770. </para>
  771. </note>
  772. </section>
  773. </chapter>
  774. <chapter id="msgq">
  775. <title>Command channel</title>
  776. <para>
  777. The BIND 10 components use the <command>b10-msgq</command>
  778. message routing daemon to communicate with other BIND 10 components.
  779. The <command>b10-msgq</command> implements what is called the
  780. <quote>Command Channel</quote>.
  781. Processes intercommunicate by sending messages on the command
  782. channel.
  783. Example messages include shutdown, get configurations, and set
  784. configurations.
  785. This Command Channel is not used for DNS message passing.
  786. It is used only to control and monitor the BIND 10 system.
  787. </para>
  788. <para>
  789. Administrators do not communicate directly with the
  790. <command>b10-msgq</command> daemon.
  791. By default, BIND 10 uses a UNIX domain socket file named
  792. <filename>/usr/local/var/bind10/msg_socket</filename>
  793. for this interprocess communication.
  794. </para>
  795. </chapter>
  796. <chapter id="cfgmgr">
  797. <title>Configuration manager</title>
  798. <para>
  799. The configuration manager, <command>b10-cfgmgr</command>,
  800. handles all BIND 10 system configuration. It provides
  801. persistent storage for configuration, and notifies running
  802. modules of configuration changes.
  803. </para>
  804. <para>
  805. The <command>b10-auth</command> and <command>b10-xfrin</command>
  806. daemons and other components receive their configurations
  807. from the configuration manager over the <command>b10-msgq</command>
  808. command channel.
  809. </para>
  810. <para>The administrator doesn't connect to it directly, but
  811. uses a user interface to communicate with the configuration
  812. manager via <command>b10-cmdctl</command>'s REST-ful interface.
  813. <command>b10-cmdctl</command> is covered in <xref linkend="cmdctl"/>.
  814. </para>
  815. <!-- TODO -->
  816. <note>
  817. <para>
  818. The current release only provides
  819. <command>bindctl</command> as a user interface to
  820. <command>b10-cmdctl</command>.
  821. Upcoming releases will provide another interactive command-line
  822. interface and a web-based interface.
  823. </para>
  824. </note>
  825. <para>
  826. The <command>b10-cfgmgr</command> daemon can send all
  827. specifications and all current settings to the
  828. <command>bindctl</command> client (via
  829. <command>b10-cmdctl</command>).
  830. <command>b10-cfgmgr</command> relays configurations received
  831. from <command>b10-cmdctl</command> to the appropriate modules.
  832. </para>
  833. <!-- TODO:
  834. Configuration settings for itself are defined as ConfigManager.
  835. TODO: show examples
  836. -->
  837. <!-- TODO:
  838. config changes are actually commands to cfgmgr
  839. -->
  840. <!-- TODO: what about run time config to change this? -->
  841. <!-- jelte: > config set cfgmgr/config_database <file> -->
  842. <!-- TODO: what about command line switch to change this? -->
  843. <para>
  844. The stored configuration file is at
  845. <filename>/usr/local/var/bind10/b10-config.db</filename>.
  846. (The directory is what was defined at build configure time for
  847. <option>--localstatedir</option>.
  848. The default is <filename>/usr/local/var/</filename>.)
  849. The format is loosely based on JSON and is directly parseable
  850. python, but this may change in a future version.
  851. This configuration data file is not manually edited by the
  852. administrator.
  853. </para>
  854. <!--
  855. Well the specfiles have a more fixed format (they must contain specific
  856. stuff), but those are also directly parseable python structures (and
  857. 'coincidentally', our data::element string representation is the same)
  858. loosely based on json, tweaked to be directly parseable in python, but a
  859. subset of that.
  860. wiki page is http://bind10.isc.org/wiki/DataElementDesign
  861. nope, spec files are written by module developers, and db should be done
  862. through bindctl and friends
  863. -->
  864. <para>
  865. The configuration manager does not have any command line arguments.
  866. Normally it is not started manually, but is automatically
  867. started using the <command>bind10</command> master process
  868. (as covered in <xref linkend="bind10"/>).
  869. </para>
  870. <!-- TODO: upcoming plans:
  871. configuration for configuration manager itself. And perhaps we might
  872. change the messaging protocol, but an admin should never see any of that
  873. -->
  874. <!-- TODO: show examples, test this -->
  875. <!--
  876. , so an admin can simply run bindctl,
  877. do config show, and it shows all modules; config show >module> shows all
  878. options for that module
  879. -->
  880. </chapter>
  881. <chapter id="cmdctl">
  882. <title>Remote control daemon</title>
  883. <para>
  884. <command>b10-cmdctl</command> is the gateway between
  885. administrators and the BIND 10 system.
  886. It is a HTTPS server that uses standard HTTP Digest
  887. Authentication for username and password validation.
  888. It provides a REST-ful interface for accessing and controlling
  889. BIND 10.
  890. </para>
  891. <!-- TODO: copy examples from wiki, try with wget -->
  892. <para>
  893. When <command>b10-cmdctl</command> starts, it firsts
  894. asks <command>b10-cfgmgr</command> about what modules are
  895. running and what their configuration is (over the
  896. <command>b10-msgq</command> channel). Then it will start listening
  897. on HTTPS for clients &mdash; the user interface &mdash; such
  898. as <command>bindctl</command>.
  899. </para>
  900. <para>
  901. <command>b10-cmdctl</command> directly sends commands
  902. (received from the user interface) to the specified component.
  903. Configuration changes are actually commands to
  904. <command>b10-cfgmgr</command> so are sent there.
  905. </para>
  906. <!--
  907. TODO:
  908. "For bindctl to list a module's available configurations and
  909. available commands, it communicates over the cmdctl REST interface.
  910. cmdctl then asks cfgmgr over the msgq command channel. Then cfgmgr
  911. asks the module for its specification and also cfgmgr looks in its
  912. own configuration database for current values."
  913. (05:32:03) jelte: i think cmdctl doesn't request it upon a incoming
  914. GET, but rather requests it once and then listens in for updates,
  915. but you might wanna check with likun
  916. -->
  917. <!-- TODO: replace /usr/local -->
  918. <!-- TODO: permissions -->
  919. <para>The HTTPS server requires a private key,
  920. such as a RSA PRIVATE KEY.
  921. The default location is at
  922. <filename>/usr/local/etc/bind10/cmdctl-keyfile.pem</filename>.
  923. (A sample key is at
  924. <filename>/usr/local/share/bind10/cmdctl-keyfile.pem</filename>.)
  925. It also uses a certificate located at
  926. <filename>/usr/local/etc/bind10/cmdctl-certfile.pem</filename>.
  927. (A sample certificate is at
  928. <filename>/usr/local/share/bind10/cmdctl-certfile.pem</filename>.)
  929. This may be a self-signed certificate or purchased from a
  930. certification authority.
  931. </para>
  932. <note><para>
  933. The HTTPS server doesn't support a certificate request from a
  934. client (at this time).
  935. <!-- TODO: maybe allow request from server side -->
  936. The <command>b10-cmdctl</command> daemon does not provide a
  937. public service. If any client wants to control BIND 10, then
  938. a certificate needs to be first received from the BIND 10
  939. administrator.
  940. The BIND 10 installation provides a sample PEM bundle that matches
  941. the sample key and certificate.
  942. </para></note>
  943. <!-- TODO: cross-ref -->
  944. <!-- TODO
  945. openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
  946. but that is a single file, maybe this should go back to that format?
  947. -->
  948. <!--
  949. <para>
  950. (08:20:56) shane: It is in theory possible to run without cmdctl.
  951. (08:21:02) shane: I think we discussed this.
  952. </para>
  953. -->
  954. <!-- TODO: Please check https://bind10.isc.org/wiki/cmd-ctrld -->
  955. <para>
  956. The <command>b10-cmdctl</command> daemon also requires
  957. the user account file located at
  958. <filename>/usr/local/etc/bind10/cmdctl-accounts.csv</filename>.
  959. This comma-delimited file lists the accounts with a user name,
  960. hashed password, and salt.
  961. (A sample file is at
  962. <filename>/usr/local/share/bind10/cmdctl-accounts.csv</filename>.
  963. It contains the user named <quote>root</quote> with the password
  964. <quote>bind10</quote>.)
  965. </para>
  966. <para>
  967. The administrator may create a user account with the
  968. <command>b10-cmdctl-usermgr</command> tool.
  969. </para>
  970. <!-- TODO: show example -->
  971. <!-- TODO: does cmdctl need to be restarted to change cert or key
  972. or accounts database -->
  973. <para>
  974. By default the HTTPS server listens on the localhost port 8080.
  975. The port can be set by using the <option>--port</option> command line option.
  976. The address to listen on can be set using the <option>--address</option> command
  977. line argument.
  978. Each HTTPS connection is stateless and times out in 1200 seconds
  979. by default. This can be
  980. redefined by using the <option>--idle-timeout</option> command line argument.
  981. </para>
  982. <section id="cmdctl.spec">
  983. <title>Configuration specification for b10-cmdctl</title>
  984. <para>
  985. The configuration items for <command>b10-cmdctl</command> are:
  986. <varname>accounts_file</varname> which defines the path to the
  987. user accounts database (the default is
  988. <filename>/usr/local/etc/bind10/cmdctl-accounts.csv</filename>);
  989. <varname>cert_file</varname> which defines the path to the
  990. PEM certificate file (the default is
  991. <filename>/usr/local/etc/bind10/cmdctl-certfile.pem</filename>);
  992. and
  993. <varname>key_file</varname> which defines the path to the
  994. PEM private key file (the default is
  995. <filename>/usr/local/etc/bind10/cmdctl-keyfile.pem</filename>).
  996. </para>
  997. </section>
  998. <!--
  999. TODO
  1000. (12:21:30) jinmei: I'd like to have sample session using a command line www client such as wget
  1001. -->
  1002. </chapter>
  1003. <chapter id="bindctl">
  1004. <title>Control and configure user interface</title>
  1005. <note><para>
  1006. For the current release, <command>bindctl</command>
  1007. is the only user interface. It is expected that upcoming
  1008. releases will provide another interactive command-line
  1009. interface and a web-based interface for controlling and
  1010. configuring BIND 10.
  1011. </para></note>
  1012. <note><para>
  1013. <command>bindctl</command> has an internal command history, as
  1014. well as tab-completion for most of the commands and arguments.
  1015. However, these are only enabled if the python readline module
  1016. is available on the system. If not, neither of these
  1017. features will be supported.
  1018. </para></note>
  1019. <para>
  1020. The <command>bindctl</command> tool provides an interactive
  1021. prompt for configuring, controlling, and querying the BIND 10
  1022. components.
  1023. It communicates directly with a REST-ful interface over HTTPS
  1024. provided by <command>b10-cmdctl</command>. It doesn't
  1025. communicate to any other components directly.
  1026. </para>
  1027. <section id="bindctl_commandline_options">
  1028. <title>bindctl command-line options</title>
  1029. <variablelist>
  1030. <varlistentry>
  1031. <term>-a <replaceable>&lt;address&gt;</replaceable>, --address=<replaceable>&lt;address&gt;</replaceable></term>
  1032. <listitem>
  1033. <simpara>
  1034. IP address that BIND 10's <command>b10-cmdctl</command>
  1035. module is listening on. By default, this is 127.0.0.1.
  1036. </simpara>
  1037. </listitem>
  1038. </varlistentry>
  1039. <varlistentry>
  1040. <term>-c <replaceable>&lt;certificate file&gt;</replaceable>, --certificate-chain=<replaceable>&lt;certificate file&gt;</replaceable></term>
  1041. <listitem>
  1042. <simpara>
  1043. PEM-formatted server certificate file. When this option is
  1044. given, <command>bindctl</command> will verify the server
  1045. certificate using the given file as the root of the
  1046. certificate chain. If not specified, <command>bindctl
  1047. </command> does not validate the certificate.
  1048. </simpara>
  1049. </listitem>
  1050. </varlistentry>
  1051. <varlistentry>
  1052. <term>--csv-file-dir=<replaceable>&lt;csv file&gt;</replaceable></term>
  1053. <listitem>
  1054. <simpara>
  1055. <command>bindctl</command> stores the username and
  1056. password for logging in in a file called
  1057. <filename>default_user.csv</filename>;
  1058. this option specifies the directory where this file is
  1059. stored and read from. When not specified,
  1060. <filename>~/.bind10/</filename> is used.
  1061. <note>Currently, this file contains an unencrypted password.</note>
  1062. </simpara>
  1063. </listitem>
  1064. </varlistentry>
  1065. <varlistentry>
  1066. <term>-h, --help</term>
  1067. <listitem>
  1068. <simpara>
  1069. Shows a short overview of the command-line options of
  1070. <command>bindctl</command>, and exits.
  1071. </simpara>
  1072. </listitem>
  1073. </varlistentry>
  1074. <varlistentry>
  1075. <term>--version</term>
  1076. <listitem>
  1077. <simpara>
  1078. Shows the version of <command>bindctl</command>, and exits.
  1079. </simpara>
  1080. </listitem>
  1081. </varlistentry>
  1082. <varlistentry>
  1083. <term>-p <replaceable>&lt;port number&gt;</replaceable>, --port=<replaceable>&lt;port number&gt;</replaceable></term>
  1084. <listitem>
  1085. <simpara>
  1086. Port number that BIND 10's <command>b10-cmdctl</command>
  1087. module is listening on. By default, this is port 8080.
  1088. </simpara>
  1089. </listitem>
  1090. </varlistentry>
  1091. </variablelist>
  1092. </section>
  1093. <section id="bindctl_general_syntax">
  1094. <title>General syntax of bindctl commands</title>
  1095. The <command>bindctl</command> tool is an interactive
  1096. command-line tool, with dynamic commands depending on the
  1097. BIND 10 modules that are running. There are a number of
  1098. fixed commands that have no module and that are always
  1099. available.
  1100. The general syntax of a command is
  1101. <screen><userinput>&lt;module&gt; &lt;command&gt; <replaceable>[argument(s)]</replaceable></userinput></screen>
  1102. For example, the Boss module has a 'shutdown' command to shut down
  1103. BIND 10, with an optional argument 'help':
  1104. <screen>&gt; <userinput>Boss shutdown help</userinput>
  1105. Command shutdown (Shut down BIND 10)
  1106. help (Get help for command)
  1107. This command has no parameters
  1108. </screen>
  1109. There are no mandatory arguments, only the optional 'help'.
  1110. </section>
  1111. <section id="bindctl_help">
  1112. <title>Bindctl help</title>
  1113. <command>help</command> is both a command and an option that is available to all other commands. When run as a command directly, it shows the available modules.
  1114. <screen>&gt; <userinput>help</userinput>
  1115. usage: &lt;module name&gt; &lt;command name&gt; [param1 = value1 [, param2 = value2]]
  1116. Type Tab character to get the hint of module/command/parameters.
  1117. Type "help(? h)" for help on bindctl.
  1118. Type "&lt;module_name&gt; help" for help on the specific module.
  1119. Type "&lt;module_name&gt; &lt;command_name&gt; help" for help on the specific command.
  1120. Available module names:
  1121. <emphasis>(list of modules)</emphasis>
  1122. </screen>
  1123. When 'help' is used as a command to a module, it shows the supported commands for the module; for example:
  1124. <screen>&gt; <userinput>Boss help</userinput>
  1125. Module Boss Master process
  1126. Available commands:
  1127. help Get help for module.
  1128. shutdown Shut down BIND 10
  1129. ping Ping the boss process
  1130. show_processes
  1131. List the running BIND 10 processes
  1132. </screen>
  1133. And when added to a module command, it shows the description and parameters of that specific command; for example:
  1134. <screen>&gt; <userinput>Auth loadzone help</userinput>
  1135. Command loadzone ((Re)load a specified zone)
  1136. help (Get help for command)
  1137. Parameters:
  1138. class (string, optional)
  1139. origin (string, mandatory)
  1140. </screen>
  1141. </section>
  1142. <section id="bindctl_command_arguments">
  1143. <title>Command arguments</title>
  1144. <simpara>
  1145. Commands can have arguments, which can be either optional or
  1146. mandatory. They can be specified by name
  1147. (e.g. <command><replaceable>&lt;command&gt;</replaceable> <replaceable>&lt;argument name&gt;=&lt;argument value&gt;</replaceable></command>), or positionally,
  1148. (e.g. <command><replaceable>&lt;command&gt;</replaceable> <replaceable>&lt;argument value 1&gt;</replaceable> <replaceable>&lt;argument value 2&gt;</replaceable></command>).
  1149. </simpara>
  1150. <simpara>
  1151. <command><replaceable>&lt;command&gt;</replaceable> <replaceable>help</replaceable></command>
  1152. shows the arguments a command supports and which of those are
  1153. mandatory, and in which order the arguments are expected if
  1154. positional arguments are used.
  1155. </simpara>
  1156. <simpara>
  1157. For example, the <command>loadzone</command> command of the Auth
  1158. module, as shown in the last example of the previous section, has
  1159. two arguments, one of which is optional. The positional arguments in
  1160. this case are class first and origin second; for example:
  1161. <screen>&gt; <userinput>Auth loadzone IN example.com.</userinput></screen>
  1162. But since the class is optional (defaulting to IN), leaving it out
  1163. works as well:
  1164. <screen>&gt; <userinput>Auth loadzone example.com.</userinput></screen>
  1165. </simpara>
  1166. <simpara>
  1167. The arguments can also be provided with their names, in which
  1168. case the order does not matter:
  1169. <screen>&gt; <userinput>Auth loadzone origin="example.com." class="IN"</userinput></screen>
  1170. </simpara>
  1171. </section>
  1172. <section id="bindctl_module_commands">
  1173. <title>Module commands</title>
  1174. Each module has its own set of commands (if any), which will only be
  1175. available if the module is running. For instance, the
  1176. Auth module has a <command>loadzone</command> command.
  1177. The commands a module provides are documented in
  1178. this guide in the section of that module or in the module's
  1179. corresponding manual page.
  1180. </section>
  1181. <section>
  1182. <title>Configuration commands</title>
  1183. Configuration commands are used to view and change the configuration
  1184. of BIND 10 and its modules. Module configuration is only shown if
  1185. that module is running, but similar to commands, there are a number
  1186. of top-level configuration items that are always available (for
  1187. instance <varname>tsig_keys</varname> and
  1188. <varname>data_sources</varname>).
  1189. Configuration changes (set, unset, add and remove) are done locally
  1190. first, and have no immediate effect. The changes can be viewed with
  1191. <command>config diff</command>, and either reverted
  1192. (<command>config revert</command>), or committed
  1193. (<command>config commit</command>).
  1194. In the latter case, all local changes are submitted
  1195. to the configuration manager, which verifies them, and if they are
  1196. accepted, applied and saved in persistent storage.
  1197. When identifying items in configuration commands, the format is
  1198. <screen><userinput>Module/example/item</userinput></screen>
  1199. Sub-elements of names, lists and sets (see <xref linkend=
  1200. "bindctl_configuration_data_types"/>) are separated with the '/'
  1201. character, and list indices are identified with [<replaceable>&lt;index&gt;</replaceable>]; for example:
  1202. <screen><userinput>Module/example/list[2]/foo</userinput></screen>
  1203. <section id="bindctl_configuration_command_list">
  1204. <title>List of configuration commands</title>
  1205. The following configuration commands are available:
  1206. <variablelist>
  1207. <varlistentry>
  1208. <term>show [all] [item name]</term>
  1209. <listitem>
  1210. <simpara>
  1211. Shows the current configuration of the given item. If 'all'
  1212. is given, it will recurse through the entire set, and show
  1213. every nested value.
  1214. </simpara>
  1215. </listitem>
  1216. </varlistentry>
  1217. <varlistentry>
  1218. <term>show_json [item name]</term>
  1219. <listitem>
  1220. <simpara>
  1221. Shows the full configuration of the given item in JSON format.
  1222. </simpara>
  1223. </listitem>
  1224. </varlistentry>
  1225. <varlistentry>
  1226. <term>add &lt;item name&gt; [value]</term>
  1227. <listitem>
  1228. <simpara>
  1229. Add an entry to configuration list or a named set (see <xref
  1230. linkend="bindctl_configuration_data_types"/>).
  1231. When adding to a list, the command has one optional
  1232. argument, a value to add to the list. The value must
  1233. be in correct JSON and complete. When adding to a
  1234. named set, it has one mandatory parameter (the name to
  1235. add), and an optional parameter value, similar to when
  1236. adding to a list. In either case, when no value is
  1237. given, an entry will be constructed with default
  1238. values.
  1239. </simpara>
  1240. </listitem>
  1241. </varlistentry>
  1242. <varlistentry>
  1243. <term>remove</term>
  1244. <listitem>
  1245. <simpara>
  1246. Remove an item from a configuration list or a named set.
  1247. When removing an item for a list, either the index needs to
  1248. be specified, or the complete value of the element to remove
  1249. must be specified (in JSON format).
  1250. </simpara>
  1251. </listitem>
  1252. </varlistentry>
  1253. <varlistentry>
  1254. <term>set &lt;item name&gt; &lt;value&gt;</term>
  1255. <listitem>
  1256. <simpara>
  1257. Directly set the value of the given item to the given value.
  1258. </simpara>
  1259. </listitem>
  1260. </varlistentry>
  1261. <varlistentry>
  1262. <term>unset &lt;item name&gt;</term>
  1263. <listitem>
  1264. <simpara>
  1265. Remove any user-specified value for the given item.
  1266. </simpara>
  1267. </listitem>
  1268. </varlistentry>
  1269. <varlistentry>
  1270. <term>diff</term>
  1271. <listitem>
  1272. <simpara>
  1273. Show all current local changes that have not been
  1274. committed yet.
  1275. </simpara>
  1276. </listitem>
  1277. </varlistentry>
  1278. <varlistentry>
  1279. <term>revert</term>
  1280. <listitem>
  1281. <simpara>
  1282. Revert all local changes without committing them.
  1283. </simpara>
  1284. </listitem>
  1285. </varlistentry>
  1286. <varlistentry>
  1287. <term>commit</term>
  1288. <listitem>
  1289. <simpara>
  1290. Send all local changes to the configuration manager, which
  1291. will validate them, and apply them if validation succeeds.
  1292. </simpara>
  1293. </listitem>
  1294. </varlistentry>
  1295. <varlistentry>
  1296. <term>go</term>
  1297. <listitem>
  1298. <simpara>
  1299. Go to a specific configuration part, similar to the 'cd'
  1300. command in a shell.
  1301. <note>There are a number of problems with the current
  1302. implementation of go within <command>bindctl</command>,
  1303. and we recommend not using it for general cases.</note>
  1304. </simpara>
  1305. </listitem>
  1306. </varlistentry>
  1307. </variablelist>
  1308. </section>
  1309. <section id="bindctl_configuration_data_types">
  1310. <title>Configuration data types</title>
  1311. Configuration data can be of different types, which can be modified
  1312. in ways that depend on the types. There are a few syntax
  1313. restrictions on these types, but only basic ones. Modules may impose
  1314. additional restrictions on the values of elements.
  1315. <variablelist>
  1316. <varlistentry>
  1317. <term>integer</term>
  1318. <listitem>
  1319. <simpara>
  1320. A basic integer; can be set directly with <command>config set</command>, to any integer value.
  1321. </simpara>
  1322. </listitem>
  1323. </varlistentry>
  1324. <varlistentry>
  1325. <term>real</term>
  1326. <listitem>
  1327. <simpara>
  1328. A basic floating point number; can be set directly with <command>config set</command>, to any floating point value.
  1329. </simpara>
  1330. </listitem>
  1331. </varlistentry>
  1332. <varlistentry>
  1333. <term>boolean</term>
  1334. <listitem>
  1335. <simpara>
  1336. A basic boolean value; can be set directly with <command>config set</command>, to either <command>true</command> or <command>false</command>.
  1337. </simpara>
  1338. </listitem>
  1339. </varlistentry>
  1340. <varlistentry>
  1341. <term>string</term>
  1342. <listitem>
  1343. <simpara>
  1344. A basic string value; can be set directly with <command>config set,</command> so any string. Double quotation marks are optional.
  1345. </simpara>
  1346. </listitem>
  1347. </varlistentry>
  1348. <varlistentry>
  1349. <term>null</term>
  1350. <listitem>
  1351. <simpara>
  1352. This is a special type representing 'no value at all'; usable in compound structures that have optional elements that are not set.
  1353. </simpara>
  1354. </listitem>
  1355. </varlistentry>
  1356. <varlistentry>
  1357. <term>maps</term>
  1358. <listitem>
  1359. <simpara>
  1360. Maps are (pre-defined) compound collections of other
  1361. elements of any other type. They are not usually
  1362. modified directly, but their elements are. Every
  1363. top-level element for a module is a map containing
  1364. the configuration values for that map, which can
  1365. themselves be maps again. For instance, the Auth
  1366. module configuration is a map containing the
  1367. elements '<varname>listen_on</varname>' (list) and '<varname>tcp_recv_timeout</varname>'
  1368. (integer). When changing one of its values, they can
  1369. be modified directly with <command>config set
  1370. Auth/tcp_recv_timeout 3000</command>.
  1371. </simpara>
  1372. <simpara>
  1373. Some map entries are optional. If they are, and
  1374. currently have a value, the value can be unset by
  1375. using either <command>config unset
  1376. <replaceable>&lt;item name&gt;</replaceable>
  1377. </command> or <command>config set
  1378. <replaceable>&lt;item name&gt;</replaceable>
  1379. null</command>.
  1380. </simpara>
  1381. <simpara>
  1382. Maps <emphasis>can</emphasis> be modified as a whole,
  1383. but using the full JSON representation of
  1384. the entire map to set.
  1385. Since this involves a lot of text, this is usually
  1386. not recommended.
  1387. </simpara>
  1388. <simpara>
  1389. Another example is the Logging virtual module, which
  1390. is, like any module, a map, but it only contains one
  1391. element: a list of loggers. Normally, an
  1392. administrator would only modify that list (or its
  1393. elements) directly, but it is possible to set the
  1394. entire map in one command; for example:
  1395. <command> config set Logging { "loggers": [] } </command>
  1396. </simpara>
  1397. </listitem>
  1398. </varlistentry>
  1399. <varlistentry>
  1400. <term>list</term>
  1401. <listitem>
  1402. <simpara>
  1403. A list is a compound list of other elements of the
  1404. same type. Elements can be added with <command>config
  1405. add <replaceable>&lt;list name&gt; [value]</replaceable></command>, and removed with
  1406. <command>config remove <replaceable>&lt;list name&gt; [value]</replaceable></command> or
  1407. <command>config remove <replaceable>&lt;list name&gt;</replaceable><replaceable>&lt;index&gt;</replaceable></command>.
  1408. The index is of the form <emphasis>square bracket, number,
  1409. square bracket</emphasis> (e.g.
  1410. <command>[0]</command>), and it immediately follows
  1411. the list name (there is no separator or space
  1412. between them). List indices start with 0 for the
  1413. first element.
  1414. </simpara>
  1415. <simpara>
  1416. For addition, if the value is omitted, an entry with
  1417. default values will be added. For removal, either
  1418. the index or the full value (in JSON format) needs
  1419. to be specified.
  1420. </simpara>
  1421. <simpara>
  1422. Lists can also be used with
  1423. <command>config set</command>,
  1424. but like maps, only by specifying the
  1425. entire list value in JSON format.
  1426. </simpara>
  1427. <simpara>
  1428. For example, this command shows the port number used for the second element of the list <varname>listen_on</varname> in the Auth module:
  1429. <command> config show Auth/listen_on[1]/port</command>
  1430. </simpara>
  1431. </listitem>
  1432. </varlistentry>
  1433. <varlistentry>
  1434. <term>named set</term>
  1435. <listitem>
  1436. <simpara>
  1437. Named sets are similar to lists, in that they are
  1438. sets of elements of the same type, but they are not
  1439. indexed by numbers, but by strings.
  1440. </simpara>
  1441. <simpara>
  1442. Values can be added with
  1443. <command>config add <replaceable>&lt;item name&gt; &lt;string&gt; [value]</replaceable></command>
  1444. where 'string' is the name of the element. If 'value'
  1445. is ommitted, default values will be used. Elements
  1446. can be removed with <command>config remove
  1447. <replaceable>&lt;item
  1448. name&gt; &lt;string&gt;</replaceable></command>
  1449. </simpara>
  1450. <simpara>
  1451. Elements in a named set can be addressed similarly
  1452. to maps.
  1453. </simpara>
  1454. <simpara>
  1455. For example, the <command>Boss/components</command>
  1456. elements is a named set;
  1457. adding, showing, and then removing an element
  1458. can be done with the following three commands (note
  1459. the '/'-character versus the space before
  1460. 'example_module'):
  1461. </simpara>
  1462. <simpara>
  1463. <command>config add Boss/components example_module</command>
  1464. </simpara>
  1465. <simpara>
  1466. <command>config show Boss/components/example_module</command>
  1467. </simpara>
  1468. <simpara>
  1469. <command>config remove Boss/components example_module</command>
  1470. </simpara>
  1471. </listitem>
  1472. </varlistentry>
  1473. <varlistentry>
  1474. <term>any</term>
  1475. <listitem>
  1476. <simpara>
  1477. The 'any' type is a special type that can have any
  1478. form. Apart from that, it must consist of elements as
  1479. described in this chapter, there is no restriction
  1480. on which element types are used. This type is used
  1481. in places where different data formats could be
  1482. used. Element modification commands depend on the
  1483. actual type of the value. For instance, if the value
  1484. of an 'any' element is a list, <command>config add
  1485. </command> and <command>config remove</command> work
  1486. as for other lists.
  1487. </simpara>
  1488. </listitem>
  1489. </varlistentry>
  1490. </variablelist>
  1491. </section>
  1492. </section>
  1493. <section>
  1494. <title>The execute command</title>
  1495. The <command>execute</command> command executes a set of commands,
  1496. either from a file
  1497. or from a pre-defined set. Currently, the only predefined set is
  1498. <command>init_authoritative_server</command>, which adds
  1499. <command>b10-auth</command>, <command>b10-xfrin</command>, and
  1500. <command>b10-xfrout</command> to the set of components to be
  1501. started by BIND 10. This
  1502. pre-defined set does not commit the changes, so these modules do not
  1503. show up for commands or configuration until the user enters
  1504. <command>config commit</command> after
  1505. <command>execute init_authoritative_server</command>. For example:
  1506. <screen>&gt; <userinput>execute init_authoritative_server</userinput></screen>
  1507. <screen>&gt; <userinput>execute file /tmp/example_commands</userinput></screen>
  1508. The optional argument <command>show</command> displays the exact set of
  1509. commands that would be executed; for example:
  1510. <screen>&gt; <userinput>execute init_authoritative_server show</userinput>
  1511. !echo adding Authoritative server component
  1512. config add /Boss/components b10-auth
  1513. config set /Boss/components/b10-auth/kind needed
  1514. config set /Boss/components/b10-auth/special auth
  1515. !echo adding Xfrin component
  1516. config add /Boss/components b10-xfrin
  1517. config set /Boss/components/b10-xfrin/address Xfrin
  1518. config set /Boss/components/b10-xfrin/kind dispensable
  1519. !echo adding Xfrout component
  1520. config add /Boss/components b10-xfrout
  1521. config set /Boss/components/b10-xfrout/address Xfrout
  1522. config set /Boss/components/b10-xfrout/kind dispensable
  1523. !echo adding Zone Manager component
  1524. config add /Boss/components b10-zonemgr
  1525. config set /Boss/components/b10-zonemgr/address Zonemgr
  1526. config set /Boss/components/b10-zonemgr/kind dispensable
  1527. !echo Components added. Please enter "config commit" to
  1528. !echo finalize initial setup and run the components.
  1529. </screen>
  1530. The optional <command>show</command> argument may also be used when
  1531. executing a script from a file; for example:
  1532. <screen>&gt; <userinput>execute file /tmp/example_commands show</userinput></screen>
  1533. <section id="bindctl_execute_directives">
  1534. <title>Execute directives</title>
  1535. Within sets of commands to be run with the <command>execute</command>
  1536. command, a number of directives are supported:
  1537. <variablelist>
  1538. <varlistentry>
  1539. <term>!echo <replaceable>&lt;string&gt;</replaceable></term>
  1540. <listitem>
  1541. <simpara>
  1542. Prints the given string to <command>bindctl</command>'s
  1543. output.
  1544. </simpara>
  1545. </listitem>
  1546. </varlistentry>
  1547. <varlistentry>
  1548. <term>!verbose on</term>
  1549. <listitem>
  1550. <simpara>
  1551. Enables verbose mode; all following commands that are to
  1552. be executed are also printed.
  1553. </simpara>
  1554. </listitem>
  1555. </varlistentry>
  1556. <varlistentry>
  1557. <term>!verbose off</term>
  1558. <listitem>
  1559. <simpara>
  1560. Disables verbose mode; following commands that are to
  1561. be executed are no longer printed.
  1562. </simpara>
  1563. </listitem>
  1564. </varlistentry>
  1565. </variablelist>
  1566. </section>
  1567. <section id="bindctl_execute_notes">
  1568. <title>Notes on execute scripts</title>
  1569. Within scripts, you can add or remove modules with the normal
  1570. configuration commands for <command>Boss/components</command>.
  1571. However, as module
  1572. configuration and commands do not show up until the module is
  1573. running, it is currently not possible to add a module and set
  1574. its configuration in one script. This will be addressed in the
  1575. future, but for now the only option is to add and configure
  1576. modules in separate commands and execute scripts.
  1577. </section>
  1578. </section>
  1579. </chapter>
  1580. <chapter id="common">
  1581. <title>Common configuration elements</title>
  1582. <para>
  1583. Some things are configured in the same or similar manner across
  1584. many modules. So we show them here in one place.
  1585. </para>
  1586. <section id='common-tsig'>
  1587. <title>TSIG keys</title>
  1588. <para>
  1589. TSIG is a way to sign requests and responses in DNS. It is defined in
  1590. RFC 2845 and uses symmetric cryptography to sign the DNS messages. If
  1591. you want to make any use of TSIG (to authenticate transfers or DDNS,
  1592. for example), you need to set up shared secrets between the endpoints.
  1593. </para>
  1594. <para>
  1595. BIND 10 uses a global key ring for the secrets. It doesn't currently
  1596. mean they would be stored differently, they are just in one place of
  1597. the configuration.
  1598. </para>
  1599. <section id='tsig-key-syntax'>
  1600. <title>Key anatomy and syntax</title>
  1601. <para>
  1602. Each key has three attributes. One is a name by which it is referred
  1603. both in DNS packets and the rest of the configuration. Another is the
  1604. algorithm used to compute the signature. And the last part is a
  1605. base64 encoded secret, which might be any blob of data.
  1606. </para>
  1607. <para>
  1608. The parts are written into a string, concatenated together by colons.
  1609. So if you wanted to have a key called "example.key", used as a
  1610. HMAC-MD5 key with secret "secret", you'd write it as:
  1611. <screen>"example.key.:c2VjcmV0:hmac-md5"</screen>
  1612. </para>
  1613. <para>
  1614. The HMAC-MD5 algorithm is the default, so you can omit it. You could
  1615. write the same key as:
  1616. <screen>"example.key.:c2VjcmV0"</screen>
  1617. </para>
  1618. <para>
  1619. You can also use these algorithms (which may not be omitted from the
  1620. key definition if used):
  1621. <itemizedlist>
  1622. <listitem>hmac-sha1</listitem>
  1623. <listitem>hmac-sha224</listitem>
  1624. <listitem>hmac-sha256</listitem>
  1625. <listitem>hmac-sha384</listitem>
  1626. <listitem>hmac-sha512</listitem>
  1627. </itemizedlist>
  1628. </para>
  1629. <para>
  1630. The name of the key must be a valid DNS name.
  1631. </para>
  1632. </section>
  1633. <section id='tsig-key-ring'>
  1634. <title>Key ring</title>
  1635. <para>
  1636. The key ring lives in the configuration in "tsig_keys/keys". Most of
  1637. the system uses the keys from there &mdash; ACLs, authoritative server to
  1638. sign responses to signed queries, and <command>b10-xfrin</command>
  1639. and <command>b10-xfrout</command> to sign transfers.
  1640. </para>
  1641. <para>
  1642. The key ring is just a list of strings, each describing one key. So,
  1643. to add a new key, you can do this:
  1644. <screen>&gt; <userinput>config add tsig_keys/keys "example.key.:c2VjcmV0"</userinput>
  1645. &gt; <userinput>config show tsig_keys/keys</userinput>
  1646. tsig_keys/keys[0] "example.key.:c2VjcmV0" string (modified)
  1647. &gt; <userinput>config commit</userinput></screen>
  1648. </para>
  1649. <para>
  1650. You can keep as many keys as you want in the key ring, but each must
  1651. have a different name.
  1652. </para>
  1653. </section>
  1654. </section>
  1655. <section id='common-acl'>
  1656. <title>ACLs</title>
  1657. <para>
  1658. An ACL, or Access Control List, is a way to describe if a request
  1659. is allowed or disallowed. The principle is, there's a list of rules.
  1660. Each rule is a name-value mapping (a dictionary, in the JSON
  1661. terminology). Each rule must contain exactly one mapping called
  1662. "action", which describes what should happen if the rule applies.
  1663. There may be more mappings, called matches, which describe the
  1664. conditions under which the rule applies.
  1665. </para>
  1666. <para>
  1667. When there's a query, the first rule is examined. If it matches, the
  1668. action in it is taken. If not, next rule is examined. If there are no
  1669. more rules to examine, a default action is taken.
  1670. </para>
  1671. <para>
  1672. There are three possible "action" values. The "ACCEPT" value means
  1673. the query is handled. If it is "REJECT", the query is not answered,
  1674. but a polite error message is sent back (if that makes sense in the
  1675. context). The "DROP" action acts like a black hole. The query is
  1676. not answered and no error message is sent.
  1677. </para>
  1678. <para>
  1679. If there are multiple matching conditions inside the rule, all of
  1680. them must be satisfied for the rule to apply. This can be used,
  1681. for example, to require the query to be signed by a TSIG key and
  1682. originate from given address.
  1683. </para>
  1684. <para>
  1685. This is encoded in form of JSON. Semi-formal description could look
  1686. something like this. It is described in more details below.
  1687. <!-- FIXME: Is <screen> really the correct one?-->
  1688. <screen>ACL := [ RULE, RULE, ... ]
  1689. RULE := { "action": "ACCEPT"|"REJECT"|"DROP", MATCH, MATCH, ... }
  1690. RULE_RAW := { MATCH, MATCH, ... }
  1691. MATCH := FROM_MATCH|KEY_MATCH|NOT_MATCH|OR_MATCH|AND_MATCH|...
  1692. FROM_MATCH := "from": [RANGE, RANGE, RANGE, ...] | RANGE
  1693. RANGE := "&lt;ip range&gt;"
  1694. KEY_MATCH := "key": [KEY, KEY, KEY, ...] | KEY
  1695. KEY := "&lt;key name&gt;"
  1696. NOT_MATCH := "NOT": RULE_RAW
  1697. OR_MATCH := "ANY": [ RULE_RAW, RULE_RAW, ... ]
  1698. AND_MATCH := "ALL": [ RULE_RAW, RULE_RAW, ... ]
  1699. </screen>
  1700. </para>
  1701. <section>
  1702. <title>Matching properties</title>
  1703. <para>
  1704. The first thing you can check against is the source address
  1705. of request. The name is <varname>from</varname> and the value
  1706. is a string containing either a single IPv4 or IPv6 address,
  1707. or a range in the usual slash notation (eg. "192.0.2.0/24").
  1708. </para>
  1709. <para>
  1710. The other is TSIG key by which the message was signed. The ACL
  1711. contains only the name (under the name "key"), the key itself
  1712. must be stored in the global key ring (see <xref
  1713. linkend="tsig-key-ring"/>).
  1714. This property is applicable only to the DNS context.
  1715. </para>
  1716. <para>
  1717. More properties to match are planned &mdash; the destination
  1718. address, ports, matches against the packet content.
  1719. </para>
  1720. </section>
  1721. <section>
  1722. <title>More complicated matches</title>
  1723. <para>
  1724. From time to time, you need to express something more complex
  1725. than just a single address or key.
  1726. </para>
  1727. <para>
  1728. You can specify a list of values instead of single value. Then
  1729. the property needs to match at least one of the values listed
  1730. &mdash; so you can say <quote>"from": ["192.0.2.0/24",
  1731. "2001:db8::/32"]</quote> to match any address in the ranges
  1732. set aside for documentation. The keys or any future properties
  1733. will work in a similar way.
  1734. </para>
  1735. <para>
  1736. If that is not enough, you can compose the matching conditions
  1737. to logical expressions. They are called "ANY", "ALL" and "NOT".
  1738. The "ANY" and "ALL" ones contain lists of subexpressions &mdash;
  1739. each subexpression is a similar dictionary, just not containing
  1740. the "action" element. The "NOT" contains single subexpression.
  1741. Their function should be obvious &mdash; "NOT" matches if and
  1742. only if the subexpression does not match. The "ALL" matches exactly
  1743. when each of the subexpressions matches and "ANY" when at least
  1744. one matches.
  1745. </para>
  1746. </section>
  1747. <section>
  1748. <title>Examples</title>
  1749. <para>
  1750. All the examples here is just the JSON representing the ACL,
  1751. nicely formatted and split across lines. They are out of any
  1752. surrounding context. This is similar to what you'd get from
  1753. <command>config show_json</command> called on the entry containing
  1754. the ACL.
  1755. </para>
  1756. <para>
  1757. In the first example, the ACL accepts queries from two known hosts.
  1758. Each host has an IP addresses (both IPv4 and IPv6) and a TSIG
  1759. key. Other queries are politely rejected. The last entry in the list
  1760. has no conditions &mdash; making it match any query.
  1761. <screen>[
  1762. {
  1763. "from": ["192.0.2.1", "2001:db8::1"],
  1764. "key": "first.key",
  1765. "action": "ACCEPT"
  1766. },
  1767. {
  1768. "from": ["192.0.2.2", "2001:db8::2"],
  1769. "key": "second.key",
  1770. "action": "ACCEPT"
  1771. },
  1772. {
  1773. "action": "REJECT"
  1774. }
  1775. ]</screen>
  1776. </para>
  1777. <para>
  1778. Now we show two ways to accept only the queries from private ranges.
  1779. This is the same as rejecting anything that is outside.
  1780. <screen>[
  1781. {
  1782. "from": [
  1783. "10.0.0.0/8",
  1784. "172.16.0.0/12",
  1785. "192.168.0.0/16",
  1786. "fc00::/7"
  1787. ],
  1788. "action": "ACCEPT"
  1789. },
  1790. {
  1791. "action": "REJECT"
  1792. }
  1793. ]</screen>
  1794. <screen>[
  1795. {
  1796. "NOT": {
  1797. "ANY": [
  1798. {"from": "10.0.0.0/8"},
  1799. {"from": "172.16.0.0/12"},
  1800. {"from": "192.168.0.0/16"},
  1801. {"from": "fc00::/7"}
  1802. ]
  1803. },
  1804. "action": "REJECT"
  1805. },
  1806. {
  1807. "action": "ACCEPT"
  1808. }
  1809. ]</screen>
  1810. </para>
  1811. </section>
  1812. <section>
  1813. <title>Interaction with <command>bindctl</command></title>
  1814. <para>
  1815. Currently, <command>bindctl</command> has hard time coping with
  1816. the variable nature of the ACL syntax. This technical limitation
  1817. makes it impossible to edit parts of the entries. You need to
  1818. set the whole entry at once, providing the whole JSON value.
  1819. </para>
  1820. <para>
  1821. This limitation is planned to be solved soon at least partially.
  1822. </para>
  1823. <para>
  1824. You'd do something like this to create the second example.
  1825. Note that the whole JSON must be on a single line.
  1826. <screen>&gt; <userinput>config add somewhere/acl</userinput>
  1827. &gt; <userinput>config set somewhere/acl[0] { "from": [ "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fc00::/7" ], "action": "ACCEPT" }</userinput>
  1828. &gt; <userinput>config add somewhere/acl</userinput>
  1829. &gt; <userinput>config set somewhere/acl[1] { "action": "REJECT" }</userinput>
  1830. &gt; <userinput>config commit</userinput></screen>
  1831. </para>
  1832. </section>
  1833. </section>
  1834. </chapter>
  1835. <chapter id="bind10.config">
  1836. <title>bind10 Control and Configuration</title>
  1837. <para>
  1838. This chapter explains how to control and configure the
  1839. <command>bind10</command> parent.
  1840. The startup of this resident process that runs the BIND 10
  1841. daemons is covered in <xref linkend="bind10"/>.
  1842. </para>
  1843. <section id="bind10.shutdown">
  1844. <title>Stopping bind10</title>
  1845. <para>
  1846. The BIND 10 suite may be shut down by stopping the
  1847. parent <command>bind10</command> process. This may be done
  1848. by running the <userinput>Boss shutdown</userinput> command
  1849. at the <command>bindctl</command> prompt.
  1850. </para>
  1851. </section>
  1852. <section id="bind10.components">
  1853. <title>Configuration to start processes</title>
  1854. <para>
  1855. The processes to be used can be configured for
  1856. <command>bind10</command> to start, with the exception
  1857. of the required <command>b10-sockcreator</command>,
  1858. <command>b10-msgq</command> and <command>b10-cfgmgr</command>
  1859. components.
  1860. The configuration is in the <varname>Boss/components</varname>
  1861. section. Each element represents one component, which is
  1862. an abstraction of a process.
  1863. </para>
  1864. <para>
  1865. To add a process to the set, let's say the resolver (which
  1866. is not started by default), you would do this:
  1867. <screen>&gt; <userinput>config add Boss/components b10-resolver</userinput>
  1868. &gt; <userinput>config set Boss/components/b10-resolver/special resolver</userinput>
  1869. &gt; <userinput>config set Boss/components/b10-resolver/kind needed</userinput>
  1870. &gt; <userinput>config set Boss/components/b10-resolver/priority 10</userinput>
  1871. &gt; <userinput>config commit</userinput></screen></para>
  1872. <para>
  1873. Now, what it means. We add an entry called
  1874. <quote>b10-resolver</quote>. It is both a name used to
  1875. reference this component in the configuration and the name
  1876. of the process to start. Then we set some parameters on
  1877. how to start it.
  1878. </para>
  1879. <para>
  1880. The <varname>special</varname> setting is for components
  1881. that need some kind of special care during startup or
  1882. shutdown. Unless specified, the component is started in a
  1883. usual way. This is the list of components that need to be
  1884. started in a special way, with the value of special used
  1885. for them:
  1886. <!-- TODO: this still doesn't explain why they are special -->
  1887. <table>
  1888. <title>Special startup components</title>
  1889. <tgroup cols='3' align='left'>
  1890. <colspec colname='component'/>
  1891. <colspec colname='special'/>
  1892. <colspec colname='description'/>
  1893. <thead><row><entry>Component</entry><entry>Special</entry><entry>Description</entry></row></thead>
  1894. <tbody>
  1895. <row><entry>b10-auth</entry><entry>auth</entry><entry>Authoritative DNS server</entry></row>
  1896. <row><entry>b10-resolver</entry><entry>resolver</entry><entry>DNS resolver</entry></row>
  1897. <row><entry>b10-cmdctl</entry><entry>cmdctl</entry><entry>Command control (remote control interface)</entry></row>
  1898. <!-- TODO Either add xfrin and xfrout as well or clean up the workarounds in boss before the release -->
  1899. </tbody>
  1900. </tgroup>
  1901. </table>
  1902. </para>
  1903. <para>
  1904. The <varname>kind</varname> specifies how a failure of the
  1905. component should be handled. If it is set to
  1906. <quote>dispensable</quote> (the default unless you set
  1907. something else), it will get started again if it fails. If
  1908. it is set to <quote>needed</quote> and it fails at startup,
  1909. the whole <command>bind10</command> shuts down and exits
  1910. with an error exit code. But if it fails some time later, it
  1911. is just started again. If you set it to <quote>core</quote>,
  1912. you indicate that the system is not usable without the
  1913. component and if such component fails, the system shuts
  1914. down no matter when the failure happened. This is the
  1915. behavior of the core components (the ones you can't turn
  1916. off), but you can declare any other components as core as
  1917. well if you wish (but you can turn these off, they just
  1918. can't fail).
  1919. </para>
  1920. <para>
  1921. The <varname>priority</varname> defines order in which the
  1922. components should start. The ones with higher numbers are
  1923. started sooner than the ones with lower ones. If you don't
  1924. set it, 0 (zero) is used as the priority. Usually, leaving
  1925. it at the default is enough.
  1926. </para>
  1927. <para>
  1928. There are other parameters we didn't use in our example.
  1929. One of them is <varname>address</varname>. It is the address
  1930. used by the component on the <command>b10-msgq</command>
  1931. message bus. The special components already know their
  1932. address, but the usual ones don't. The address is by
  1933. convention the thing after <emphasis>b10-</emphasis>, with
  1934. the first letter capitalized (eg. <command>b10-stats</command>
  1935. would have <quote>Stats</quote> as its address).
  1936. <!-- TODO: this should be simplified so we don't even have to document it -->
  1937. </para>
  1938. <!-- TODO: what does "The special components already know their
  1939. address, but the usual ones don't." mean? -->
  1940. <!-- TODO: document params when is enabled -->
  1941. <para>
  1942. The last one is <varname>process</varname>. It is the name
  1943. of the process to be started. It defaults to the name of
  1944. the component if not set, but you can use this to override
  1945. it. (The special components also already know their
  1946. executable name.)
  1947. </para>
  1948. <!-- TODO Add parameters when they work, not implemented yet-->
  1949. <note>
  1950. <para>
  1951. The configuration is quite powerful, but that includes
  1952. a lot of space for mistakes. You could turn off the
  1953. <command>b10-cmdctl</command>, but then you couldn't
  1954. change it back the usual way, as it would require it to
  1955. be running (you would have to find and edit the configuration
  1956. directly). Also, some modules might have dependencies:
  1957. <command>b10-stats-httpd</command> needs
  1958. <command>b10-stats</command>, <command>b10-xfrout</command>
  1959. needs <command>b10-auth</command> to be running, etc.
  1960. <!-- TODO: should we define dependencies? -->
  1961. </para>
  1962. <para>
  1963. In short, you should think twice before disabling something here.
  1964. </para>
  1965. </note>
  1966. <para>
  1967. It is possible to start some components multiple times (currently
  1968. <command>b10-auth</command> and <command>b10-resolver</command>).
  1969. You might want to do that to gain more performance (each one uses only
  1970. single core). Just put multiple entries under different names, like
  1971. this, with the same config:
  1972. <screen>&gt; <userinput>config add Boss/components b10-resolver-2</userinput>
  1973. &gt; <userinput>config set Boss/components/b10-resolver-2/special resolver</userinput>
  1974. &gt; <userinput>config set Boss/components/b10-resolver-2/kind needed</userinput>
  1975. &gt; <userinput>config commit</userinput></screen>
  1976. </para>
  1977. <para>
  1978. However, this is work in progress and the support is not yet complete.
  1979. For example, each resolver will have its own cache, each authoritative
  1980. server will keep its own copy of in-memory data and there could be
  1981. problems with locking the sqlite database, if used. The configuration
  1982. might be changed to something more convenient in future.
  1983. Other components don't expect such a situation, so it would
  1984. probably not do what you want. Such support is yet to be
  1985. implemented.
  1986. </para>
  1987. <para>
  1988. The running processes started by <command>bind10</command>
  1989. may be listed by running <userinput>Boss show_processes</userinput>
  1990. using <command>bindctl</command>.
  1991. </para>
  1992. </section>
  1993. </chapter>
  1994. <chapter id="authserver">
  1995. <title>Authoritative Server</title>
  1996. <para>
  1997. The <command>b10-auth</command> is the authoritative DNS server.
  1998. It supports EDNS0, DNSSEC, IPv6, and SQLite3 and in-memory zone
  1999. data backends.
  2000. Normally it is started by the <command>bind10</command> master
  2001. process.
  2002. </para>
  2003. <section>
  2004. <title>Server Configurations</title>
  2005. <!-- TODO: offers command line options but not used
  2006. since we used bind10 -->
  2007. <para>
  2008. <command>b10-auth</command> is configured via the
  2009. <command>b10-cfgmgr</command> configuration manager.
  2010. The module name is <quote>Auth</quote>.
  2011. The configuration data items are:
  2012. <variablelist>
  2013. <varlistentry>
  2014. <term>database_file</term>
  2015. <listitem>
  2016. <simpara>This is an optional string to define the path to find
  2017. the SQLite3 database file.
  2018. <!-- TODO: -->
  2019. Note: This may be a temporary setting because the DNS server
  2020. can use various data source backends.
  2021. </simpara>
  2022. </listitem>
  2023. </varlistentry>
  2024. <!-- NOTE: docs pulled in verbatim from the b10-auth.xml manual page.
  2025. TODO: automate this if want this or rewrite
  2026. -->
  2027. <varlistentry>
  2028. <term>datasources</term>
  2029. <listitem>
  2030. <simpara>
  2031. <varname>datasources</varname> configures data sources.
  2032. The list items include:
  2033. <varname>type</varname> to define the required data source type
  2034. (such as <quote>memory</quote>);
  2035. <varname>class</varname> to optionally select the class
  2036. (it defaults to <quote>IN</quote>);
  2037. and
  2038. <varname>zones</varname> to define
  2039. the <varname>file</varname> path name,
  2040. the <varname>filetype</varname> (<quote>sqlite3</quote> to load
  2041. from a SQLite3 database file or <quote>text</quote> to
  2042. load from a master text file),
  2043. and the <varname>origin</varname> (default domain).
  2044. By default, this is empty.
  2045. <note><simpara>
  2046. Currently this is only used for the memory data source.
  2047. Only the IN class is supported at this time.
  2048. By default, the memory data source is disabled.
  2049. Also, currently the zone file must be canonical such as
  2050. generated by <command>named-compilezone -D</command>, or
  2051. must be an SQLite3 database.
  2052. </simpara></note>
  2053. </simpara>
  2054. </listitem>
  2055. </varlistentry>
  2056. <varlistentry>
  2057. <term>listen_on</term>
  2058. <listitem>
  2059. <simpara>
  2060. <varname>listen_on</varname> is a list of addresses and ports for
  2061. <command>b10-auth</command> to listen on.
  2062. The list items are the <varname>address</varname> string
  2063. and <varname>port</varname> number.
  2064. By default, <command>b10-auth</command> listens on port 53
  2065. on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses.
  2066. <note>
  2067. <simpara>
  2068. The default configuration is currently not appropriate for a multi-homed host.
  2069. In case you have multiple public IP addresses, it is possible the
  2070. query UDP packet comes through one interface and the answer goes out
  2071. through another. The answer will probably be dropped by the client, as it
  2072. has a different source address than the one it sent the query to. The
  2073. client would fallback on TCP after several attempts, which works
  2074. well in this situation, but is clearly not ideal.
  2075. </simpara>
  2076. <simpara>
  2077. There are plans to solve the problem such that the server handles
  2078. it by itself. But until it is actually implemented, it is recommended to
  2079. alter the configuration &mdash; remove the wildcard addresses and list all
  2080. addresses explicitly. Then the server will answer on the same
  2081. interface the request came on, preserving the correct address.
  2082. </simpara>
  2083. </note>
  2084. </simpara>
  2085. </listitem>
  2086. </varlistentry>
  2087. <varlistentry>
  2088. <term>tcp_recv_timeout</term>
  2089. <listitem>
  2090. <simpara>
  2091. <varname>tcp_recv_timeout</varname> is the timeout used on
  2092. incoming TCP connections, in milliseconds. If the query
  2093. is not sent within this time, the connection is closed.
  2094. Setting this to 0 will disable TCP timeouts completely.
  2095. </simpara>
  2096. </listitem>
  2097. </varlistentry>
  2098. </variablelist>
  2099. </para>
  2100. <para>
  2101. The configuration commands are:
  2102. <variablelist>
  2103. <varlistentry>
  2104. <term>loadzone</term>
  2105. <listitem>
  2106. <simpara>
  2107. <command>loadzone</command> tells <command>b10-auth</command>
  2108. to load or reload a zone file. The arguments include:
  2109. <varname>class</varname> which optionally defines the class
  2110. (it defaults to <quote>IN</quote>);
  2111. <varname>origin</varname> is the domain name of the zone;
  2112. and
  2113. <varname>datasrc</varname> optionally defines the type of datasource
  2114. (it defaults to <quote>memory</quote>).
  2115. <note><simpara>
  2116. Currently this only supports the
  2117. IN class and the memory data source.
  2118. </simpara></note>
  2119. </simpara>
  2120. </listitem>
  2121. </varlistentry>
  2122. <varlistentry>
  2123. <term>getstats</term>
  2124. <listitem>
  2125. <simpara>
  2126. <command>getstats</command> requests <command>b10-auth</command>
  2127. to send its statistics data to
  2128. <citerefentry><refentrytitle>b10-stats</refentrytitle>
  2129. <manvolnum>8</manvolnum></citerefentry>
  2130. as a response of the command.
  2131. </simpara>
  2132. </listitem>
  2133. </varlistentry>
  2134. <varlistentry>
  2135. <term>shutdown</term>
  2136. <listitem>
  2137. <simpara>Stop the authoritative DNS server.
  2138. This has an optional <varname>pid</varname> argument to
  2139. select the process ID to stop.
  2140. (Note that the BIND 10 boss process may restart this service
  2141. if configured.)
  2142. </simpara>
  2143. </listitem>
  2144. </varlistentry>
  2145. </variablelist>
  2146. </para>
  2147. <!-- TODO: examples of setting or running above? -->
  2148. </section>
  2149. <section id='datasrc'>
  2150. <title>Data Source Backends</title>
  2151. <para>
  2152. Bind 10 has the concept of data sources. A data source is a place
  2153. where authoritative zone data reside and where they can be served
  2154. from. This can be a master file, a database or something completely
  2155. different.
  2156. </para>
  2157. <para>
  2158. Once a query arrives, <command>b10-auth</command> goes through a
  2159. configured list of data sources and finds the one containing a best
  2160. matching zone. From the equally good ones, the first one is taken.
  2161. This data source is then used to answer the query.
  2162. </para>
  2163. <note><para>
  2164. In the current release, <command>b10-auth</command>
  2165. can serve data from a SQLite3 data source backend and from master
  2166. files.
  2167. Upcoming versions will be able to use multiple different
  2168. data sources, such as MySQL and Berkeley DB.
  2169. </para></note>
  2170. <para>
  2171. The configuration is located in data_sources/classes. Each item there
  2172. represents one RR class and a list used to answer queries for that
  2173. class. The default contains two classes. The CH class contains a static
  2174. data source &mdash; one that serves things like
  2175. <quote>AUTHORS.BIND.</quote>. The IN class contains single SQLite3
  2176. data source with database file located at
  2177. <filename>/usr/local/var/bind10/zone.sqlite3</filename>.
  2178. </para>
  2179. <para>
  2180. Each data source has several options. The first one is
  2181. <varname>type</varname>, which specifies the type of data source to
  2182. use. Valid types include the ones listed below, but BIND 10 uses
  2183. dynamically loaded modules for them, so there may be more in your
  2184. case. This option is mandatory.
  2185. </para>
  2186. <para>
  2187. Another option is <varname>params</varname>. This option is type
  2188. specific; it holds different data depending on the type
  2189. above. Also, depending on the type, it could be possible to omit it.
  2190. </para>
  2191. <para>
  2192. There are two options related to the so-called cache. If you enable
  2193. cache, zone data from the data source are loaded into memory.
  2194. Then, when answering a query, <command>b10-auth</command> looks
  2195. into the memory only instead of the data source, which speeds
  2196. answering up. The first option is <varname>cache-enable</varname>,
  2197. a boolean value turning the cache on and off (off is the default).
  2198. The second one, <varname>cache-zones</varname>, is a list of zone
  2199. origins to load into in-memory.
  2200. <!-- NOT YET: http://bind10.isc.org/ticket/2240
  2201. Once the cache is enabled,
  2202. the zones in the data source not listed in
  2203. <varname>cache-zones</varname> will not be loaded and will
  2204. not be available at all.
  2205. -->
  2206. </para>
  2207. <section id='datasource-types'>
  2208. <title>Data source types</title>
  2209. <para>
  2210. As mentioned, the type used by default is <quote>sqlite3</quote>.
  2211. It has single configuration option inside <varname>params</varname>
  2212. &mdash; <varname>database_file</varname>, which contains the path
  2213. to the SQLite3 file containing the data.
  2214. </para>
  2215. <para>
  2216. Another type is called <quote>MasterFiles</quote>. This one is
  2217. slightly special. The data are stored in RFC1034 master files.
  2218. Because answering directly from them would be impractical,
  2219. this type mandates the cache to be enabled. Also, the list of
  2220. zones (<varname>cache-zones</varname>) should be omitted. The
  2221. <varname>params</varname> is a dictionary mapping from zone
  2222. origins to the files they reside in.
  2223. </para>
  2224. </section>
  2225. <section id='datasrc-examples'>
  2226. <title>Examples</title>
  2227. <para>
  2228. As this is one of the more complex configurations of BIND 10,
  2229. we show some examples. They all assume they start with default
  2230. configuration.
  2231. </para>
  2232. <para>
  2233. First, let's disable the static data source
  2234. (<quote>VERSION.BIND</quote> and friends). As it is the only
  2235. data source in the CH class, we can remove the whole class.
  2236. <screen>&gt; <userinput>config remove data_sources/classes CH</userinput>
  2237. &gt; <userinput>config commit</userinput></screen>
  2238. </para>
  2239. <para>
  2240. Another one, let's say our default data source contains zones
  2241. <quote>example.org.</quote> and <quote>example.net.</quote>.
  2242. We want them to be served from memory to make the answering
  2243. faster.
  2244. <screen>&gt; <userinput>config set data_sources/classes/IN[0]/cache-enable true</userinput>
  2245. &gt; <userinput>config add data_sources/classes/IN[0]/cache-zones example.org.</userinput>
  2246. &gt; <userinput>config add data_sources/classes/IN[0]/cache-zones example.net.</userinput>
  2247. &gt; <userinput>config commit</userinput></screen>
  2248. Now every time the zone in the data source is changed by the
  2249. operator, the authoritative server needs to be told to reload it, by
  2250. <screen>&gt; <userinput>Auth loadzone example.org</userinput></screen>
  2251. You don't need to do this when the zone is modified by
  2252. <command>b10-xfrin</command>; it does so automatically.
  2253. </para>
  2254. <para>
  2255. Now, the last example is when there are master files we want to
  2256. serve in addition to whatever is inside the SQLite3 database.
  2257. <screen>&gt; <userinput>config add data_sources/classes/IN</userinput>
  2258. &gt; <userinput>config set data_sources/classes/IN[1]/type MasterFiles</userinput>
  2259. &gt; <userinput>config set data_sources/classes/IN[1]/cache-enable true</userinput>
  2260. &gt; <userinput>config set data_sources/classes/IN[1]/params { "example.org": "/path/to/example.org", "example.com": "/path/to/example.com" }</userinput>
  2261. &gt; <userinput>config commit</userinput></screen>
  2262. Initially, a map value has to be set, but this value may be an
  2263. empty map. After that, key/value pairs can be added with 'config
  2264. add' and keys can be removed with 'config remove'. The initial
  2265. value may be an empty map, but it has to be set before zones are
  2266. added or removed.
  2267. <screen>
  2268. &gt; <userinput>config set data_sources/classes/IN[1]/params {}</userinput>
  2269. &gt; <userinput>config add data_sources/classes/IN[1]/params another.example.org /path/to/another.example.org</userinput>
  2270. &gt; <userinput>config add data_sources/classes/IN[1]/params another.example.com /path/to/another.example.com</userinput>
  2271. &gt; <userinput>config remove data_sources/classes/IN[1]/params another.example.org</userinput>
  2272. </screen>
  2273. <command>bindctl</command>. To reload a zone, you the same command
  2274. as above.
  2275. </para>
  2276. </section>
  2277. <note>
  2278. <para>
  2279. There's also <varname>Auth/database_file</varname> configuration
  2280. variable, pointing to a SQLite3 database file. This is no longer
  2281. used by <command>b10-auth</command>, but it is left in place for
  2282. now, since other modules use it. Once <command>b10-xfrin</command>,
  2283. <command>b10-xfrout</command> and <command>b10-ddns</command>
  2284. are ported to the new configuration, this will disappear. But for
  2285. now, make sure that if you use any of these modules, the new
  2286. and old configuration correspond. The defaults are consistent, so
  2287. unless you tweaked either the new or the old configuration, you're
  2288. good.
  2289. </para>
  2290. </note>
  2291. </section>
  2292. <section>
  2293. <title>Loading Master Zones Files</title>
  2294. <para>
  2295. RFC 1035 style DNS master zone files may imported
  2296. into a BIND 10 SQLite3 data source by using the
  2297. <command>b10-loadzone</command> utility.
  2298. </para>
  2299. <para>
  2300. <command>b10-loadzone</command> supports the following
  2301. special directives (control entries):
  2302. <variablelist>
  2303. <varlistentry>
  2304. <term>$INCLUDE</term>
  2305. <listitem>
  2306. <simpara>Loads an additional zone file. This may be recursive.
  2307. </simpara>
  2308. </listitem>
  2309. </varlistentry>
  2310. <varlistentry>
  2311. <term>$ORIGIN</term>
  2312. <listitem>
  2313. <simpara>Defines the relative domain name.
  2314. </simpara>
  2315. </listitem>
  2316. </varlistentry>
  2317. <varlistentry>
  2318. <term>$TTL</term>
  2319. <listitem>
  2320. <simpara>Defines the time-to-live value used for following
  2321. records that don't include a TTL.
  2322. </simpara>
  2323. </listitem>
  2324. </varlistentry>
  2325. </variablelist>
  2326. </para>
  2327. <note>
  2328. <para>
  2329. In the current release, only the SQLite3 back
  2330. end is used by <command>b10-loadzone</command>.
  2331. Multiple zones are stored in a single SQLite3 zone database.
  2332. </para>
  2333. </note>
  2334. <para>
  2335. If you reload a zone already existing in the database,
  2336. all records from that prior zone disappear and a whole new set
  2337. appears.
  2338. </para>
  2339. <!--TODO: permissions for xfrin or loadzone to create the file -->
  2340. </section>
  2341. <!--
  2342. TODO
  2343. <section>
  2344. <title>Troubleshooting</title>
  2345. <para>
  2346. </para>
  2347. </section>
  2348. -->
  2349. </chapter>
  2350. <chapter id="xfrin">
  2351. <title>Incoming Zone Transfers</title>
  2352. <para>
  2353. Incoming zones are transferred using the <command>b10-xfrin</command>
  2354. process which is started by <command>bind10</command>.
  2355. When received, the zone is stored in the corresponding BIND 10
  2356. data source, and its records can be served by
  2357. <command>b10-auth</command>.
  2358. In combination with <command>b10-zonemgr</command> (for
  2359. automated SOA checks), this allows the BIND 10 server to
  2360. provide <emphasis>secondary</emphasis> service.
  2361. </para>
  2362. <para>
  2363. The <command>b10-xfrin</command> process supports both AXFR and
  2364. IXFR. Due to some implementation limitations of the current
  2365. development release, however, it only tries AXFR by default,
  2366. and care should be taken to enable IXFR.
  2367. </para>
  2368. <!-- TODO: http://bind10.isc.org/ticket/1279 -->
  2369. <section>
  2370. <title>Configuration for Incoming Zone Transfers</title>
  2371. <para>
  2372. In practice, you need to specify a list of secondary zones to
  2373. enable incoming zone transfers for these zones (you can still
  2374. trigger a zone transfer manually, without a prior configuration
  2375. (see below)).
  2376. </para>
  2377. <para>
  2378. For example, to enable zone transfers for a zone named "example.com"
  2379. (whose master address is assumed to be 2001:db8::53 here),
  2380. run the following at the <command>bindctl</command> prompt:
  2381. <screen>&gt; <userinput>config add Xfrin/zones</userinput>
  2382. &gt; <userinput>config set Xfrin/zones[0]/name "<option>example.com</option>"</userinput>
  2383. &gt; <userinput>config set Xfrin/zones[0]/master_addr "<option>2001:db8::53</option>"</userinput>
  2384. &gt; <userinput>config commit</userinput></screen>
  2385. (We assume there has been no zone configuration before).
  2386. </para>
  2387. </section>
  2388. <section>
  2389. <title>TSIG</title>
  2390. If you want to use TSIG for incoming transfers, a system wide TSIG
  2391. key ring must be configured (see <xref linkend="tsig-key-ring"/>).
  2392. To specify a key to use, set tsig_key value to the name of the key
  2393. to use from the key ring.
  2394. &gt; <userinput>config set Xfrin/zones[0]/tsig_key "<option>example.key</option>"</userinput>
  2395. </section>
  2396. <section>
  2397. <title>Enabling IXFR</title>
  2398. <para>
  2399. As noted above, <command>b10-xfrin</command> uses AXFR for
  2400. zone transfers by default. To enable IXFR for zone transfers
  2401. for a particular zone, set the <varname>use_ixfr</varname>
  2402. configuration parameter to <quote>true</quote>.
  2403. In the above example of configuration sequence, you'll need
  2404. to add the following before performing <userinput>commit</userinput>:
  2405. <screen>&gt; <userinput>config set Xfrin/zones[0]/use_ixfr true</userinput></screen>
  2406. </para>
  2407. <!-- TODO: http://bind10.isc.org/ticket/1279 -->
  2408. <note><simpara>
  2409. One reason why IXFR is disabled by default in the current
  2410. release is because it does not support automatic fallback from IXFR to
  2411. AXFR when it encounters a primary server that doesn't support
  2412. outbound IXFR (and, not many existing implementations support
  2413. it). Another, related reason is that it does not use AXFR even
  2414. if it has no knowledge about the zone (like at the very first
  2415. time the secondary server is set up). IXFR requires the
  2416. "current version" of the zone, so obviously it doesn't work
  2417. in this situation and AXFR is the only workable choice.
  2418. The current release of <command>b10-xfrin</command> does not
  2419. make this selection automatically.
  2420. These features will be implemented in a near future
  2421. version, at which point we will enable IXFR by default.
  2422. </simpara></note>
  2423. </section>
  2424. <!-- TODO:
  2425. how to tell bind10 you are a secondary?
  2426. when will it first attempt to check for new zone? (using REFRESH?)
  2427. what if zonemgr is not running?
  2428. what if a NOTIFY is sent?
  2429. -->
  2430. <section id="zonemgr">
  2431. <title>Secondary Manager</title>
  2432. <para>
  2433. The <command>b10-zonemgr</command> process is started by
  2434. <command>bind10</command>.
  2435. It keeps track of SOA refresh, retry, and expire timers
  2436. and other details for BIND 10 to perform as a slave.
  2437. When the <command>b10-auth</command> authoritative DNS server
  2438. receives a NOTIFY message, <command>b10-zonemgr</command>
  2439. may tell <command>b10-xfrin</command> to do a refresh
  2440. to start an inbound zone transfer.
  2441. The secondary manager resets its counters when a new zone is
  2442. transferred in.
  2443. </para>
  2444. <note><simpara>
  2445. Access control (such as allowing notifies) is not yet provided.
  2446. The primary/secondary service is not yet complete.
  2447. </simpara></note>
  2448. <para>
  2449. The following example shows using <command>bindctl</command>
  2450. to configure the server to be a secondary for the example zone:
  2451. <screen>&gt; <userinput>config add Zonemgr/secondary_zones</userinput>
  2452. &gt; <userinput>config set Zonemgr/secondary_zones[0]/name "<option>example.com</option>"</userinput>
  2453. &gt; <userinput>config commit</userinput></screen>
  2454. </para>
  2455. <para>
  2456. If the zone does not exist in the data source already
  2457. (i.e. no SOA record for it), <command>b10-zonemgr</command>
  2458. will automatically tell <command>b10-xfrin</command>
  2459. to transfer the zone in.
  2460. </para>
  2461. </section>
  2462. <section>
  2463. <title>Trigger an Incoming Zone Transfer Manually</title>
  2464. <para>
  2465. To manually trigger a zone transfer to retrieve a remote zone,
  2466. you may use the <command>bindctl</command> utility.
  2467. For example, at the <command>bindctl</command> prompt run:
  2468. <screen>&gt; <userinput>Xfrin retransfer zone_name="<option>foo.example.org</option>" master=<option>192.0.2.99</option></userinput></screen>
  2469. </para>
  2470. </section>
  2471. <section>
  2472. <title>Incoming Transfers with In-memory Datasource</title>
  2473. <para>
  2474. In the case of an incoming zone transfer, the received zone is
  2475. first stored in the corresponding BIND 10 datasource. In
  2476. case the secondary zone is served by an in-memory datasource
  2477. with an SQLite3 backend, <command>b10-auth</command> is
  2478. automatically sent a <varname>loadzone</varname> command to
  2479. reload the corresponding zone into memory from the backend.
  2480. </para>
  2481. <!-- TODO: currently it delays the queries; see
  2482. http://bind10.isc.org/wiki/ScalableZoneLoadDesign#a7.2UpdatingaZone
  2483. -->
  2484. <para>
  2485. The administrator doesn't have to do anything for
  2486. <command>b10-auth</command> to serve the new version of the
  2487. zone, except for the configuration such as the one described in
  2488. <xref linkend="datasrc" />.
  2489. </para>
  2490. </section>
  2491. <!-- TODO: can that retransfer be used to identify a new zone? -->
  2492. <!-- TODO: what if doesn't exist at that master IP? -->
  2493. </chapter>
  2494. <chapter id="xfrout">
  2495. <title>Outbound Zone Transfers</title>
  2496. <para>
  2497. The <command>b10-xfrout</command> process is started by
  2498. <command>bind10</command>.
  2499. When the <command>b10-auth</command> authoritative DNS server
  2500. receives an AXFR or IXFR request, <command>b10-auth</command>
  2501. internally forwards the request to <command>b10-xfrout</command>,
  2502. which handles the rest of this request processing.
  2503. This is used to provide primary DNS service to share zones
  2504. to secondary name servers.
  2505. The <command>b10-xfrout</command> is also used to send
  2506. NOTIFY messages to secondary servers.
  2507. </para>
  2508. <para>
  2509. A global or per zone <option>transfer_acl</option> configuration
  2510. can be used to control accessibility of the outbound zone
  2511. transfer service.
  2512. By default, <command>b10-xfrout</command> allows any clients to
  2513. perform zone transfers for any zones.
  2514. </para>
  2515. <screen>&gt; <userinput>config show Xfrout/transfer_acl</userinput>
  2516. Xfrout/transfer_acl[0] {"action": "ACCEPT"} any (default)</screen>
  2517. <para>
  2518. If you want to require TSIG in access control, a system wide TSIG
  2519. key ring must be configured (see <xref linkend="tsig-key-ring"/>).
  2520. In this example, we allow client matching both the IP address
  2521. and key.
  2522. </para>
  2523. <screen>&gt; <userinput>config set tsig_keys/keys ["key.example:&lt;base64-key&gt;"]</userinput>
  2524. &gt; <userinput>config set Xfrout/zone_config[0]/transfer_acl [{"action": "ACCEPT", "from": "192.0.2.1", "key": "key.example"}]</userinput>
  2525. &gt; <userinput>config commit</userinput></screen>
  2526. <para>Both <command>b10-xfrout</command> and <command>b10-auth</command>
  2527. will use the system wide key ring to check
  2528. TSIGs in the incoming messages and to sign responses.</para>
  2529. <para>
  2530. For further details on ACL configuration, see
  2531. <xref linkend="common-acl" />.
  2532. </para>
  2533. <note><simpara>
  2534. The way to specify zone specific configuration (ACLs, etc) is
  2535. likely to be changed.
  2536. </simpara></note>
  2537. <!--
  2538. TODO:
  2539. xfrout section:
  2540. auth servers checks for AXFR query
  2541. sends the XFR query to the xfrout module
  2542. uses /tmp/auth_xfrout_conn which is a socket
  2543. what is XfroutClient xfr_client??
  2544. /tmp/auth_xfrout_conn is not removed
  2545. -->
  2546. </chapter>
  2547. <chapter id="ddns">
  2548. <title>Dynamic DNS Update</title>
  2549. <para>
  2550. BIND 10 supports the server side of the Dynamic DNS Update
  2551. (DDNS) protocol as defined in RFC 2136.
  2552. This service is provided by the <command>b10-ddns</command>
  2553. component, which is started by the <command>bind10</command>
  2554. process if configured so.
  2555. </para>
  2556. <para>
  2557. When the <command>b10-auth</command> authoritative DNS server
  2558. receives an UPDATE request, it internally forwards the request
  2559. to <command>b10-ddns</command>, which handles the rest of
  2560. this request processing.
  2561. When the processing is completed, <command>b10-ddns</command>
  2562. will send a response to the client as specified in RFC 2136
  2563. (NOERROR for successful update, REFUSED if rejected due to
  2564. ACL check, etc).
  2565. If the zone has been changed as a result, it will internally
  2566. notify <command>b10-xfrout</command> so that other secondary
  2567. servers will be notified via the DNS NOTIFY protocol.
  2568. In addition, if <command>b10-auth</command> serves the updated
  2569. zone (as described in
  2570. <xref linkend="datasrc" />),
  2571. <command>b10-ddns</command> will also
  2572. notify <command>b10-auth</command> so that <command>b10-auth</command>
  2573. will re-cache the updated zone content if necessary.
  2574. </para>
  2575. <para>
  2576. The <command>b10-ddns</command> component supports requests over
  2577. both UDP and TCP, and both IPv6 and IPv4; for TCP requests,
  2578. however, it terminates the TCP connection immediately after
  2579. each single request has been processed. Clients cannot reuse the
  2580. same TCP connection for multiple requests. (This is a current
  2581. implementation limitation of <command>b10-ddns</command>.
  2582. While RFC 2136 doesn't specify anything about such reuse of TCP
  2583. connection, there is no reason for disallowing it as RFC 1035
  2584. generally allows multiple requests sent over a single TCP
  2585. connection. BIND 9 supports such reuse.)
  2586. </para>
  2587. <para>
  2588. As of this writing <command>b10-ddns</command> does not support
  2589. update forwarding for secondary zones.
  2590. If it receives an update request for a secondary zone, it will
  2591. immediately return a <quote>not implemented</quote> response.
  2592. <note><simpara>
  2593. For feature completeness, update forwarding should be
  2594. eventually supported. But currently it's considered a lower
  2595. priority task and there is no specific plan of implementing
  2596. this feature.
  2597. <!-- See Trac #2063 -->
  2598. </simpara></note>
  2599. </para>
  2600. <section>
  2601. <title>Enabling Dynamic Update</title>
  2602. <para>
  2603. First off, it must be made sure that a few components on which
  2604. <command>b10-ddns</command> depends are configured to run,
  2605. which are <command>b10-auth</command>
  2606. and <command>b10-zonemgr</command>.
  2607. In addition, <command>b10-xfrout</command> should also be
  2608. configured to run; otherwise the notification after an update
  2609. (see above) will fail with a timeout, suspending the DDNS
  2610. service while <command>b10-ddns</command> waits for the
  2611. response (see the description of the <ulink
  2612. url="bind10-messages.html#DDNS_UPDATE_NOTIFY_FAIL">DDNS_UPDATE_NOTIFY_FAIL</ulink>
  2613. log message for further details).
  2614. If BIND 10 is already configured to provide authoritative DNS
  2615. service they should normally be configured to run already.
  2616. </para>
  2617. <para>
  2618. Second, for the obvious reason dynamic update requires that the
  2619. underlying data source storing the zone data be writable.
  2620. In the current implementation this means the zone must be stored
  2621. in an SQLite3-based data source.
  2622. <!-- TODO -->
  2623. Also, in this current version, the <command>b10-ddns</command>
  2624. component configures itself with the data source referring to the
  2625. <varname>database_file</varname> configuration parameter of
  2626. <command>b10-auth</command>.
  2627. So this information must be configured correctly before starting
  2628. <command>b10-ddns</command>.
  2629. <note><simpara>
  2630. The way to configure data sources is now being revised.
  2631. Configuration on the data source for DDNS will be very
  2632. likely to be changed in a backward incompatible manner in
  2633. a near future version.
  2634. </simpara></note>
  2635. </para>
  2636. <para>
  2637. In general, if something goes wrong regarding the dependency
  2638. described above, <command>b10-ddns</command> will log the
  2639. related event at the warning or error level.
  2640. It's advisable to check the log message when you first enable
  2641. DDNS or if it doesn't work as you expect to see if there's any
  2642. warning or error log message.
  2643. </para>
  2644. <para>
  2645. Next, to enable the DDNS service, <command>b10-ddns</command>
  2646. needs to be explicitly configured to run.
  2647. It can be done by using the <command>bindctl</command>
  2648. utility. For example:
  2649. <screen>
  2650. &gt; <userinput>config add Boss/components b10-ddns</userinput>
  2651. &gt; <userinput>config set Boss/components/b10-ddns/address DDNS</userinput>
  2652. &gt; <userinput>config set Boss/components/b10-ddns/kind dispensable</userinput>
  2653. &gt; <userinput>config commit</userinput>
  2654. </screen>
  2655. <note><simpara>
  2656. In theory <varname>kind</varname> could be omitted because
  2657. "dispensable" is its default.
  2658. But there's some peculiar behavior (which should be a
  2659. bug and should be fixed eventually; see Trac ticket #2064)
  2660. with <command>bindctl</command> and you'll still need to
  2661. specify that explicitly. Likewise, <varname>address</varname>
  2662. may look unnecessary because <command>b10-ddns</command>
  2663. would start and work without specifying it. But for it
  2664. to shutdown gracefully this parameter should also be
  2665. specified.
  2666. </simpara></note>
  2667. </para>
  2668. </section>
  2669. <section>
  2670. <title>Access Control</title>
  2671. <para>
  2672. By default, <command>b10-ddns</command> rejects any update
  2673. requests from any clients by returning a REFUSED response.
  2674. To allow updates to take effect, an access control rule
  2675. (called update ACL) with a policy allowing updates must explicitly be
  2676. configured.
  2677. Update ACL must be configured per zone basis in the
  2678. <varname>zones</varname> configuration parameter of
  2679. <command>b10-ddns</command>.
  2680. This is a list of per-zone configurations regarding DDNS.
  2681. Each list element consists of the following parameters:
  2682. <variablelist>
  2683. <varlistentry>
  2684. <term>origin</term>
  2685. <listitem>
  2686. <simpara>The zone's origin name</simpara>
  2687. </listitem>
  2688. </varlistentry>
  2689. <varlistentry>
  2690. <term>class</term>
  2691. <listitem>
  2692. <simpara>The RR class of the zone
  2693. (normally <quote>IN</quote>, and in that case
  2694. can be omitted in configuration)</simpara>
  2695. </listitem>
  2696. </varlistentry>
  2697. <varlistentry>
  2698. <term>update_acl</term>
  2699. <listitem>
  2700. <simpara>List of access control rules (ACL) for the zone</simpara>
  2701. </listitem>
  2702. </varlistentry>
  2703. </variablelist>
  2704. The syntax of the ACL is the same as ACLs for other
  2705. components.
  2706. Specific examples are given below.
  2707. </para>
  2708. <para>
  2709. In general, an update ACL rule that allows an update request
  2710. should be configured with a TSIG key.
  2711. This is an example update ACL that allows updates to the zone
  2712. named <quote>example.org</quote> (of default RR class <quote>IN</quote>)
  2713. from clients that send requests signed with a TSIG whose
  2714. key name is "key.example.org" (and refuses all others):
  2715. <screen>
  2716. &gt; <userinput>config add DDNS/zones</userinput>
  2717. &gt; <userinput>config set DDNS/zones[0]/origin example.org</userinput>
  2718. &gt; <userinput>config add DDNS/zones[0]/update_acl {"action": "ACCEPT", "key": "key.example.org"}</userinput>
  2719. &gt; <userinput>config commit</userinput>
  2720. </screen>
  2721. The TSIG key must be configured system wide
  2722. (see <xref linkend="common-tsig"/>).
  2723. </para>
  2724. <para>
  2725. The full description of ACLs can be found in <xref
  2726. linkend="common-acl" />.
  2727. </para>
  2728. <note><simpara>
  2729. The <command>b10-ddns</command> component accepts an ACL
  2730. rule that just allows updates from a specific IP address
  2731. (i.e., without requiring TSIG), but this is highly
  2732. discouraged (remember that requests can be made over UDP and
  2733. spoofing the source address of a UDP packet is often pretty
  2734. easy).
  2735. Unless you know what you are doing and that you can accept
  2736. its consequence, any update ACL rule that allows updates
  2737. should have a TSIG key in its constraints.
  2738. </simpara></note>
  2739. <para>
  2740. Currently update ACL can only control updates per zone basis;
  2741. it's not possible to specify access control with higher
  2742. granularity such as for particular domain names or specific
  2743. types of RRs.
  2744. <!-- See Trac ticket #2065 -->
  2745. </para>
  2746. <note><simpara>
  2747. Contrary to what RFC 2136 (literally) specifies,
  2748. <command>b10-ddns</command> checks the update ACL before
  2749. checking the prerequisites of the update request.
  2750. This is a deliberate implementation decision.
  2751. This counter intuitive specification has been repeatedly
  2752. discussed among implementers and in the IETF, and it is now
  2753. widely agreed that it does not make sense to strictly follow
  2754. that part of RFC.
  2755. One known specific bad result of following the RFC is that it
  2756. could leak information about which name or record exists or does not
  2757. exist in the zone as a result of prerequisite checks even if a
  2758. zone is somehow configured to reject normal queries from
  2759. arbitrary clients.
  2760. There have been other troubles that could have been avoided if
  2761. the ACL could be checked before the prerequisite check.
  2762. </simpara></note>
  2763. </section>
  2764. <section>
  2765. <title>Miscellaneous Operational Issues</title>
  2766. <para>
  2767. Unlike BIND 9, BIND 10 currently does not support automatic
  2768. re-signing of DNSSEC-signed zone when it's updated via DDNS.
  2769. It could be possible to re-sign the updated zone afterwards
  2770. or make sure the update request also updates related DNSSEC
  2771. records, but that will be pretty error-prone operation.
  2772. In general, it's not advisable to allow DDNS for a signed zone
  2773. at this moment.
  2774. </para>
  2775. <para>
  2776. Also unlike BIND 9, it's currently not possible
  2777. to <quote>freeze</quote> a zone temporarily in order to
  2778. suspend DDNS while you manually update the zone.
  2779. If you need to make manual updates to a dynamic zone,
  2780. you'll need to temporarily reject any updates to the zone via
  2781. the update ACLs.
  2782. </para>
  2783. <para>
  2784. Dynamic updates are only applicable to primary zones.
  2785. In order to avoid updating secondary zones via DDNS requests,
  2786. <command>b10-ddns</command> refers to the
  2787. <quote>secondary_zones</quote> configuration of
  2788. <command>b10-zonemgr</command>. Zones listed in
  2789. <quote>secondary_zones</quote> will never be updated via DDNS
  2790. regardless of the update ACL configuration;
  2791. <command>b10-ddns</command> will return a NOTAUTH (server
  2792. not authoritative for the zone) response.
  2793. If you have a "conceptual" secondary zone whose content is a
  2794. copy of some external source but is not updated via the
  2795. standard zone transfers and therefore not listed in
  2796. <quote>secondary_zones</quote>, be careful not to allow DDNS
  2797. for the zone; it would be quite likely to lead to inconsistent
  2798. state between different servers.
  2799. Normally this should not be a problem because the default
  2800. update ACL rejects any update requests, but you may want to
  2801. take an extra care about the configuration if you have such
  2802. type of secondary zones.
  2803. </para>
  2804. <para>
  2805. The difference of two versions of a zone, before and after a
  2806. DDNS transaction, is automatically recorded in the underlying
  2807. data source, and can be retrieved in the form of outbound
  2808. IXFR.
  2809. This is done automatically; it does not require specific
  2810. configuration to make this possible.
  2811. </para>
  2812. </section>
  2813. </chapter>
  2814. <chapter id="resolverserver">
  2815. <title>Recursive Name Server</title>
  2816. <para>
  2817. The <command>b10-resolver</command> process is started by
  2818. <command>bind10</command>.
  2819. <!-- TODO
  2820. It provides a resolver so DNS clients can ask it to do recursion
  2821. and it will return answers.
  2822. -->
  2823. </para>
  2824. <para>
  2825. The main <command>bind10</command> process can be configured
  2826. to select to run either the authoritative or resolver or both.
  2827. By default, it doesn't start either one. You may change this using
  2828. <command>bindctl</command>, for example:
  2829. <screen>
  2830. &gt; <userinput>config add Boss/components b10-resolver</userinput>
  2831. &gt; <userinput>config set Boss/components/b10-resolver/special resolver</userinput>
  2832. &gt; <userinput>config set Boss/components/b10-resolver/kind needed</userinput>
  2833. &gt; <userinput>config set Boss/components/b10-resolver/priority 10</userinput>
  2834. &gt; <userinput>config commit</userinput>
  2835. </screen>
  2836. </para>
  2837. <para>
  2838. The master <command>bind10</command> will stop and start
  2839. the desired services.
  2840. </para>
  2841. <para>
  2842. By default, the resolver listens on port 53 for 127.0.0.1 and ::1.
  2843. The following example shows how it can be configured to
  2844. listen on an additional address (and port):
  2845. <screen>
  2846. &gt; <userinput>config add Resolver/listen_on</userinput>
  2847. &gt; <userinput>config set Resolver/listen_on[<replaceable>2</replaceable>]/address "192.168.1.1"</userinput>
  2848. &gt; <userinput>config set Resolver/listen_on[<replaceable>2</replaceable>]/port 53</userinput>
  2849. &gt; <userinput>config commit</userinput>
  2850. </screen>
  2851. </para>
  2852. <simpara>(Replace the <quote><replaceable>2</replaceable></quote>
  2853. as needed; run <quote><userinput>config show
  2854. Resolver/listen_on</userinput></quote> if needed.)</simpara>
  2855. <!-- TODO: this example should not include the port, ticket #1185 -->
  2856. <section>
  2857. <title>Access Control</title>
  2858. <para>
  2859. By default, the <command>b10-resolver</command> daemon only accepts
  2860. DNS queries from the localhost (127.0.0.1 and ::1).
  2861. The <option>Resolver/query_acl</option> configuration may
  2862. be used to reject, drop, or allow specific IPs or networks.
  2863. See <xref linkend="common-acl" />.
  2864. </para>
  2865. <para>
  2866. The following session is an example of extending the ACL to also
  2867. allow queries from 192.0.2.0/24:
  2868. <screen>
  2869. > <userinput>config show Resolver/query_acl</userinput>
  2870. Resolver/query_acl[0] {"action": "ACCEPT", "from": "127.0.0.1"} any (default)
  2871. Resolver/query_acl[1] {"action": "ACCEPT", "from": "::1"} any (default)
  2872. > <userinput>config add Resolver/query_acl</userinput>
  2873. > <userinput>config set Resolver/query_acl[2] {"action": "ACCEPT", "from": "192.0.2.0/24"}</userinput>
  2874. > <userinput>config add Resolver/query_acl</userinput>
  2875. > <userinput>config show Resolver/query_acl</userinput>
  2876. Resolver/query_acl[0] {"action": "ACCEPT", "from": "127.0.0.1"} any (modified)
  2877. Resolver/query_acl[1] {"action": "ACCEPT", "from": "::1"} any (modified)
  2878. Resolver/query_acl[2] {"action": "ACCEPT", "from": "192.0.2.0/24"} any (modified)
  2879. Resolver/query_acl[3] {"action": "REJECT"} any (modified)
  2880. > <userinput>config commit</userinput></screen>
  2881. Note that we didn't set the value of the last final rule
  2882. (query_acl[3]) -- in the case of resolver, rejecting all queries is
  2883. the default value of a new rule. In fact, this rule can even be
  2884. omitted completely, as the default, when a query falls off the list,
  2885. is rejection.
  2886. </para>
  2887. </section>
  2888. <section>
  2889. <title>Forwarding</title>
  2890. <para>
  2891. To enable forwarding, the upstream address and port must be
  2892. configured to forward queries to, such as:
  2893. <screen>
  2894. &gt; <userinput>config set Resolver/forward_addresses [{ "address": "<replaceable>192.168.1.1</replaceable>", "port": 53 }]</userinput>
  2895. &gt; <userinput>config commit</userinput>
  2896. </screen>
  2897. (Replace <replaceable>192.168.1.1</replaceable> to point to your
  2898. full resolver.)
  2899. </para>
  2900. <para>
  2901. Normal iterative name service can be re-enabled by clearing the
  2902. forwarding address(es); for example:
  2903. <screen>
  2904. &gt; <userinput>config set Resolver/forward_addresses []</userinput>
  2905. &gt; <userinput>config commit</userinput>
  2906. </screen>
  2907. </para>
  2908. </section>
  2909. <!-- TODO: later try this
  2910. > config set Resolver/forward_addresses[0]/address "192.168.8.8"
  2911. > config set Resolver/forward_addresses[0]/port 53
  2912. then change those defaults with config set Resolver/forward_addresses[0]/address "1.2.3.4"
  2913. > config set Resolver/forward_addresses[0]/address "1.2.3.4"
  2914. -->
  2915. </chapter>
  2916. <chapter id="dhcp">
  2917. <title>DHCP</title>
  2918. <para>The Dynamic Host Configuration Protocol for IPv4 (DHCP or
  2919. DHCPv4) and Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
  2920. are protocols that allow one node (server) to provision
  2921. configuration parameters to many hosts and devices (clients). To
  2922. ease deployment in larger networks, additional nodes (relays) may
  2923. be deployed that facilitate communication between servers and
  2924. clients. Even though principles of both DHCPv4 and DHCPv6 are
  2925. somewhat similar, these are two radically different
  2926. protocols. BIND 10 offers two server implementations, one for DHCPv4
  2927. and one for DHCPv6.</para>
  2928. <para>This chapter covers those parts of BIND 10 that are common to
  2929. both servers. DHCPv4-specific details are covered in <xref linkend="dhcp4"/>,
  2930. while those details specific to DHCPv6 are described in <xref linkend="dhcp6"/>
  2931. </para>
  2932. <section id="dhcp-install-configure">
  2933. <title>DHCP Database Installation and Configuration</title>
  2934. <para>
  2935. BIND 10 DHCP stores its leases in a lease database. The software has been written in
  2936. a way that makes it possible to choose which database product should be used to
  2937. store the lease information. At present, only support for MySQL is provided, and that support must
  2938. be explicitly included when BIND 10 is built. This section covers the building of
  2939. BIND 10 with MySQL and the creation of the lease database.
  2940. </para>
  2941. <section>
  2942. <title>Install MySQL</title>
  2943. <para>
  2944. Install MySQL according to the instructions for your system. The client development
  2945. libraries must be installed.
  2946. </para>
  2947. </section>
  2948. <section>
  2949. <title>Build and Install BIND 10</title>
  2950. <para>
  2951. Build and install BIND 10 as described in <xref linkend="installation"/>, with
  2952. the following modification: to enable the MySQL database code, at the
  2953. "configure" step (see <xref linkend="configure"/>), specify the location of the
  2954. MySQL configuration program "mysql_config" with the "--with-mysql-config" switch,
  2955. i.e.
  2956. <screen><userinput>./configure [other-options] --with-dhcp-mysql</userinput></screen>
  2957. ...if MySQL was installed in the default location, or:
  2958. <screen><userinput>./configure [other-options] --with-dhcp-mysql=<replaceable>path-to-mysql_config</replaceable></userinput></screen>
  2959. ...if not.
  2960. </para>
  2961. </section>
  2962. <section id="dhcp-database-create">
  2963. <title>Create MySQL Database and BIND 10 User</title>
  2964. <para>
  2965. The next task is to create both the lease database and the user under which the servers will
  2966. access it. A number of steps are required:
  2967. </para>
  2968. <para>
  2969. 1. Log into MySQL as "root":
  2970. <screen>$ <userinput>mysql -u root -p</userinput>
  2971. Enter password:<userinput/>
  2972. :<userinput/>
  2973. mysql></screen>
  2974. </para>
  2975. <para>
  2976. 2. Create the database:
  2977. <screen>mysql> <userinput>CREATE DATABASE <replaceable>database-name</replaceable>;</userinput></screen>
  2978. ... <replaceable>database-name</replaceable> is the name you have chosen for the database.
  2979. </para>
  2980. <para>
  2981. 3. Create the database tables:
  2982. <screen>mysql> <userinput>CONNECT <replaceable>database-name</replaceable>;</userinput>
  2983. mysql> <userinput>SOURCE <replaceable>path-to-bind10</replaceable>/share/bind10/dhcpdb_create.mysql</userinput></screen>
  2984. </para>
  2985. <para>
  2986. 4. Create the user under which BIND 10 will access the database (and give it a password), then grant it access to the database tables:
  2987. <screen>mysql> <userinput>CREATE USER '<replaceable>user-name</replaceable>'@'localhost' IDENTIFIED BY '<replaceable>password</replaceable>';</userinput>
  2988. mysql> <userinput>GRANT ALL ON <replaceable>database-name</replaceable>.* TO '<replaceable>user-name</replaceable>'@'localhost';</userinput></screen>
  2989. </para>
  2990. <para>
  2991. 5. Exit MySQL:
  2992. <screen>mysql> <userinput>quit</userinput>
  2993. Bye<userinput/>
  2994. $</screen>
  2995. </para>
  2996. </section>
  2997. </section>
  2998. </chapter>
  2999. <chapter id="dhcp4">
  3000. <title>The DHCPv4 Server</title>
  3001. <section id="dhcp4-start-stop">
  3002. <title>Starting and Stopping the DHCPv4 Server</title>
  3003. <para>
  3004. <command>b10-dhcp4</command> is the BIND 10 DHCPv4 server and, like other
  3005. parts of BIND 10, is configured through the <command>bindctl</command>
  3006. program.
  3007. </para>
  3008. <para>
  3009. After starting BIND 10 and entering bindctl, the first step
  3010. in configuring the server is to add it to the list of running BIND 10 services.
  3011. <screen>
  3012. &gt; <userinput>config add Boss/components b10-dhcp4</userinput>
  3013. &gt; <userinput>config set Boss/components/b10-dhcp4/kind dispensable</userinput>
  3014. &gt; <userinput>config commit</userinput>
  3015. </screen>
  3016. </para>
  3017. <para>
  3018. To remove <command>b10-dhcp4</command> from the set of running services,
  3019. the <command>b10-dhcp4</command> is removed from list of Boss components:
  3020. <screen>
  3021. &gt; <userinput>config remove Boss/components b10-dhcp4</userinput>
  3022. &gt; <userinput>config commit</userinput>
  3023. </screen>
  3024. </para>
  3025. <para>
  3026. On start-up, the server will detect available network interfaces
  3027. and will attempt to open UDP sockets on all interfaces that
  3028. are up, running, are not loopback, and have IPv4 address
  3029. assigned.
  3030. The server will then listen to incoming traffic. Currently
  3031. supported client messages are DISCOVER and REQUEST. The server
  3032. will respond to them with OFFER and ACK, respectively.
  3033. Since the DHCPv4 server opens privileged ports, it requires root
  3034. access. Make sure you run this daemon as root.
  3035. </para>
  3036. </section>
  3037. <section id="dhcp4-configuration">
  3038. <title>Configuring the DHCPv4 Server</title>
  3039. <para>
  3040. Once the server is started, it can be configured. To view the
  3041. current configuration, use the following command in <command>bindctl</command>:
  3042. <screen>
  3043. &gt; <userinput>config show Dhcp4</userinput></screen>
  3044. When starting the DHCPv4 daemon for the first time, the default configuration
  3045. will be available. It will look similar to this:
  3046. <screen>
  3047. &gt; <userinput>config show Dhcp4</userinput>
  3048. Dhcp4/interface/ list (default)
  3049. Dhcp4/renew-timer 1000 integer (default)
  3050. Dhcp4/rebind-timer 2000 integer (default)
  3051. Dhcp4/valid-lifetime 4000 integer (default)
  3052. Dhcp4/option-data [] list (default)
  3053. Dhcp4/lease-database/type "memfile" string (default)
  3054. Dhcp4/lease-database/name "" string (default)
  3055. Dhcp4/lease-database/user "" string (default)
  3056. Dhcp4/lease-database/host "" string (default)
  3057. Dhcp4/lease-database/password "" string (default)
  3058. Dhcp4/subnet4 [] list (default)
  3059. </screen>
  3060. </para>
  3061. <para>
  3062. To change one of the parameters, simply follow
  3063. the usual <command>bindctl</command> procedure. For example, to make the
  3064. leases longer, change their valid-lifetime parameter:
  3065. <screen>
  3066. &gt; <userinput>config set Dhcp4/valid-lifetime 7200</userinput>
  3067. &gt; <userinput>config commit</userinput></screen>
  3068. Please note that most Dhcp4 parameters are of global scope
  3069. and apply to all defined subnets, unless they are overridden on a
  3070. per-subnet basis.
  3071. </para>
  3072. <section>
  3073. <title>Database Configuration</title>
  3074. <para>
  3075. All leases issued by the server are stored in the lease database. Currently,
  3076. the only supported database is MySQL
  3077. <footnote>
  3078. <para>
  3079. The server comes with an in-memory database ("memfile") configured as the default
  3080. database. This is used for internal testing and is not supported. In addition,
  3081. it does not store lease information on disk: lease information will be lost if the
  3082. server is restarted.
  3083. </para>
  3084. </footnote>, and so the server must be configured to
  3085. access the correct database with the appropriate credentials.
  3086. </para>
  3087. <note>
  3088. <para>
  3089. Database access information must be configured for the DHCPv4 server, even if
  3090. it has already been configured for the DHCPv6 server. The servers store their
  3091. information independently, so each server can use a separate
  3092. database or both servers can use the same database.
  3093. </para>
  3094. </note>
  3095. <para>
  3096. Database configuration is controlled through the Dhcp4/lease-database parameters.
  3097. The type of the database must be set to MySQL (although the string entered is "mysql"):
  3098. <screen>
  3099. &gt; <userinput>config set Dhcp4/lease-database/type "mysql"</userinput>
  3100. </screen>
  3101. Next, the name of the database is to hold the leases must be set: this is the
  3102. name used when the lease database was created (see <xref linkend="dhcp-database-create"/>).
  3103. <screen>
  3104. &gt; <userinput>config set Dhcp4/lease-database/name "<replaceable>database-name</replaceable>"</userinput>
  3105. </screen>
  3106. If the database is located on a different system to the DHCPv4 server, the
  3107. database host name must also be specified (although note that this configuration
  3108. may have a severe impact on server performance):
  3109. <screen>
  3110. &gt; <userinput>config set Dhcp4/lease-database/host "<replaceable>remote-host-name</replaceable>"</userinput>
  3111. </screen>
  3112. The usual state of affairs will be to have the database on the same machine as the
  3113. DHCPv4 server. In this case, set the value to the empty string (this is the default):
  3114. <screen>
  3115. &gt; <userinput>config set Dhcp4/lease-database/host ""</userinput>
  3116. </screen>
  3117. </para>
  3118. <para>
  3119. Finally, the credentials of the account under which the server will access the database
  3120. should be set:
  3121. <screen>
  3122. &gt; <userinput>config set Dhcp4/lease-database/user "<replaceable>user-name</replaceable>"</userinput>
  3123. &gt; <userinput>config set Dhcp4/lease-database/password "<replaceable>password</replaceable>"</userinput>
  3124. </screen>
  3125. If there is no password to the account, set the password to the empty string "". (This is also the default.)
  3126. </para>
  3127. <note>
  3128. <para>The password is echoed when entered and is stored in clear text in the BIND 10 configuration
  3129. database. Improved password security will be added in a future version of BIND 10 DHCP</para>
  3130. </note>
  3131. </section>
  3132. <section id="dhcp4-address-config">
  3133. <title>Configuration of Address Pools</title>
  3134. <para>
  3135. The essential role of DHCPv4 server is address assignment. The server
  3136. has to be configured with at least one subnet and one pool of dynamic
  3137. addresses to be managed. For example, assume that the server
  3138. is connected to a network segment that uses the 192.0.2.0/24
  3139. prefix. The Administrator of that network has decided that addresses from range
  3140. 192.0.2.10 to 192.0.2.20 are going to be managed by the Dhcp4
  3141. server. Such a configuration can be achieved in the following way:
  3142. <screen>
  3143. &gt; <userinput>config add Dhcp4/subnet4</userinput>
  3144. &gt; <userinput>config set Dhcp4/subnet4[0]/subnet "192.0.2.0/24"</userinput>
  3145. &gt; <userinput>config set Dhcp4/subnet4[0]/pool [ "192.0.2.10 - 192.0.2.20" ]</userinput>
  3146. &gt; <userinput>config commit</userinput></screen>
  3147. Note that subnet is defined as a simple string, but the pool parameter
  3148. is actually a list of pools: for this reason, the pool definition is
  3149. enclosed in square brackets, even though only one range of addresses
  3150. is specified.</para>
  3151. <para>It is possible to define more than one pool in a
  3152. subnet: continuing the previous example, further assume that
  3153. 192.0.2.64/26 should be also be managed by the server. It could be written as
  3154. 192.0.2.64 to 192.0.2.127. Alternatively, it can be expressed more simply as
  3155. 192.0.2.64/26. Both formats are supported by Dhcp4 and can be mixed in the pool list.
  3156. For example, one could define the following pools:
  3157. <screen>
  3158. &gt; <userinput>config set Dhcp4/subnet4[0]/pool [ "192.0.2.10-192.0.2.20", "192.0.2.64/26" ]</userinput>
  3159. &gt; <userinput>config commit</userinput></screen>
  3160. The number of pools is not limited, but for performance reasons it is recommended to
  3161. use as few as possible. Space and tabulations in pool definitions are ignored, so
  3162. spaces before and after hyphen are optional. They can be used to improve readability.
  3163. </para>
  3164. <para>
  3165. The server may be configured to serve more than one subnet. To add a second subnet,
  3166. use a command similar to the following:
  3167. <screen>
  3168. &gt; <userinput>config add Dhcp4/subnet4</userinput>
  3169. &gt; <userinput>config set Dhcp4/subnet4[1]/subnet "192.0.3.0/24"</userinput>
  3170. &gt; <userinput>config set Dhcp4/subnet4[1]/pool [ "192.0.3.0/24" ]</userinput>
  3171. &gt; <userinput>config commit</userinput></screen>
  3172. Arrays are counted from 0. subnet[0] refers to the subnet defined in the
  3173. previous example. The <command>config add Dhcp4/subnet4</command> command adds
  3174. another (second) subnet. It can be referred to as
  3175. <command>Dhcp4/subnet4[1]</command>. In this example, we allow server to
  3176. dynamically assign all addresses available in the whole subnet.
  3177. </para>
  3178. <para>
  3179. When configuring a DHCPv4 server using prefix/length notation, please pay
  3180. attention to the boundary values. When specifying that the server should use
  3181. a given pool, it will be able to allocate also first (typically network
  3182. address) and the last (typically broadcast address) address from that pool.
  3183. In the aforementioned example of pool 192.0.3.0/24, both 192.0.3.0 and
  3184. 192.0.3.255 addresses may be assigned as well. This may be invalid in some
  3185. network configurations. If you want to avoid this, please use the "min-max" notation.
  3186. </para>
  3187. </section>
  3188. </section>
  3189. <section id="dhcp4-serverid">
  3190. <title>Server Identifier in DHCPv4</title>
  3191. <para>The DHCPv4 protocol uses a "server identifier" for clients to be able
  3192. to discriminate between several servers present on the same link: this
  3193. value is an IPv4 address of the server. When started for the first time,
  3194. the DHCPv4 server will choose one of its IPv4 addresses as its server-id,
  3195. and store the chosen value to a file. (The file is named b10-dhcp4-serverid and is
  3196. stored in the "local state directory". This is set during installation
  3197. when "configure" is run, and can be changed by using "--localstatedir"
  3198. on the "configure" command line.) That file will be read by the server
  3199. and the contained value used whenever the server is subsequently started.
  3200. </para>
  3201. <para>
  3202. It is unlikely that this parameter needs to be changed. If such a need
  3203. arises, please stop the server, edit the file and restart the server.
  3204. It is a text file that should contain an IPv4 address. Spaces are
  3205. ignored. No extra characters are allowed in this file.
  3206. </para>
  3207. </section>
  3208. <section id="dhcp4-std">
  3209. <title>Supported Standards</title>
  3210. <para>The following standards and draft standards are currently
  3211. supported:</para>
  3212. <itemizedlist>
  3213. <listitem>
  3214. <simpara><ulink url="http://tools.ietf.org/html/rfc2131">RFC 2131</ulink>: Supported messages are DISCOVER, OFFER,
  3215. REQUEST, RELEASE, ACK, and NAK.</simpara>
  3216. </listitem>
  3217. <listitem>
  3218. <simpara><ulink url="http://tools.ietf.org/html/rfc2132">RFC 2132</ulink>: Supported options are: PAD (0),
  3219. END(255), Message Type(53), DHCP Server Identifier (54),
  3220. Domain Name (15), DNS Servers (6), IP Address Lease Time
  3221. (51), Subnet mask (1), and Routers (3).</simpara>
  3222. </listitem>
  3223. </itemizedlist>
  3224. </section>
  3225. <section id="dhcp4-limit">
  3226. <title>DHCPv4 Server Limitations</title>
  3227. <para>These are the current limitations of the DHCPv4 server
  3228. software. Most of them are reflections of the current stage of
  3229. development and should be treated as <quote>not implemented
  3230. yet</quote>, rather than actual limitations.</para>
  3231. <itemizedlist>
  3232. <listitem>
  3233. <para>
  3234. On startup, the DHCPv4 server does not get the full configuration from
  3235. BIND 10. To remedy this, after starting BIND 10, modify any parameter
  3236. and commit the changes, e.g.
  3237. <screen>
  3238. &gt; <userinput>config show Dhcp4/renew-timer</userinput>
  3239. Dhcp4/renew-timer 1000 integer (default)
  3240. &gt; <userinput>config set Dhcp4/renew-timer 1001</userinput>
  3241. &gt; <userinput>config commit</userinput></screen>
  3242. </para>
  3243. </listitem>
  3244. <listitem>
  3245. <simpara>During the initial IPv4 node configuration, the
  3246. server is expected to send packets to a node that does not
  3247. have IPv4 address assigned yet. The server requires
  3248. certain tricks (or hacks) to transmit such packets. This
  3249. is not implemented yet, therefore DHCPv4 server supports
  3250. relayed traffic only (that is, normal point to point
  3251. communication).</simpara>
  3252. </listitem>
  3253. <listitem>
  3254. <simpara>Upon start, the server will open sockets on all
  3255. interfaces that are not loopback, are up and running and
  3256. have IPv4 address.</simpara>
  3257. </listitem>
  3258. <listitem>
  3259. <simpara>The DHCPv4 server does not support
  3260. BOOTP. That is a design choice and the limitation is
  3261. permanent. If you have legacy nodes that can't use DHCP and
  3262. require BOOTP support, please use the latest version of ISC DHCP,
  3263. available from <ulink url="http://www.isc.org/software/dhcp"/>.</simpara>
  3264. </listitem>
  3265. <listitem>
  3266. <simpara>Interface detection is currently working on Linux
  3267. only. See <xref linkend="iface-detect"/> for details.</simpara>
  3268. </listitem>
  3269. <listitem>
  3270. <simpara>The DHCPv4 server does not verify that
  3271. assigned address is unused. According to <ulink url="http://tools.ietf.org/html/rfc2131">RFC 2131</ulink>, the
  3272. allocating server should verify that address is not used by
  3273. sending ICMP echo request.</simpara>
  3274. </listitem>
  3275. <listitem>
  3276. <simpara>Address rebinding (REBIND) and duplication report (DECLINE)
  3277. are not supported yet.</simpara>
  3278. </listitem>
  3279. </itemizedlist>
  3280. </section>
  3281. </chapter>
  3282. <chapter id="dhcp6">
  3283. <title>The DHCPv6 Server</title>
  3284. <section id="dhcp6-start-stop">
  3285. <title>Starting and Stopping the DHCPv6 Server</title>
  3286. <para>
  3287. <command>b10-dhcp6</command> is the BIND 10 DHCPv6 server and, like other
  3288. parts of BIND 10, is configured through the <command>bindctl</command>
  3289. program.
  3290. </para>
  3291. <para>
  3292. After starting BIND 10 and starting <command>bindctl</command>, the first step
  3293. in configuring the server is to add <command>b10-dhcp6</command> to the list of running BIND 10 services.
  3294. <screen>
  3295. &gt; <userinput>config add Boss/components b10-dhcp6</userinput>
  3296. &gt; <userinput>config set Boss/components/b10-dhcp6/kind dispensable</userinput>
  3297. &gt; <userinput>config commit</userinput>
  3298. </screen>
  3299. </para>
  3300. <para>
  3301. To remove <command>b10-dhcp6</command> from the set of running services,
  3302. the <command>b10-dhcp4</command> is removed from list of Boss components:
  3303. <screen>
  3304. &gt; <userinput>config remove Boss/components b10-dhcp6</userinput>
  3305. &gt; <userinput>config commit</userinput>
  3306. </screen>
  3307. </para>
  3308. <para>
  3309. To change one of the parameters, simply follow
  3310. the usual <command>bindctl</command> procedure. For example, to make the
  3311. leases longer, change their valid-lifetime parameter:
  3312. <screen>
  3313. &gt; <userinput>config set Dhcp6/valid-lifetime 7200</userinput>
  3314. &gt; <userinput>config commit</userinput></screen>
  3315. Please note that most Dhcp6 parameters are of global scope
  3316. and apply to all defined subnets, unless they are overridden on a
  3317. per-subnet basis.
  3318. </para>
  3319. <para>
  3320. During start-up the server will detect available network interfaces
  3321. and will attempt to open UDP sockets on all interfaces that
  3322. are up, running, are not loopback, are multicast-capable, and
  3323. have IPv6 address assigned. It will then listen to incoming traffic.
  3324. </para>
  3325. </section>
  3326. <section id="dhcp6-configuration">
  3327. <title>DHCPv6 Server Configuration</title>
  3328. <para>
  3329. Once the server has been started, it can be configured. To view the
  3330. current configuration, use the following command in <command>bindctl</command>:
  3331. <screen>&gt; <userinput>config show Dhcp6</userinput></screen>
  3332. When starting the Dhcp6 daemon for the first time, the default configuration
  3333. will be available. It will look similar to this:
  3334. <screen>
  3335. &gt; <userinput>config show Dhcp6</userinput>
  3336. Dhcp6/interface/ list (default)
  3337. Dhcp6/renew-timer 1000 integer (default)
  3338. Dhcp6/rebind-timer 2000 integer (default)
  3339. Dhcp6/preferred-lifetime 3000 integer (default)
  3340. Dhcp6/valid-lifetime 4000 integer (default)
  3341. Dhcp6/option-data [] list (default)
  3342. Dhcp6/lease-database/type "memfile" string (default)
  3343. Dhcp6/lease-database/name "" string (default)
  3344. Dhcp6/lease-database/user "" string (default)
  3345. Dhcp6/lease-database/host "" string (default)
  3346. Dhcp6/lease-database/password "" string (default)
  3347. Dhcp6/subnet6/ list
  3348. </screen>
  3349. </para>
  3350. <para>
  3351. To change one of the parameters, simply follow
  3352. the usual <command>bindctl</command> procedure. For example, to make the
  3353. leases longer, change their valid-lifetime parameter:
  3354. <screen>
  3355. &gt; <userinput>config set Dhcp6/valid-lifetime 7200</userinput>
  3356. &gt; <userinput>config commit</userinput></screen>
  3357. Most Dhcp6 parameters are of global scope
  3358. and apply to all defined subnets, unless they are overridden on a
  3359. per-subnet basis.
  3360. </para>
  3361. <note>
  3362. <para>
  3363. With this version of BIND 10, there are a number of known limitations
  3364. and problems in the DHCPv6 server. See <xref linkend="dhcp6-limit"/>.
  3365. </para>
  3366. </note>
  3367. <section>
  3368. <title>Database Configuration</title>
  3369. <para>
  3370. All leases issued by the server are stored in the lease database. Currently,
  3371. the only supported database is MySQL
  3372. <footnote>
  3373. <para>
  3374. The server comes with an in-memory database ("memfile") configured as the default
  3375. database. This is used for internal testing and is not supported. In addition,
  3376. it does not store lease information on disk: lease information will be lost if the
  3377. server is restarted.
  3378. </para>
  3379. </footnote>, and so the server must be configured to
  3380. access the correct database with the appropriate credentials.
  3381. </para>
  3382. <note>
  3383. <para>
  3384. Database access information must be configured for the DHCPv6 server, even if
  3385. it has already been configured for the DHCPv4 server. The servers store their
  3386. information independently, so each server can use a separate
  3387. database or both servers can use the same database.
  3388. </para>
  3389. </note>
  3390. <para>
  3391. Database configuration is controlled through the Dhcp6/lease-database parameters.
  3392. The type of the database must be set to MySQL (although the string entered is "mysql"):
  3393. <screen>
  3394. &gt; <userinput>config set Dhcp6/lease-database/type "mysql"</userinput>
  3395. </screen>
  3396. Next, the name of the database is to hold the leases must be set: this is the
  3397. name used when the lease database was created (see <xref linkend="dhcp-database-create"/>).
  3398. <screen>
  3399. &gt; <userinput>config set Dhcp6/lease-database/name "<replaceable>database-name</replaceable>"</userinput>
  3400. </screen>
  3401. If the database is located on a different system to the DHCPv6 server, the
  3402. database host name must also be specified (although note that this configuration
  3403. may have a severe impact on server performance):
  3404. <screen>
  3405. &gt; <userinput>config set Dhcp6/lease-database/host "<replaceable>remote-host-name</replaceable>"</userinput>
  3406. </screen>
  3407. The usual state of affairs will be to have the database on the same machine as the
  3408. DHCPv6 server. In this case, set the value to the empty string (this is the default):
  3409. <screen>
  3410. &gt; <userinput>config set Dhcp6/lease-database/host ""</userinput>
  3411. </screen>
  3412. </para>
  3413. <para>
  3414. Finally, the credentials of the account under which the server will access the database
  3415. should be set:
  3416. <screen>
  3417. &gt; <userinput>config set Dhcp6/lease-database/user "<replaceable>user-name</replaceable>"</userinput>
  3418. &gt; <userinput>config set Dhcp6/lease-database/password "<replaceable>password</replaceable>"</userinput>
  3419. </screen>
  3420. If there is no password to the account, set the password to the empty string "". (This is also the default.)
  3421. </para>
  3422. <note>
  3423. <para>The password is echoed when entered and is stored in clear text in the BIND 10 configuration
  3424. database. Improved password security will be added in a future version of BIND 10 DHCP</para>
  3425. </note>
  3426. </section>
  3427. <section>
  3428. <title>Subnet and Address Pool</title>
  3429. <para>
  3430. The essential role of a DHCPv6 server is address assignment. For this,
  3431. the server has to be configured with at least one subnet and one pool of dynamic
  3432. addresses to be managed. For example, assume that the server
  3433. is connected to a network segment that uses the 2001:db8:1::/64
  3434. prefix. The Administrator of that network has decided that addresses from range
  3435. 2001:db8:1::1 to 2001:db8:1::ffff are going to be managed by the Dhcp6
  3436. server. Such a configuration can be achieved in the following way:
  3437. <screen>
  3438. &gt; <userinput>config add Dhcp6/subnet6</userinput>
  3439. &gt; <userinput>config set Dhcp6/subnet6[0]/subnet "2001:db8:1::/64"</userinput>
  3440. &gt; <userinput>config set Dhcp6/subnet6[0]/pool [ "2001:db8:1::0 - 2001:db8:1::ffff" ]</userinput>
  3441. &gt; <userinput>config commit</userinput></screen>
  3442. Note that subnet is defined as a simple string, but the pool parameter
  3443. is actually a list of pools: for this reason, the pool definition is
  3444. enclosed in square brackets, even though only one range of addresses
  3445. is specified.</para>
  3446. <para>It is possible to define more than one pool in a
  3447. subnet: continuing the previous example, further assume that
  3448. 2001:db8:1:0:5::/80 should be also be managed by the server. It could be written as
  3449. 2001:db8:1:0:5:: to 2001:db8:1::5:ffff:ffff:ffff, but typing so many 'f's
  3450. is cumbersome. It can be expressed more simply as 2001:db8:1:0:5::/80. Both
  3451. formats are supported by Dhcp6 and can be mixed in the pool list.
  3452. For example, one could define the following pools:
  3453. <screen>
  3454. &gt; <userinput>config set Dhcp6/subnet6[0]/pool [ "2001:db8:1::1 - 2001:db8:1::ffff", "2001:db8:1:0:5::/80" ]</userinput>
  3455. &gt; <userinput>config commit</userinput></screen>
  3456. The number of pools is not limited, but for performance reasons it is recommended to
  3457. use as few as possible.
  3458. </para>
  3459. <para>
  3460. The server may be configured to serve more than one subnet. To add a second subnet,
  3461. use a command similar to the following:
  3462. <screen>
  3463. &gt; <userinput>config add Dhcp6/subnet6</userinput>
  3464. &gt; <userinput>config set Dhcp6/subnet6[1]/subnet "2001:db8:beef::/48"</userinput>
  3465. &gt; <userinput>config set Dhcp6/subnet6[1]/pool [ "2001:db8:beef::/48" ]</userinput>
  3466. &gt; <userinput>config commit</userinput></screen>
  3467. Arrays are counted from 0. subnet[0] refers to the subnet defined in the
  3468. previous example. The <command>config add Dhcp6/subnet6</command> command adds
  3469. another (second) subnet. It can be referred to as
  3470. <command>Dhcp6/subnet6[1]</command>. In this example, we allow server to
  3471. dynamically assign all addresses available in the whole subnet. Although
  3472. very wasteful, it is certainly a valid configuration to dedicate the
  3473. whole /48 subnet for that purpose.
  3474. </para>
  3475. <para>
  3476. When configuring a DHCPv6 server using prefix/length notation, please pay
  3477. attention to the boundary values. When specifying that the server should use
  3478. a given pool, it will be able to allocate also first (typically network
  3479. address) address from that pool. For example for pool 2001:db8::/64 the
  3480. 2001:db8:: address may be assigned as well. If you want to avoid this,
  3481. please use the "min-max" notation.
  3482. </para>
  3483. <para>
  3484. Options can also be configured: the following commands configure
  3485. the DNS-SERVERS option for all subnets with the following addresses:
  3486. 2001:db8:1::1 and 2001:db8:1::2
  3487. <screen>
  3488. &gt; <userinput>config add Dhcp6/option-data</userinput>
  3489. &gt; <userinput>config set Dhcp6/option-data[0]/name "dns-servers"</userinput>
  3490. &gt; <userinput>config set Dhcp6/option-data[0]/code 23</userinput>
  3491. &gt; <userinput>config set Dhcp6/option-data[0]/data "2001 0DB8 0001 0000 0000 0000</userinput>
  3492. <userinput>0000 0001 2001 0DB8 0001 0000 0000 0000 0000 0002"</userinput>
  3493. &gt; <userinput>config commit</userinput>
  3494. </screen>
  3495. (The value for the setting of the "data" element is split across two
  3496. lines in this document for clarity: when entering the command, the whole
  3497. string should be entered on the same line.)
  3498. </para>
  3499. <para>
  3500. Currently the only way to set option data is to specify the
  3501. data as a string of hexadecimal digits. It is planned to allow
  3502. alternative ways of specifying the data as a comma-separated list,
  3503. e.g. "2001:db8:1::1,2001:db8:1::2".
  3504. </para>
  3505. <para>
  3506. As with global settings, it is also possible to override options on a
  3507. per-subnet basis, e.g. the following commands override the global DNS
  3508. servers option for a particular subnet, setting a single DNS server with
  3509. address 2001:db8:1::3.
  3510. <screen>
  3511. &gt; <userinput>config add Dhcp6/subnet6[0]/option-data</userinput>
  3512. &gt; <userinput>config set Dhcp6/subnet6[0]/option-data[0]/name "dns-servers"</userinput>
  3513. &gt; <userinput>config set Dhcp6/subnet6[0]/option-data[0]/code 23</userinput>
  3514. &gt; <userinput>config set Dhcp6/subnet6[0]/option-data[0]/data "2001 0DB8 0001 0000</userinput>
  3515. <userinput>0000 0000 0000 0003"</userinput>
  3516. &gt; <userinput>config commit</userinput></screen>
  3517. (As before, the setting of the "data" element has been split across two
  3518. lines for clarity.)
  3519. </para>
  3520. </section>
  3521. <section id="dhcp6-config-subnets">
  3522. <title>Subnet Selection</title>
  3523. <para>
  3524. The DHCPv6 server may receive requests from local (connected to the same
  3525. subnet as the server) and remote (connecting via relays)
  3526. clients.
  3527. <note>
  3528. <para>
  3529. Currently relayed DHCPv6 traffic is not supported. The server will
  3530. only respond to local DHCPv6 requests - see <xref linkend="dhcp6-limit"/>
  3531. </para>
  3532. </note>
  3533. As it may have many subnet configurations defined, it
  3534. must select appropriate subnet for a given request. To do this, the server first
  3535. checks if there is only one subnet defined and source of the packet is
  3536. link-local. If this is the case, the server assumes that the only subnet
  3537. defined is local and client is indeed connected to it. This check
  3538. simplifies small deployments.
  3539. </para>
  3540. <para>
  3541. If there are two or more subnets defined, the server can not assume
  3542. which of those (if any) subnets are local. Therefore an optional
  3543. "interface" parameter is available within a subnet definition to designate that a given subnet
  3544. is local, i.e. reachable directly over specified interface. For example
  3545. the server that is intended to serve a local subnet over eth0 may be configured
  3546. as follows:
  3547. <screen>
  3548. &gt; <userinput>config add Dhcp6/subnet6</userinput>
  3549. &gt; <userinput>config set Dhcp6/subnet6[1]/subnet "2001:db8:beef::/48"</userinput>
  3550. &gt; <userinput>config set Dhcp6/subnet6[1]/pool [ "2001:db8:beef::/48" ]</userinput>
  3551. &gt; <userinput>config set Dhcp6/subnet6[1]/interface "eth0"</userinput>
  3552. &gt; <userinput>config commit</userinput>
  3553. </screen>
  3554. </para>
  3555. </section>
  3556. </section>
  3557. <section id="dhcp6-serverid">
  3558. <title>Server Identifier in DHCPv6</title>
  3559. <para>The DHCPv6 protocol uses a "server identifier" (also known
  3560. as a DUID) for clients to be able to discriminate between several
  3561. servers present on the same link. There are several types of
  3562. DUIDs defined, but RFC 3315 instructs servers to use DUID-LLT if
  3563. possible. This format consists of a link-layer (MAC) address and a
  3564. timestamp. When started for the first time, the DHCPv6 server will
  3565. automatically generate such a DUID and store the chosen value to
  3566. a file (The file is named b10-dhcp6-serverid and is stored in the
  3567. "local state directory". This is set during installation when
  3568. "configure" is run, and can be changed by using "--localstatedir"
  3569. on the "configure" command line.) That file will be read by the server
  3570. and the contained value used whenever the server is subsequently started.
  3571. </para>
  3572. <para>
  3573. It is unlikely that this parameter needs to be changed. If such a need
  3574. arises, please stop the server, edit the file and start the server
  3575. again. It is a text file that contains double digit hexadecimal values
  3576. separated by colons. This format is similar to typical MAC address
  3577. format. Spaces are ignored. No extra characters are allowed in this
  3578. file.
  3579. </para>
  3580. </section>
  3581. <section id="dhcp6-std">
  3582. <title>Supported DHCPv6 Standards</title>
  3583. <para>The following standards and draft standards are currently
  3584. supported:</para>
  3585. <itemizedlist>
  3586. <listitem>
  3587. <simpara><ulink url="http://tools.ietf.org/html/rfc3315">RFC 3315</ulink>: Supported messages are SOLICIT,
  3588. ADVERTISE, REQUEST, RELEASE, RENEW, and REPLY.</simpara>
  3589. </listitem>
  3590. <listitem>
  3591. <simpara><ulink url="http://tools.ietf.org/html/rfc3646">RFC 3646</ulink>: Supported option is DNS_SERVERS.</simpara>
  3592. </listitem>
  3593. </itemizedlist>
  3594. </section>
  3595. <section id="dhcp6-limit">
  3596. <title>DHCPv6 Server Limitations</title>
  3597. <para> These are the current limitations and known problems
  3598. with the DHCPv6 server
  3599. software. Most of them are reflections of the early stage of
  3600. development and should be treated as <quote>not implemented
  3601. yet</quote>, rather than actual limitations.</para>
  3602. <itemizedlist>
  3603. <listitem>
  3604. <para>
  3605. On startup, the DHCPv6 server does not get the full configuration from
  3606. BIND 10. To remedy this, after starting BIND 10, modify any parameter
  3607. and commit the changes, e.g.
  3608. <screen>
  3609. &gt; <userinput>config show Dhcp6/renew-timer</userinput>
  3610. Dhcp6/renew-timer 1000 integer (default)
  3611. &gt; <userinput>config set Dhcp6/renew-timer 1001</userinput>
  3612. &gt; <userinput>config commit</userinput></screen>
  3613. </para>
  3614. </listitem>
  3615. <listitem>
  3616. <simpara>Relayed traffic is not supported.</simpara>
  3617. </listitem>
  3618. <listitem>
  3619. <simpara>Temporary addresses are not supported.</simpara>
  3620. </listitem>
  3621. <listitem>
  3622. <simpara>Prefix delegation is not supported.</simpara>
  3623. </listitem>
  3624. <listitem>
  3625. <simpara>Rebinding (REBIND), confirmation (CONFIRM),
  3626. and duplication report (DECLINE) are not yet supported.</simpara>
  3627. </listitem>
  3628. <listitem>
  3629. <simpara>DNS Update is not supported.</simpara>
  3630. </listitem>
  3631. <listitem>
  3632. <simpara>Interface detection is currently working on Linux
  3633. only. See <xref linkend="iface-detect"/> for details.</simpara>
  3634. </listitem>
  3635. </itemizedlist>
  3636. </section>
  3637. </chapter>
  3638. <chapter id="libdhcp">
  3639. <title>libdhcp++ library</title>
  3640. <para>
  3641. libdhcp++ is a common library written in C++ that handles
  3642. many DHCP-related tasks, including:
  3643. <itemizedlist>
  3644. <listitem>
  3645. <simpara>DHCPv4 and DHCPv6 packets parsing, manipulation and assembly</simpara>
  3646. </listitem>
  3647. <listitem>
  3648. <simpara>Option parsing, manipulation and assembly</simpara>
  3649. </listitem>
  3650. <listitem>
  3651. <simpara>Network interface detection</simpara>
  3652. </listitem>
  3653. <listitem>
  3654. <simpara>Socket operations such as creation, data transmission and reception and socket closing.</simpara>
  3655. </listitem>
  3656. </itemizedlist>
  3657. </para>
  3658. <para>
  3659. While this library is currently used by BIND 10 DHCP, it is designed to
  3660. be a portable, universal library, useful for any kind of DHCP-related software.
  3661. </para>
  3662. <!-- TODO: point to doxygen docs -->
  3663. <section id="iface-detect">
  3664. <title>Interface detection</title>
  3665. <para>Both the DHCPv4 and DHCPv6 components share network
  3666. interface detection routines. Interface detection is
  3667. currently only supported on Linux systems.</para>
  3668. <para>For non-Linux systems, there is currently a stub
  3669. implementation provided. The interface manager detects loopback
  3670. interfaces only as their name (lo or lo0) can be easily predicted.
  3671. Please contact the BIND 10 development team if you are interested
  3672. in running DHCP components on systems other than Linux.</para>
  3673. </section>
  3674. <!--
  3675. <section id="packet-handling">
  3676. <title>DHCPv4/DHCPv6 packet handling</title>
  3677. <para>TODO: Describe packet handling here, with pointers to wiki</para>
  3678. </section>
  3679. -->
  3680. </chapter>
  3681. <chapter id="statistics">
  3682. <title>Statistics</title>
  3683. <para>
  3684. The <command>b10-stats</command> process is started by
  3685. <command>bind10</command>.
  3686. It periodically collects statistics data from various modules
  3687. and aggregates it.
  3688. <!-- TODO -->
  3689. </para>
  3690. <para>
  3691. This stats daemon provides commands to identify if it is
  3692. running, show specified or all statistics data, and show specified
  3693. or all statistics data schema.
  3694. For example, using <command>bindctl</command>:
  3695. <screen>
  3696. &gt; <userinput>Stats show</userinput>
  3697. {
  3698. "Auth": {
  3699. "opcode.iquery": 0,
  3700. "opcode.notify": 10,
  3701. "opcode.query": 869617,
  3702. ...
  3703. "queries.tcp": 1749,
  3704. "queries.udp": 867868
  3705. },
  3706. "Boss": {
  3707. "boot_time": "2011-01-20T16:59:03Z"
  3708. },
  3709. "Stats": {
  3710. "boot_time": "2011-01-20T16:59:05Z",
  3711. "last_update_time": "2011-01-20T17:04:05Z",
  3712. "lname": "4d3869d9_a@jreed.example.net",
  3713. "report_time": "2011-01-20T17:04:06Z",
  3714. "timestamp": 1295543046.823504
  3715. }
  3716. }
  3717. </screen>
  3718. </para>
  3719. </chapter>
  3720. <chapter id="logging">
  3721. <title>Logging</title>
  3722. <section>
  3723. <title>Logging configuration</title>
  3724. <para>
  3725. The logging system in BIND 10 is configured through the
  3726. Logging module. All BIND 10 modules will look at the
  3727. configuration in Logging to see what should be logged and
  3728. to where.
  3729. <!-- TODO: what is context of Logging module for readers of this guide? -->
  3730. </para>
  3731. <section>
  3732. <title>Loggers</title>
  3733. <para>
  3734. Within BIND 10, a message is logged through a component
  3735. called a "logger". Different parts of BIND 10 log messages
  3736. through different loggers, and each logger can be configured
  3737. independently of one another.
  3738. </para>
  3739. <para>
  3740. In the Logging module, you can specify the configuration
  3741. for zero or more loggers; any that are not specified will
  3742. take appropriate default values.
  3743. </para>
  3744. <para>
  3745. The three most important elements of a logger configuration
  3746. are the <option>name</option> (the component that is
  3747. generating the messages), the <option>severity</option>
  3748. (what to log), and the <option>output_options</option>
  3749. (where to log).
  3750. </para>
  3751. <section>
  3752. <title>name (string)</title>
  3753. <para>
  3754. Each logger in the system has a name, the name being that
  3755. of the component using it to log messages. For instance,
  3756. if you want to configure logging for the resolver module,
  3757. you add an entry for a logger named <quote>Resolver</quote>. This
  3758. configuration will then be used by the loggers in the
  3759. Resolver module, and all the libraries used by it.
  3760. </para>
  3761. <!-- TODO: later we will have a way to know names of all modules
  3762. Right now you can only see what their names are if they are running
  3763. (a simple 'help' without anything else in bindctl for instance).
  3764. -->
  3765. <para>
  3766. If you want to specify logging for one specific library
  3767. within the module, you set the name to
  3768. <replaceable>module.library</replaceable>. For example, the
  3769. logger used by the nameserver address store component
  3770. has the full name of <quote>Resolver.nsas</quote>. If
  3771. there is no entry in Logging for a particular library,
  3772. it will use the configuration given for the module.
  3773. <!-- TODO: how to know these specific names?
  3774. We will either have to document them or tell the administrator to
  3775. specify module-wide logging and see what appears...
  3776. -->
  3777. </para>
  3778. <para>
  3779. <!-- TODO: severity has not been covered yet -->
  3780. To illustrate this, suppose you want the cache library
  3781. to log messages of severity DEBUG, and the rest of the
  3782. resolver code to log messages of severity INFO. To achieve
  3783. this you specify two loggers, one with the name
  3784. <quote>Resolver</quote> and severity INFO, and one with
  3785. the name <quote>Resolver.cache</quote> with severity
  3786. DEBUG. As there are no entries for other libraries (e.g.
  3787. the nsas), they will use the configuration for the module
  3788. (<quote>Resolver</quote>), so giving the desired behavior.
  3789. </para>
  3790. <para>
  3791. One special case is that of a module name of <quote>*</quote>
  3792. (asterisks), which is interpreted as <emphasis>any</emphasis>
  3793. module. You can set global logging options by using this,
  3794. including setting the logging configuration for a library
  3795. that is used by multiple modules (e.g. <quote>*.config</quote>
  3796. specifies the configuration library code in whatever
  3797. module is using it).
  3798. </para>
  3799. <para>
  3800. If there are multiple logger specifications in the
  3801. configuration that might match a particular logger, the
  3802. specification with the more specific logger name takes
  3803. precedence. For example, if there are entries for
  3804. both <quote>*</quote> and <quote>Resolver</quote>, the
  3805. resolver module &mdash; and all libraries it uses &mdash;
  3806. will log messages according to the configuration in the
  3807. second entry (<quote>Resolver</quote>). All other modules
  3808. will use the configuration of the first entry
  3809. (<quote>*</quote>). If there was also a configuration
  3810. entry for <quote>Resolver.cache</quote>, the cache library
  3811. within the resolver would use that in preference to the
  3812. entry for <quote>Resolver</quote>.
  3813. </para>
  3814. <para>
  3815. One final note about the naming. When specifying the
  3816. module name within a logger, use the name of the module
  3817. as specified in <command>bindctl</command>, e.g.
  3818. <quote>Resolver</quote> for the resolver module,
  3819. <quote>Xfrout</quote> for the xfrout module, etc. When
  3820. the message is logged, the message will include the name
  3821. of the logger generating the message, but with the module
  3822. name replaced by the name of the process implementing
  3823. the module (so for example, a message generated by the
  3824. <quote>Auth.cache</quote> logger will appear in the output
  3825. with a logger name of <quote>b10-auth.cache</quote>).
  3826. </para>
  3827. </section>
  3828. <section>
  3829. <title>severity (string)</title>
  3830. <para>
  3831. This specifies the category of messages logged.
  3832. Each message is logged with an associated severity which
  3833. may be one of the following (in descending order of
  3834. severity):
  3835. </para>
  3836. <itemizedlist>
  3837. <listitem>
  3838. <simpara> FATAL </simpara>
  3839. </listitem>
  3840. <listitem>
  3841. <simpara> ERROR </simpara>
  3842. </listitem>
  3843. <listitem>
  3844. <simpara> WARN </simpara>
  3845. </listitem>
  3846. <listitem>
  3847. <simpara> INFO </simpara>
  3848. </listitem>
  3849. <listitem>
  3850. <simpara> DEBUG </simpara>
  3851. </listitem>
  3852. </itemizedlist>
  3853. <para>
  3854. When the severity of a logger is set to one of these
  3855. values, it will only log messages of that severity, and
  3856. the severities above it. The severity may also be set to
  3857. NONE, in which case all messages from that logger are
  3858. inhibited.
  3859. <!-- TODO: worded wrong? If I set to INFO, why would it show DEBUG which is literally below in that list? -->
  3860. </para>
  3861. </section>
  3862. <section>
  3863. <title>output_options (list)</title>
  3864. <para>
  3865. Each logger can have zero or more
  3866. <option>output_options</option>. These specify where log
  3867. messages are sent to. These are explained in detail below.
  3868. </para>
  3869. <para>
  3870. The other options for a logger are:
  3871. </para>
  3872. </section>
  3873. <section>
  3874. <title>debuglevel (integer)</title>
  3875. <para>
  3876. When a logger's severity is set to DEBUG, this value
  3877. specifies what debug messages should be printed. It ranges
  3878. from 0 (least verbose) to 99 (most verbose).
  3879. </para>
  3880. <!-- TODO: complete this sentence:
  3881. The general classification of debug message types is
  3882. TODO; there's a ticket to determine these levels, see #1074
  3883. -->
  3884. <para>
  3885. If severity for the logger is not DEBUG, this value is ignored.
  3886. </para>
  3887. </section>
  3888. <section>
  3889. <title>additive (true or false)</title>
  3890. <para>
  3891. If this is true, the <option>output_options</option> from
  3892. the parent will be used. For example, if there are two
  3893. loggers configured; <quote>Resolver</quote> and
  3894. <quote>Resolver.cache</quote>, and <option>additive</option>
  3895. is true in the second, it will write the log messages
  3896. not only to the destinations specified for
  3897. <quote>Resolver.cache</quote>, but also to the destinations
  3898. as specified in the <option>output_options</option> in
  3899. the logger named <quote>Resolver</quote>.
  3900. <!-- TODO: check this -->
  3901. </para>
  3902. </section>
  3903. </section>
  3904. <section>
  3905. <title>Output Options</title>
  3906. <para>
  3907. The main settings for an output option are the
  3908. <option>destination</option> and a value called
  3909. <option>output</option>, the meaning of which depends on
  3910. the destination that is set.
  3911. </para>
  3912. <section>
  3913. <title>destination (string)</title>
  3914. <para>
  3915. The destination is the type of output. It can be one of:
  3916. </para>
  3917. <itemizedlist>
  3918. <listitem>
  3919. <simpara> console </simpara>
  3920. </listitem>
  3921. <listitem>
  3922. <simpara> file </simpara>
  3923. </listitem>
  3924. <listitem>
  3925. <simpara> syslog </simpara>
  3926. </listitem>
  3927. </itemizedlist>
  3928. </section>
  3929. <section>
  3930. <title>output (string)</title>
  3931. <para>
  3932. Depending on what is set as the output destination, this
  3933. value is interpreted as follows:
  3934. </para>
  3935. <variablelist>
  3936. <varlistentry>
  3937. <term><option>destination</option> is <quote>console</quote></term>
  3938. <listitem>
  3939. <para>
  3940. The value of output must be one of <quote>stdout</quote>
  3941. (messages printed to standard output) or
  3942. <quote>stderr</quote> (messages printed to standard
  3943. error).
  3944. </para>
  3945. <para>
  3946. Note: if output is set to <quote>stderr</quote> and a lot of
  3947. messages are produced in a short time (e.g. if the logging
  3948. level is set to DEBUG), you may occasionally see some messages
  3949. jumbled up together. This is due to a combination of the way
  3950. that messages are written to the screen and the unbuffered
  3951. nature of the standard error stream. If this occurs, it is
  3952. recommended that output be set to <quote>stdout</quote>.
  3953. </para>
  3954. </listitem>
  3955. </varlistentry>
  3956. <varlistentry>
  3957. <term><option>destination</option> is <quote>file</quote></term>
  3958. <listitem>
  3959. <para>
  3960. The value of output is interpreted as a file name;
  3961. log messages will be appended to this file.
  3962. </para>
  3963. </listitem>
  3964. </varlistentry>
  3965. <varlistentry>
  3966. <term><option>destination</option> is <quote>syslog</quote></term>
  3967. <listitem>
  3968. <para>
  3969. The value of output is interpreted as the
  3970. <command>syslog</command> facility (e.g.
  3971. <emphasis>local0</emphasis>) that should be used
  3972. for log messages.
  3973. </para>
  3974. </listitem>
  3975. </varlistentry>
  3976. </variablelist>
  3977. <para>
  3978. The other options for <option>output_options</option> are:
  3979. </para>
  3980. <section>
  3981. <title>flush (true of false)</title>
  3982. <para>
  3983. Flush buffers after each log message. Doing this will
  3984. reduce performance but will ensure that if the program
  3985. terminates abnormally, all messages up to the point of
  3986. termination are output.
  3987. </para>
  3988. </section>
  3989. <section>
  3990. <title>maxsize (integer)</title>
  3991. <para>
  3992. Only relevant when destination is file, this is maximum
  3993. file size of output files in bytes. When the maximum
  3994. size is reached, the file is renamed and a new file opened.
  3995. (For example, a ".1" is appended to the name &mdash;
  3996. if a ".1" file exists, it is renamed ".2",
  3997. etc.)
  3998. </para>
  3999. <para>
  4000. If this is 0, no maximum file size is used.
  4001. </para>
  4002. </section>
  4003. <section>
  4004. <title>maxver (integer)</title>
  4005. <para>
  4006. Maximum number of old log files to keep around when
  4007. rolling the output file. Only relevant when
  4008. <option>destination</option> is <quote>file</quote>.
  4009. </para>
  4010. </section>
  4011. </section>
  4012. </section>
  4013. <section>
  4014. <title>Example session</title>
  4015. <para>
  4016. In this example we want to set the global logging to
  4017. write to the file <filename>/var/log/my_bind10.log</filename>,
  4018. at severity WARN. We want the authoritative server to
  4019. log at DEBUG with debuglevel 40, to a different file
  4020. (<filename>/tmp/debug_messages</filename>).
  4021. </para>
  4022. <para>
  4023. Start <command>bindctl</command>.
  4024. </para>
  4025. <para>
  4026. <screen>["login success "]
  4027. &gt; <userinput>config show Logging</userinput>
  4028. Logging/loggers [] list
  4029. </screen>
  4030. </para>
  4031. <para>
  4032. By default, no specific loggers are configured, in which
  4033. case the severity defaults to INFO and the output is
  4034. written to stderr.
  4035. </para>
  4036. <para>
  4037. Let's first add a default logger:
  4038. </para>
  4039. <!-- TODO: adding the empty loggers makes no sense -->
  4040. <para>
  4041. <screen>&gt; <userinput>config add Logging/loggers</userinput>
  4042. &gt; <userinput>config show Logging</userinput>
  4043. Logging/loggers/ list (modified)
  4044. </screen>
  4045. </para>
  4046. <para>
  4047. The loggers value line changed to indicate that it is no
  4048. longer an empty list:
  4049. </para>
  4050. <para>
  4051. <screen>&gt; <userinput>config show Logging/loggers</userinput>
  4052. Logging/loggers[0]/name "" string (default)
  4053. Logging/loggers[0]/severity "INFO" string (default)
  4054. Logging/loggers[0]/debuglevel 0 integer (default)
  4055. Logging/loggers[0]/additive false boolean (default)
  4056. Logging/loggers[0]/output_options [] list (default)
  4057. </screen>
  4058. </para>
  4059. <para>
  4060. The name is mandatory, so we must set it. We will also
  4061. change the severity as well. Let's start with the global
  4062. logger.
  4063. </para>
  4064. <para>
  4065. <screen>&gt; <userinput>config set Logging/loggers[0]/name *</userinput>
  4066. &gt; <userinput>config set Logging/loggers[0]/severity WARN</userinput>
  4067. &gt; <userinput>config show Logging/loggers</userinput>
  4068. Logging/loggers[0]/name "*" string (modified)
  4069. Logging/loggers[0]/severity "WARN" string (modified)
  4070. Logging/loggers[0]/debuglevel 0 integer (default)
  4071. Logging/loggers[0]/additive false boolean (default)
  4072. Logging/loggers[0]/output_options [] list (default)
  4073. </screen>
  4074. </para>
  4075. <para>
  4076. Of course, we need to specify where we want the log
  4077. messages to go, so we add an entry for an output option.
  4078. </para>
  4079. <para>
  4080. <screen>&gt; <userinput> config add Logging/loggers[0]/output_options</userinput>
  4081. &gt; <userinput> config show Logging/loggers[0]/output_options</userinput>
  4082. Logging/loggers[0]/output_options[0]/destination "console" string (default)
  4083. Logging/loggers[0]/output_options[0]/output "stdout" string (default)
  4084. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  4085. Logging/loggers[0]/output_options[0]/maxsize 0 integer (default)
  4086. Logging/loggers[0]/output_options[0]/maxver 0 integer (default)
  4087. </screen>
  4088. </para>
  4089. <para>
  4090. These aren't the values we are looking for.
  4091. </para>
  4092. <para>
  4093. <screen>&gt; <userinput> config set Logging/loggers[0]/output_options[0]/destination file</userinput>
  4094. &gt; <userinput> config set Logging/loggers[0]/output_options[0]/output /var/log/bind10.log</userinput>
  4095. &gt; <userinput> config set Logging/loggers[0]/output_options[0]/maxsize 204800</userinput>
  4096. &gt; <userinput> config set Logging/loggers[0]/output_options[0]/maxver 8</userinput>
  4097. </screen>
  4098. </para>
  4099. <para>
  4100. Which would make the entire configuration for this logger
  4101. look like:
  4102. </para>
  4103. <para>
  4104. <screen>&gt; <userinput> config show all Logging/loggers</userinput>
  4105. Logging/loggers[0]/name "*" string (modified)
  4106. Logging/loggers[0]/severity "WARN" string (modified)
  4107. Logging/loggers[0]/debuglevel 0 integer (default)
  4108. Logging/loggers[0]/additive false boolean (default)
  4109. Logging/loggers[0]/output_options[0]/destination "file" string (modified)
  4110. Logging/loggers[0]/output_options[0]/output "/var/log/bind10.log" string (modified)
  4111. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  4112. Logging/loggers[0]/output_options[0]/maxsize 204800 integer (modified)
  4113. Logging/loggers[0]/output_options[0]/maxver 8 integer (modified)
  4114. </screen>
  4115. </para>
  4116. <para>
  4117. That looks OK, so let's commit it before we add the
  4118. configuration for the authoritative server's logger.
  4119. </para>
  4120. <para>
  4121. <screen>&gt; <userinput> config commit</userinput></screen>
  4122. </para>
  4123. <para>
  4124. Now that we have set it, and checked each value along
  4125. the way, adding a second entry is quite similar.
  4126. </para>
  4127. <para>
  4128. <screen>&gt; <userinput> config add Logging/loggers</userinput>
  4129. &gt; <userinput> config set Logging/loggers[1]/name Auth</userinput>
  4130. &gt; <userinput> config set Logging/loggers[1]/severity DEBUG</userinput>
  4131. &gt; <userinput> config set Logging/loggers[1]/debuglevel 40</userinput>
  4132. &gt; <userinput> config add Logging/loggers[1]/output_options</userinput>
  4133. &gt; <userinput> config set Logging/loggers[1]/output_options[0]/destination file</userinput>
  4134. &gt; <userinput> config set Logging/loggers[1]/output_options[0]/output /tmp/auth_debug.log</userinput>
  4135. &gt; <userinput> config commit</userinput>
  4136. </screen>
  4137. </para>
  4138. <para>
  4139. And that's it. Once we have found whatever it was we
  4140. needed the debug messages for, we can simply remove the
  4141. second logger to let the authoritative server use the
  4142. same settings as the rest.
  4143. </para>
  4144. <para>
  4145. <screen>&gt; <userinput> config remove Logging/loggers[1]</userinput>
  4146. &gt; <userinput> config commit</userinput>
  4147. </screen>
  4148. </para>
  4149. <para>
  4150. And every module will now be using the values from the
  4151. logger named <quote>*</quote>.
  4152. </para>
  4153. </section>
  4154. </section>
  4155. <section>
  4156. <title>Logging Message Format</title>
  4157. <para>
  4158. Each message written by BIND 10 to the configured logging
  4159. destinations comprises a number of components that identify
  4160. the origin of the message and, if the message indicates
  4161. a problem, information about the problem that may be
  4162. useful in fixing it.
  4163. </para>
  4164. <para>
  4165. Consider the message below logged to a file:
  4166. <screen>2011-06-15 13:48:22.034 ERROR [b10-resolver.asiolink]
  4167. ASIODNS_OPENSOCK error 111 opening TCP socket to 127.0.0.1(53)</screen>
  4168. </para>
  4169. <para>
  4170. Note: the layout of messages written to the system logging
  4171. file (syslog) may be slightly different. This message has
  4172. been split across two lines here for display reasons; in the
  4173. logging file, it will appear on one line.)
  4174. </para>
  4175. <para>
  4176. The log message comprises a number of components:
  4177. <variablelist>
  4178. <varlistentry>
  4179. <term>2011-06-15 13:48:22.034</term>
  4180. <!-- TODO: timestamp repeated even if using syslog? -->
  4181. <listitem><para>
  4182. The date and time at which the message was generated.
  4183. </para></listitem>
  4184. </varlistentry>
  4185. <varlistentry>
  4186. <term>ERROR</term>
  4187. <listitem><para>
  4188. The severity of the message.
  4189. </para></listitem>
  4190. </varlistentry>
  4191. <varlistentry>
  4192. <term>[b10-resolver.asiolink]</term>
  4193. <listitem><para>
  4194. The source of the message. This comprises two components:
  4195. the BIND 10 process generating the message (in this
  4196. case, <command>b10-resolver</command>) and the module
  4197. within the program from which the message originated
  4198. (which in the example is the asynchronous I/O link
  4199. module, asiolink).
  4200. </para></listitem>
  4201. </varlistentry>
  4202. <varlistentry>
  4203. <term>ASIODNS_OPENSOCK</term>
  4204. <listitem><para>
  4205. The message identification. Every message in BIND 10
  4206. has a unique identification, which can be used as an
  4207. index into the <ulink
  4208. url="bind10-messages.html"><citetitle>BIND 10 Messages
  4209. Manual</citetitle></ulink> (<ulink
  4210. url="http://bind10.isc.org/docs/bind10-messages.html"
  4211. />) from which more information can be obtained.
  4212. </para></listitem>
  4213. </varlistentry>
  4214. <varlistentry>
  4215. <term>error 111 opening TCP socket to 127.0.0.1(53)</term>
  4216. <listitem><para>
  4217. A brief description of the cause of the problem.
  4218. Within this text, information relating to the condition
  4219. that caused the message to be logged will be included.
  4220. In this example, error number 111 (an operating
  4221. system-specific error number) was encountered when
  4222. trying to open a TCP connection to port 53 on the
  4223. local system (address 127.0.0.1). The next step
  4224. would be to find out the reason for the failure by
  4225. consulting your system's documentation to identify
  4226. what error number 111 means.
  4227. </para></listitem>
  4228. </varlistentry>
  4229. </variablelist>
  4230. </para>
  4231. </section>
  4232. </chapter>
  4233. <!-- TODO: Add bibliography section (mostly RFCs, probably) -->
  4234. <!-- TODO: how to help: run unit tests, join lists, review trac tickets -->
  4235. <!-- <index> <title>Index</title> </index> -->
  4236. </book>
  4237. <!--
  4238. TODO:
  4239. Overview
  4240. Getting BIND 10 Installed
  4241. Basics
  4242. Dependencies
  4243. Optional
  4244. Advanced
  4245. How Does Everything Work Together?
  4246. Need Help?
  4247. -->