bind10-guide.xml 163 KB

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