bind10-guide.html 150 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>BIND 10 Guide</title><link rel="stylesheet" type="text/css" href="./bind10-guide.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="description" content="BIND 10 is a framework that features Domain Name System (DNS) suite and Dynamic Host Configuration Protocol (DHCP) servers managed by Internet Systems Consortium (ISC). It includes DNS libraries, modular components for controlling authoritative and recursive DNS servers, and experimental DHCPv4 and DHCPv6 servers. This is the reference guide for BIND 10 version 20120405. The most up-to-date version of this document (in PDF, HTML, and plain text formats), along with other documents for BIND 10, can be found at ."></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" title="BIND 10 Guide"><div class="titlepage"><div><div><h1 class="title"><a name="idp25968"></a>BIND 10 Guide</h1></div><div><h2 class="subtitle">Administrator Reference for BIND 10</h2></div><div><p class="releaseinfo">This is the reference guide for BIND 10 version
  2. 20120405.</p></div><div><p class="copyright">Copyright © 2010-2012 Internet Systems Consortium, Inc.</p></div><div><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>BIND 10 is a framework that features Domain Name System
  3. (DNS) suite and Dynamic Host Configuration Protocol (DHCP)
  4. servers managed by Internet Systems Consortium (ISC). It
  5. includes DNS libraries, modular components for controlling
  6. authoritative and recursive DNS servers, and experimental DHCPv4
  7. and DHCPv6 servers.
  8. </p><p>
  9. This is the reference guide for BIND 10 version 20120405.
  10. The most up-to-date version of this document (in PDF, HTML,
  11. and plain text formats), along with other documents for
  12. BIND 10, can be found at <a class="ulink" href="http://bind10.isc.org/docs" target="_top">http://bind10.isc.org/docs</a>.
  13. </p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#idp32752">Preface</a></span></dt><dd><dl><dt><span class="section"><a href="#acknowledgements">1. Acknowledgements</a></span></dt></dl></dd><dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#idp38240">1.1. Supported Platforms</a></span></dt><dt><span class="section"><a href="#required-software">1.2. Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">1.3. Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">1.4. Managing BIND 10</a></span></dt></dl></dd><dt><span class="chapter"><a href="#installation">2. Installation</a></span></dt><dd><dl><dt><span class="section"><a href="#build-requirements">2.1. Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">2.2. Quick start</a></span></dt><dt><span class="section"><a href="#install">2.3. Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#idp128960">2.3.1. Download Tar File</a></span></dt><dt><span class="section"><a href="#idp131696">2.3.2. Retrieve from Git</a></span></dt><dt><span class="section"><a href="#idp140672">2.3.3. Configure before the build</a></span></dt><dt><span class="section"><a href="#idp154016">2.3.4. Build</a></span></dt><dt><span class="section"><a href="#idp156000">2.3.5. Install</a></span></dt><dt><span class="section"><a href="#idp159168">2.3.6. Install Hierarchy</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#bind10">3. Starting BIND10 with <span class="command"><strong>bind10</strong></span></a></span></dt><dd><dl><dt><span class="section"><a href="#start">3.1. Starting BIND 10</a></span></dt><dt><span class="section"><a href="#bind10.config">3.2. Configuration of started processes</a></span></dt></dl></dd><dt><span class="chapter"><a href="#msgq">4. Command channel</a></span></dt><dt><span class="chapter"><a href="#cfgmgr">5. Configuration manager</a></span></dt><dt><span class="chapter"><a href="#cmdctl">6. Remote control daemon</a></span></dt><dd><dl><dt><span class="section"><a href="#cmdctl.spec">6.1. Configuration specification for b10-cmdctl</a></span></dt></dl></dd><dt><span class="chapter"><a href="#bindctl">7. Control and configure user interface</a></span></dt><dt><span class="chapter"><a href="#authserver">8. Authoritative Server</a></span></dt><dd><dl><dt><span class="section"><a href="#idp280304">8.1. Server Configurations</a></span></dt><dt><span class="section"><a href="#idp323936">8.2. Data Source Backends</a></span></dt><dd><dl><dt><span class="section"><a href="#in-memory-datasource">8.2.1. In-memory Data Source</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-with-sqlite3-backend">8.2.2. In-memory Data Source With SQLite3 Backend</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-loading">8.2.3. Reloading an In-memory Data Source</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-disabling">8.2.4. Disabling In-memory Data Sources</a></span></dt></dl></dd><dt><span class="section"><a href="#idp357152">8.3. Loading Master Zones Files</a></span></dt></dl></dd><dt><span class="chapter"><a href="#xfrin">9. Incoming Zone Transfers</a></span></dt><dd><dl><dt><span class="section"><a href="#idp375360">9.1. Configuration for Incoming Zone Transfers</a></span></dt><dt><span class="section"><a href="#idp380704">9.2. Enabling IXFR</a></span></dt><dt><span class="section"><a href="#zonemgr">9.3. Secondary Manager</a></span></dt><dt><span class="section"><a href="#idp397792">9.4. Trigger an Incoming Zone Transfer Manually</a></span></dt><dt><span class="section"><a href="#idp401488">9.5. Incoming Transfers with In-memory Datasource</a></span></dt></dl></dd><dt><span class="chapter"><a href="#xfrout">10. Outbound Zone Transfers</a></span></dt><dt><span class="chapter"><a href="#ddns">11. Dynamic DNS Update</a></span></dt><dd><dl><dt><span class="section"><a href="#idp433840">11.1. Enabling Dynamic Update</a></span></dt><dt><span class="section"><a href="#idp448128">11.2. Access Control</a></span></dt><dt><span class="section"><a href="#idp471872">11.3. Miscellaneous Operational Issues</a></span></dt></dl></dd><dt><span class="chapter"><a href="#resolverserver">12. Recursive Name Server</a></span></dt><dd><dl><dt><span class="section"><a href="#idp492912">12.1. Access Control</a></span></dt><dt><span class="section"><a href="#idp509632">12.2. Forwarding</a></span></dt></dl></dd><dt><span class="chapter"><a href="#dhcp4">13. DHCPv4 Server</a></span></dt><dd><dl><dt><span class="section"><a href="#dhcp4-usage">13.1. DHCPv4 Server Usage</a></span></dt><dt><span class="section"><a href="#dhcp4-config">13.2. DHCPv4 Server Configuration</a></span></dt><dt><span class="section"><a href="#dhcp4-std">13.3. Supported standards</a></span></dt><dt><span class="section"><a href="#dhcp4-limit">13.4. DHCPv4 Server Limitations</a></span></dt></dl></dd><dt><span class="chapter"><a href="#dhcp6">14. DHCPv6 Server</a></span></dt><dd><dl><dt><span class="section"><a href="#dhcp6-usage">14.1. DHCPv6 Server Usage</a></span></dt><dt><span class="section"><a href="#dhcp6-config">14.2. DHCPv6 Server Configuration</a></span></dt><dt><span class="section"><a href="#dhcp6-std">14.3. Supported DHCPv6 Standards</a></span></dt><dt><span class="section"><a href="#dhcp6-limit">14.4. DHCPv6 Server Limitations</a></span></dt></dl></dd><dt><span class="chapter"><a href="#libdhcp">15. libdhcp++ library</a></span></dt><dd><dl><dt><span class="section"><a href="#iface-detect">15.1. Interface detection</a></span></dt><dt><span class="section"><a href="#packet-handling">15.2. DHCPv4/DHCPv6 packet handling</a></span></dt></dl></dd><dt><span class="chapter"><a href="#statistics">16. Statistics</a></span></dt><dt><span class="chapter"><a href="#logging">17. Logging</a></span></dt><dd><dl><dt><span class="section"><a href="#idp609968">17.1. Logging configuration</a></span></dt><dd><dl><dt><span class="section"><a href="#idp611664">17.1.1. Loggers</a></span></dt><dt><span class="section"><a href="#idp648032">17.1.2. Output Options</a></span></dt><dt><span class="section"><a href="#idp673088">17.1.3. Example session</a></span></dt></dl></dd><dt><span class="section"><a href="#idp704416">17.2. Logging Message Format</a></span></dt></dl></dd></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>3.1. <a href="#idp193680"></a></dt></dl></div><div class="preface" title="Preface"><div class="titlepage"><div><div><h2 class="title"><a name="idp32752"></a>Preface</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#acknowledgements">1. Acknowledgements</a></span></dt></dl></div><div class="section" title="1. Acknowledgements"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="acknowledgements"></a>1. Acknowledgements</h2></div></div></div><p>ISC would like to acknowledge generous support for
  14. BIND 10 development of DHCPv4 and DHCPv6 components provided
  15. by <a class="ulink" href="http://www.comcast.com/" target="_top">Comcast</a>.</p></div></div><div class="chapter" title="Chapter 1. Introduction"><div class="titlepage"><div><div><h2 class="title"><a name="intro"></a>Chapter 1. Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#idp38240">1.1. Supported Platforms</a></span></dt><dt><span class="section"><a href="#required-software">1.2. Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">1.3. Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">1.4. Managing BIND 10</a></span></dt></dl></div><p>
  16. BIND is the popular implementation of a DNS server, developer
  17. interfaces, and DNS tools.
  18. BIND 10 is a rewrite of BIND 9. BIND 10 is written in C++ and Python
  19. and provides a modular environment for serving and maintaining DNS.
  20. BIND 10 provides a EDNS0- and DNSSEC-capable authoritative
  21. DNS server and a caching recursive name server which also
  22. provides forwarding.
  23. </p><p>
  24. This guide covers the experimental prototype of
  25. BIND 10 version 20120405.
  26. </p><div class="section" title="1.1. Supported Platforms"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp38240"></a>1.1. Supported Platforms</h2></div></div></div><p>
  27. BIND 10 builds have been tested on (in no particular order)
  28. Debian GNU/Linux 5 and unstable, Ubuntu 9.10, NetBSD 5,
  29. Solaris 10 and 11, FreeBSD 7 and 8, CentOS Linux 5.3,
  30. MacOS 10.6 and 10.7, and OpenBSD 5.1.
  31. It has been tested on Sparc, i386, and amd64 hardware
  32. platforms.
  33. It is planned for BIND 10 to build, install and run on
  34. Windows and standard Unix-type platforms.
  35. </p></div><div class="section" title="1.2. Required Software"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="required-software"></a>1.2. Required Software</h2></div></div></div><p>
  36. BIND 10 requires at least Python 3.1
  37. (<a class="ulink" href="http://www.python.org/" target="_top">http://www.python.org/</a>).
  38. It has also been tested with Python 3.2.
  39. </p><p>
  40. BIND 10 uses the Botan crypto library for C++
  41. (<a class="ulink" href="http://botan.randombit.net/" target="_top">http://botan.randombit.net/</a>).
  42. It requires at least Botan version 1.8.
  43. </p><p>
  44. BIND 10 uses the log4cplus C++ logging library
  45. (<a class="ulink" href="http://log4cplus.sourceforge.net/" target="_top">http://log4cplus.sourceforge.net/</a>).
  46. It requires at least log4cplus version 1.0.3.
  47. </p><p>
  48. The authoritative DNS server uses SQLite3
  49. (<a class="ulink" href="http://www.sqlite.org/" target="_top">http://www.sqlite.org/</a>).
  50. It needs at least SQLite version 3.3.9.
  51. </p><p>
  52. The <span class="command"><strong>b10-ddns</strong></span>, <span class="command"><strong>b10-xfrin</strong></span>,
  53. <span class="command"><strong>b10-xfrout</strong></span>, and <span class="command"><strong>b10-zonemgr</strong></span>
  54. components require the libpython3 library and the Python
  55. _sqlite3.so module (which is included with Python).
  56. The <span class="command"><strong>b10-stats-httpd</strong></span> component uses the
  57. Python pyexpat.so module.
  58. The Python modules need to be built for the corresponding Python 3.
  59. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  60. Some operating systems do not provide these dependencies
  61. in their default installation nor standard packages
  62. collections.
  63. You may need to install them separately.
  64. </p></div></div><div class="section" title="1.3. Starting and Stopping the Server"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="starting_stopping"></a>1.3. Starting and Stopping the Server</h2></div></div></div><p>
  65. BIND 10 is modular. Part of this modularity is
  66. accomplished using multiple cooperating processes which, together,
  67. provide the server functionality. This is a change from
  68. the previous generation of BIND software, which used a
  69. single process.
  70. </p><p>
  71. At first, running many different processes may seem confusing.
  72. However, these processes are started, stopped, and maintained
  73. by a single command, <span class="command"><strong>bind10</strong></span>.
  74. This command starts a master process which will start other
  75. processes as needed.
  76. The processes started by the <span class="command"><strong>bind10</strong></span>
  77. command have names starting with "b10-", including:
  78. </p><p>
  79. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
  80. <span class="command"><strong>b10-auth</strong></span> &#8212;
  81. Authoritative DNS server.
  82. This process serves DNS requests.
  83. </li><li class="listitem">
  84. <span class="command"><strong>b10-cfgmgr</strong></span> &#8212;
  85. Configuration manager.
  86. This process maintains all of the configuration for BIND 10.
  87. </li><li class="listitem">
  88. <span class="command"><strong>b10-cmdctl</strong></span> &#8212;
  89. Command and control service.
  90. This process allows external control of the BIND 10 system.
  91. </li><li class="listitem">
  92. <span class="command"><strong>b10-ddns</strong></span> &#8212;
  93. Dynamic DNS update service.
  94. This process is used to handle incoming DNS update
  95. requests to allow granted clients to update zones
  96. for which BIND 10 is serving as a primary server.
  97. </li><li class="listitem">
  98. <span class="command"><strong>b10-msgq</strong></span> &#8212;
  99. Message bus daemon.
  100. This process coordinates communication between all of the other
  101. BIND 10 processes.
  102. </li><li class="listitem">
  103. <span class="command"><strong>b10-resolver</strong></span> &#8212;
  104. Recursive name server.
  105. This process handles incoming queries.
  106. </li><li class="listitem">
  107. <span class="command"><strong>b10-sockcreator</strong></span> &#8212;
  108. Socket creator daemon.
  109. This process creates sockets used by
  110. network-listening BIND 10 processes.
  111. </li><li class="listitem">
  112. <span class="command"><strong>b10-stats</strong></span> &#8212;
  113. Statistics collection daemon.
  114. This process collects and reports statistics data.
  115. </li><li class="listitem">
  116. <span class="command"><strong>b10-stats-httpd</strong></span> &#8212;
  117. HTTP server for statistics reporting.
  118. This process reports statistics data in XML format over HTTP.
  119. </li><li class="listitem">
  120. <span class="command"><strong>b10-xfrin</strong></span> &#8212;
  121. Incoming zone transfer service.
  122. This process is used to transfer a new copy
  123. of a zone into BIND 10, when acting as a secondary server.
  124. </li><li class="listitem">
  125. <span class="command"><strong>b10-xfrout</strong></span> &#8212;
  126. Outgoing zone transfer service.
  127. This process is used to handle transfer requests to
  128. send a local zone to a remote secondary server,
  129. when acting as a master server.
  130. </li><li class="listitem">
  131. <span class="command"><strong>b10-zonemgr</strong></span> &#8212;
  132. Secondary manager.
  133. This process keeps track of timers and other
  134. necessary information for BIND 10 to act as a slave server.
  135. </li></ul></div><p>
  136. </p><p>
  137. These are ran automatically by <span class="command"><strong>bind10</strong></span>
  138. and do not need to be run manually.
  139. </p></div><div class="section" title="1.4. Managing BIND 10"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="managing_once_running"></a>1.4. Managing BIND 10</h2></div></div></div><p>
  140. Once BIND 10 is running, a few commands are used to interact
  141. directly with the system:
  142. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
  143. <span class="command"><strong>bindctl</strong></span> &#8212;
  144. interactive administration interface.
  145. This is a low-level command-line tool which allows
  146. a developer or an experienced administrator to control
  147. BIND 10.
  148. </li><li class="listitem">
  149. <span class="command"><strong>b10-loadzone</strong></span> &#8212;
  150. zone file loader.
  151. This tool will load standard masterfile-format zone files into
  152. BIND 10.
  153. </li><li class="listitem">
  154. <span class="command"><strong>b10-cmdctl-usermgr</strong></span> &#8212;
  155. user access control.
  156. This tool allows an administrator to authorize additional users
  157. to manage BIND 10.
  158. </li></ul></div><p>
  159. </p></div><p>
  160. The tools and modules are covered in full detail in this guide.
  161. In addition, manual pages are also provided in the default installation.
  162. </p><p>
  163. BIND 10 also provides libraries and programmer interfaces
  164. for C++ and Python for the message bus, configuration backend,
  165. and, of course, DNS. These include detailed developer
  166. documentation and code examples.
  167. </p></div><div class="chapter" title="Chapter 2. Installation"><div class="titlepage"><div><div><h2 class="title"><a name="installation"></a>Chapter 2. Installation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#build-requirements">2.1. Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">2.2. Quick start</a></span></dt><dt><span class="section"><a href="#install">2.3. Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#idp128960">2.3.1. Download Tar File</a></span></dt><dt><span class="section"><a href="#idp131696">2.3.2. Retrieve from Git</a></span></dt><dt><span class="section"><a href="#idp140672">2.3.3. Configure before the build</a></span></dt><dt><span class="section"><a href="#idp154016">2.3.4. Build</a></span></dt><dt><span class="section"><a href="#idp156000">2.3.5. Install</a></span></dt><dt><span class="section"><a href="#idp159168">2.3.6. Install Hierarchy</a></span></dt></dl></dd></dl></div><div class="section" title="2.1. Building Requirements"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="build-requirements"></a>2.1. Building Requirements</h2></div></div></div><p>
  168. In addition to the run-time requirements, building BIND 10
  169. from source code requires various development include headers.
  170. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  171. Some operating systems have split their distribution packages into
  172. a run-time and a development package. You will need to install
  173. the development package versions, which include header files and
  174. libraries, to build BIND 10 from source code.
  175. </p></div><p>
  176. Building from source code requires the Boost
  177. build-time headers
  178. (<a class="ulink" href="http://www.boost.org/" target="_top">http://www.boost.org/</a>).
  179. At least Boost version 1.35 is required.
  180. </p><p>
  181. To build BIND 10, also install the Botan (at least version
  182. 1.8) and the log4cplus (at least version 1.0.3)
  183. development include headers.
  184. </p><p>
  185. Building BIND 10 also requires a C++ compiler and
  186. standard development headers, make, and pkg-config.
  187. BIND 10 builds have been tested with GCC g++ 3.4.3, 4.1.2,
  188. 4.1.3, 4.2.1, 4.3.2, and 4.4.1; Clang++ 2.8; and Sun C++ 5.10.
  189. </p><p>
  190. Visit the wiki at <a class="ulink" href="http://bind10.isc.org/wiki/SystemSpecificNotes" target="_top">http://bind10.isc.org/wiki/SystemSpecificNotes</a>
  191. for system-specific installation tips.
  192. </p></div><div class="section" title="2.2. Quick start"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="quickstart"></a>2.2. Quick start</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  193. This quickly covers the standard steps for installing
  194. and deploying BIND 10 as an authoritative name server using
  195. its defaults. For troubleshooting, full customizations and further
  196. details, see the respective chapters in the BIND 10 guide.
  197. </p></div><p>
  198. To quickly get started with BIND 10, follow these steps.
  199. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
  200. Install required run-time and build dependencies.
  201. </li><li class="listitem">
  202. Download the BIND 10 source tar file from
  203. <a class="ulink" href="ftp://ftp.isc.org/isc/bind10/" target="_top">ftp://ftp.isc.org/isc/bind10/</a>.
  204. </li><li class="listitem"><p>Extract the tar file:
  205. </p><pre class="screen">$ <strong class="userinput"><code>gzcat bind10-<em class="replaceable"><code>VERSION</code></em>.tar.gz | tar -xvf -</code></strong></pre><p>
  206. </p></li><li class="listitem"><p>Go into the source and run configure:
  207. </p><pre class="screen">$ <strong class="userinput"><code>cd bind10-<em class="replaceable"><code>VERSION</code></em></code></strong>
  208. $ <strong class="userinput"><code>./configure</code></strong></pre><p>
  209. </p></li><li class="listitem"><p>Build it:
  210. </p><pre class="screen">$ <strong class="userinput"><code>make</code></strong></pre><p>
  211. </p></li><li class="listitem"><p>Install it (to default /usr/local):
  212. </p><pre class="screen">$ <strong class="userinput"><code>make install</code></strong></pre><p>
  213. </p></li><li class="listitem"><p>Start the server:
  214. </p><pre class="screen">$ <strong class="userinput"><code>/usr/local/sbin/bind10</code></strong></pre><p>
  215. </p></li><li class="listitem"><p>Test it; for example:
  216. </p><pre class="screen">$ <strong class="userinput"><code>dig @127.0.0.1 -c CH -t TXT authors.bind</code></strong></pre><p>
  217. </p></li><li class="listitem"><p>Load desired zone file(s), for example:
  218. </p><pre class="screen">$ <strong class="userinput"><code>b10-loadzone <em class="replaceable"><code>your.zone.example.org</code></em></code></strong></pre><p>
  219. </p></li><li class="listitem">
  220. Test the new zone.
  221. </li></ol></div></div><div class="section" title="2.3. Installation from source"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="install"></a>2.3. Installation from source</h2></div></div></div><p>
  222. BIND 10 is open source software written in C++ and Python.
  223. It is freely available in source code form from ISC via
  224. the Git code revision control system or as a downloadable
  225. tar file. It may also be available in pre-compiled ready-to-use
  226. packages from operating system vendors.
  227. </p><div class="section" title="2.3.1. Download Tar File"><div class="titlepage"><div><div><h3 class="title"><a name="idp128960"></a>2.3.1. Download Tar File</h3></div></div></div><p>
  228. Downloading a release tar file is the recommended method to
  229. obtain the source code.
  230. </p><p>
  231. The BIND 10 releases are available as tar file downloads from
  232. <a class="ulink" href="ftp://ftp.isc.org/isc/bind10/" target="_top">ftp://ftp.isc.org/isc/bind10/</a>.
  233. Periodic development snapshots may also be available.
  234. </p></div><div class="section" title="2.3.2. Retrieve from Git"><div class="titlepage"><div><div><h3 class="title"><a name="idp131696"></a>2.3.2. Retrieve from Git</h3></div></div></div><p>
  235. Downloading this "bleeding edge" code is recommended only for
  236. developers or advanced users. Using development code in a production
  237. environment is not recommended.
  238. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  239. When using source code retrieved via Git additional
  240. software will be required: automake (v1.11 or newer),
  241. libtoolize, and autoconf (2.59 or newer).
  242. These may need to be installed.
  243. </p></div><p>
  244. The latest development code, including temporary experiments
  245. and un-reviewed code, is available via the BIND 10 code revision
  246. control system. This is powered by Git and all the BIND 10
  247. development is public.
  248. The leading development is done in the <span class="quote">&#8220;<span class="quote">master</span>&#8221;</span>.
  249. </p><p>
  250. The code can be checked out from
  251. <code class="filename">git://git.bind10.isc.org/bind10</code>;
  252. for example:
  253. </p><pre class="screen">$ <strong class="userinput"><code>git clone git://git.bind10.isc.org/bind10</code></strong></pre><p>
  254. </p><p>
  255. When checking out the code from
  256. the code version control system, it doesn't include the
  257. generated configure script, Makefile.in files, nor the
  258. related configure files.
  259. They can be created by running <span class="command"><strong>autoreconf</strong></span>
  260. with the <code class="option">--install</code> switch.
  261. This will run <span class="command"><strong>autoconf</strong></span>,
  262. <span class="command"><strong>aclocal</strong></span>,
  263. <span class="command"><strong>libtoolize</strong></span>,
  264. <span class="command"><strong>autoheader</strong></span>,
  265. <span class="command"><strong>automake</strong></span>,
  266. and related commands.
  267. </p></div><div class="section" title="2.3.3. Configure before the build"><div class="titlepage"><div><div><h3 class="title"><a name="idp140672"></a>2.3.3. Configure before the build</h3></div></div></div><p>
  268. BIND 10 uses the GNU Build System to discover build environment
  269. details.
  270. To generate the makefiles using the defaults, simply run:
  271. </p><pre class="screen">$ <strong class="userinput"><code>./configure</code></strong></pre><p>
  272. </p><p>
  273. Run <span class="command"><strong>./configure</strong></span> with the <code class="option">--help</code>
  274. switch to view the different options. The commonly-used options are:
  275. </p><div class="variablelist"><dl><dt><span class="term">--prefix</span></dt><dd>Define the installation location (the
  276. default is <code class="filename">/usr/local/</code>).
  277. </dd><dt><span class="term">--with-boost-include</span></dt><dd>Define the path to find the Boost headers.
  278. </dd><dt><span class="term">--with-pythonpath</span></dt><dd>Define the path to Python 3.1 if it is not in the
  279. standard execution path.
  280. </dd><dt><span class="term">--with-gtest</span></dt><dd>Enable building the C++ Unit Tests using the
  281. Google Tests framework. Optionally this can define the
  282. path to the gtest header files and library.
  283. </dd></dl></div><p>
  284. </p><p>
  285. For example, the following configures it to
  286. find the Boost headers, find the
  287. Python interpreter, and sets the installation location:
  288. </p><pre class="screen">$ <strong class="userinput"><code>./configure \
  289. --with-boost-include=/usr/pkg/include \
  290. --with-pythonpath=/usr/pkg/bin/python3.1 \
  291. --prefix=/opt/bind10</code></strong></pre><p>
  292. </p><p>
  293. If the configure fails, it may be due to missing or old
  294. dependencies.
  295. </p></div><div class="section" title="2.3.4. Build"><div class="titlepage"><div><div><h3 class="title"><a name="idp154016"></a>2.3.4. Build</h3></div></div></div><p>
  296. After the configure step is complete, to build the executables
  297. from the C++ code and prepare the Python scripts, run:
  298. </p><pre class="screen">$ <strong class="userinput"><code>make</code></strong></pre><p>
  299. </p></div><div class="section" title="2.3.5. Install"><div class="titlepage"><div><div><h3 class="title"><a name="idp156000"></a>2.3.5. Install</h3></div></div></div><p>
  300. To install the BIND 10 executables, support files,
  301. and documentation, run:
  302. </p><pre class="screen">$ <strong class="userinput"><code>make install</code></strong></pre><p>
  303. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The install step may require superuser privileges.</p></div></div><div class="section" title="2.3.6. Install Hierarchy"><div class="titlepage"><div><div><h3 class="title"><a name="idp159168"></a>2.3.6. Install Hierarchy</h3></div></div></div><p>
  304. The following is the layout of the complete BIND 10 installation:
  305. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
  306. <code class="filename">bin/</code> &#8212;
  307. general tools and diagnostic clients.
  308. </li><li class="listitem">
  309. <code class="filename">etc/bind10-devel/</code> &#8212;
  310. configuration files.
  311. </li><li class="listitem">
  312. <code class="filename">lib/</code> &#8212;
  313. libraries and python modules.
  314. </li><li class="listitem">
  315. <code class="filename">libexec/bind10-devel/</code> &#8212;
  316. executables that a user wouldn't normally run directly and
  317. are not run independently.
  318. These are the BIND 10 modules which are daemons started by
  319. the <span class="command"><strong>bind10</strong></span> tool.
  320. </li><li class="listitem">
  321. <code class="filename">sbin/</code> &#8212;
  322. commands used by the system administrator.
  323. </li><li class="listitem">
  324. <code class="filename">share/bind10-devel/</code> &#8212;
  325. configuration specifications.
  326. </li><li class="listitem">
  327. <code class="filename">share/man/</code> &#8212;
  328. manual pages (online documentation).
  329. </li><li class="listitem">
  330. <code class="filename">var/bind10-devel/</code> &#8212;
  331. data source and configuration databases.
  332. </li></ul></div><p>
  333. </p></div></div></div><div class="chapter" title="Chapter 3. Starting BIND10 with bind10"><div class="titlepage"><div><div><h2 class="title"><a name="bind10"></a>Chapter 3. Starting BIND10 with <span class="command"><strong>bind10</strong></span></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#start">3.1. Starting BIND 10</a></span></dt><dt><span class="section"><a href="#bind10.config">3.2. Configuration of started processes</a></span></dt></dl></div><p>
  334. BIND 10 provides the <span class="command"><strong>bind10</strong></span> command which
  335. starts up the required processes.
  336. <span class="command"><strong>bind10</strong></span>
  337. will also restart some processes that exit unexpectedly.
  338. This is the only command needed to start the BIND 10 system.
  339. </p><p>
  340. After starting the <span class="command"><strong>b10-msgq</strong></span> communications channel,
  341. <span class="command"><strong>bind10</strong></span> connects to it,
  342. runs the configuration manager, and reads its own configuration.
  343. Then it starts the other modules.
  344. </p><p>
  345. The <span class="command"><strong>b10-sockcreator</strong></span>, <span class="command"><strong>b10-msgq</strong></span> and
  346. <span class="command"><strong>b10-cfgmgr</strong></span>
  347. services make up the core. The <span class="command"><strong>b10-msgq</strong></span> daemon
  348. provides the communication channel between every part of the system.
  349. The <span class="command"><strong>b10-cfgmgr</strong></span> daemon is always needed by every
  350. module, if only to send information about themselves somewhere,
  351. but more importantly to ask about their own settings, and
  352. about other modules. The <span class="command"><strong>b10-sockcreator</strong></span> will
  353. allocate sockets for the rest of the system.
  354. </p><p>
  355. In its default configuration, the <span class="command"><strong>bind10</strong></span>
  356. master process will also start up
  357. <span class="command"><strong>b10-cmdctl</strong></span> for administration tools to
  358. communicate with the system, and
  359. <span class="command"><strong>b10-stats</strong></span> for statistics collection.
  360. </p><div class="section" title="3.1. Starting BIND 10"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="start"></a>3.1. Starting BIND 10</h2></div></div></div><p>
  361. To start the BIND 10 service, simply run <span class="command"><strong>bind10</strong></span>.
  362. Run it with the <code class="option">--verbose</code> switch to
  363. get additional debugging or diagnostic output.
  364. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  365. If the setproctitle Python module is detected at start up,
  366. the process names for the Python-based daemons will be renamed
  367. to better identify them instead of just <span class="quote">&#8220;<span class="quote">python</span>&#8221;</span>.
  368. This is not needed on some operating systems.
  369. </p></div></div><div class="section" title="3.2. Configuration of started processes"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="bind10.config"></a>3.2. Configuration of started processes</h2></div></div></div><p>
  370. The processes to be started can be configured, with the exception
  371. of the <span class="command"><strong>b10-sockcreator</strong></span>, <span class="command"><strong>b10-msgq</strong></span>
  372. and <span class="command"><strong>b10-cfgmgr</strong></span>.
  373. </p><p>
  374. The configuration is in the Boss/components section. Each element
  375. represents one component, which is an abstraction of a process
  376. (currently there's also one component which doesn't represent
  377. a process).
  378. </p><p>
  379. To add a process to the set, let's say the resolver (which not started
  380. by default), you would do this:
  381. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Boss/components b10-resolver</code></strong>
  382. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/special resolver</code></strong>
  383. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/kind needed</code></strong>
  384. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/priority 10</code></strong>
  385. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  386. Now, what it means. We add an entry called b10-resolver. It is both a
  387. name used to reference this component in the configuration and the
  388. name of the process to start. Then we set some parameters on how to
  389. start it.
  390. </p><p>
  391. The special one is for components that need some kind of special care
  392. during startup or shutdown. Unless specified, the component is started
  393. in usual way. This is the list of components that need to be started
  394. in a special way, with the value of special used for them:
  395. </p><div class="table"><a name="idp193680"></a><p class="title"><b>Table 3.1. </b></p><div class="table-contents"><table border="1"><colgroup><col align="left" class="component"><col align="left" class="special"><col align="left" class="description"></colgroup><thead><tr><th align="left">Component</th><th align="left">Special</th><th align="left">Description</th></tr></thead><tbody><tr><td align="left">b10-auth</td><td align="left">auth</td><td align="left">Authoritative server</td></tr><tr><td align="left">b10-resolver</td><td align="left">resolver</td><td align="left">The resolver</td></tr><tr><td align="left">b10-cmdctl</td><td align="left">cmdctl</td><td align="left">The command control (remote control interface)</td></tr></tbody></table></div></div><p><br class="table-break">
  396. </p><p>
  397. The kind specifies how a failure of the component should
  398. be handled. If it is set to <span class="quote">&#8220;<span class="quote">dispensable</span>&#8221;</span>
  399. (the default unless you set something else), it will get
  400. started again if it fails. If it is set to <span class="quote">&#8220;<span class="quote">needed</span>&#8221;</span>
  401. and it fails at startup, the whole <span class="command"><strong>bind10</strong></span>
  402. shuts down and exits with error exit code. But if it fails
  403. some time later, it is just started again. If you set it
  404. to <span class="quote">&#8220;<span class="quote">core</span>&#8221;</span>, you indicate that the system is
  405. not usable without the component and if such component
  406. fails, the system shuts down no matter when the failure
  407. happened. This is the behaviour of the core components
  408. (the ones you can't turn off), but you can declare any
  409. other components as core as well if you wish (but you can
  410. turn these off, they just can't fail).
  411. </p><p>
  412. The priority defines order in which the components should start.
  413. The ones with higher number are started sooner than the ones with
  414. lower ones. If you don't set it, 0 (zero) is used as the priority.
  415. Usually, leaving it at the default is enough.
  416. </p><p>
  417. There are other parameters we didn't use in our example.
  418. One of them is <span class="quote">&#8220;<span class="quote">address</span>&#8221;</span>. It is the address
  419. used by the component on the <span class="command"><strong>b10-msgq</strong></span>
  420. message bus. The special components already know their
  421. address, but the usual ones don't. The address is by
  422. convention the thing after <span class="emphasis"><em>b10-</em></span>, with
  423. the first letter capitalized (eg. <span class="command"><strong>b10-stats</strong></span>
  424. would have <span class="quote">&#8220;<span class="quote">Stats</span>&#8221;</span> as its address).
  425. </p><p>
  426. The last one is process. It is the name of the process to be started.
  427. It defaults to the name of the component if not set, but you can use
  428. this to override it.
  429. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  430. This system allows you to start the same component multiple times
  431. (by including it in the configuration with different names, but the
  432. same process setting). However, the rest of the system doesn't expect
  433. such a situation, so it would probably not do what you want. Such
  434. support is yet to be implemented.
  435. </p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  436. The configuration is quite powerful, but that includes
  437. a lot of space for mistakes. You could turn off the
  438. <span class="command"><strong>b10-cmdctl</strong></span>, but then you couldn't
  439. change it back the usual way, as it would require it to
  440. be running (you would have to find and edit the configuration
  441. directly). Also, some modules might have dependencies:
  442. <span class="command"><strong>b10-stats-httpd</strong></span> needs
  443. <span class="command"><strong>b10-stats</strong></span>, <span class="command"><strong>b10-xfrout</strong></span>
  444. needs <span class="command"><strong>b10-auth</strong></span> to be running, etc.
  445. </p><p>
  446. In short, you should think twice before disabling something here.
  447. </p></div><p>
  448. It is possible to start some components multiple times (currently
  449. <span class="command"><strong>b10-auth</strong></span> and <span class="command"><strong>b10-resolzer</strong></span>).
  450. You might want to do that to gain more performance (each one uses only
  451. single core). Just put multiple entries under different names, like
  452. this, with the same config:
  453. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Boss/components b10-resolver-2</code></strong>
  454. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver-2/special resolver</code></strong>
  455. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver-2/kind needed</code></strong>
  456. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  457. </p><p>
  458. However, this is work in progress and the support is not yet complete.
  459. For example, each resolver will have its own cache, each authoritative
  460. server will keep its own copy of in-memory data and there could be
  461. problems with locking the sqlite database, if used. The configuration
  462. might be changed to something more convenient in future.
  463. </p></div></div><div class="chapter" title="Chapter 4. Command channel"><div class="titlepage"><div><div><h2 class="title"><a name="msgq"></a>Chapter 4. Command channel</h2></div></div></div><p>
  464. The BIND 10 components use the <span class="command"><strong>b10-msgq</strong></span>
  465. message routing daemon to communicate with other BIND 10 components.
  466. The <span class="command"><strong>b10-msgq</strong></span> implements what is called the
  467. <span class="quote">&#8220;<span class="quote">Command Channel</span>&#8221;</span>.
  468. Processes intercommunicate by sending messages on the command
  469. channel.
  470. Example messages include shutdown, get configurations, and set
  471. configurations.
  472. This Command Channel is not used for DNS message passing.
  473. It is used only to control and monitor the BIND 10 system.
  474. </p><p>
  475. Administrators do not communicate directly with the
  476. <span class="command"><strong>b10-msgq</strong></span> daemon.
  477. By default, BIND 10 uses port 9912 for the
  478. <span class="command"><strong>b10-msgq</strong></span> service.
  479. It listens on 127.0.0.1.
  480. </p></div><div class="chapter" title="Chapter 5. Configuration manager"><div class="titlepage"><div><div><h2 class="title"><a name="cfgmgr"></a>Chapter 5. Configuration manager</h2></div></div></div><p>
  481. The configuration manager, <span class="command"><strong>b10-cfgmgr</strong></span>,
  482. handles all BIND 10 system configuration. It provides
  483. persistent storage for configuration, and notifies running
  484. modules of configuration changes.
  485. </p><p>
  486. The <span class="command"><strong>b10-auth</strong></span> and <span class="command"><strong>b10-xfrin</strong></span>
  487. daemons and other components receive their configurations
  488. from the configuration manager over the <span class="command"><strong>b10-msgq</strong></span>
  489. command channel.
  490. </p><p>The administrator doesn't connect to it directly, but
  491. uses a user interface to communicate with the configuration
  492. manager via <span class="command"><strong>b10-cmdctl</strong></span>'s REST-ful interface.
  493. <span class="command"><strong>b10-cmdctl</strong></span> is covered in <a class="xref" href="#cmdctl" title="Chapter 6. Remote control daemon">Chapter 6, <i>Remote control daemon</i></a>.
  494. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  495. The development prototype release only provides
  496. <span class="command"><strong>bindctl</strong></span> as a user interface to
  497. <span class="command"><strong>b10-cmdctl</strong></span>.
  498. Upcoming releases will provide another interactive command-line
  499. interface and a web-based interface.
  500. </p></div><p>
  501. The <span class="command"><strong>b10-cfgmgr</strong></span> daemon can send all
  502. specifications and all current settings to the
  503. <span class="command"><strong>bindctl</strong></span> client (via
  504. <span class="command"><strong>b10-cmdctl</strong></span>).
  505. </p><p>
  506. <span class="command"><strong>b10-cfgmgr</strong></span> relays configurations received
  507. from <span class="command"><strong>b10-cmdctl</strong></span> to the appropriate modules.
  508. </p><p>
  509. The stored configuration file is at
  510. <code class="filename">/usr/local/var/bind10-devel/b10-config.db</code>.
  511. (The full path is what was defined at build configure time for
  512. <code class="option">--localstatedir</code>.
  513. The default is <code class="filename">/usr/local/var/</code>.)
  514. The format is loosely based on JSON and is directly parseable
  515. python, but this may change in a future version.
  516. This configuration data file is not manually edited by the
  517. administrator.
  518. </p><p>
  519. The configuration manager does not have any command line arguments.
  520. Normally it is not started manually, but is automatically
  521. started using the <span class="command"><strong>bind10</strong></span> master process
  522. (as covered in <a class="xref" href="#bind10" title="Chapter 3. Starting BIND10 with bind10">Chapter 3, <i>Starting BIND10 with <span class="command"><strong>bind10</strong></span></i></a>).
  523. </p></div><div class="chapter" title="Chapter 6. Remote control daemon"><div class="titlepage"><div><div><h2 class="title"><a name="cmdctl"></a>Chapter 6. Remote control daemon</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#cmdctl.spec">6.1. Configuration specification for b10-cmdctl</a></span></dt></dl></div><p>
  524. <span class="command"><strong>b10-cmdctl</strong></span> is the gateway between
  525. administrators and the BIND 10 system.
  526. It is a HTTPS server that uses standard HTTP Digest
  527. Authentication for username and password validation.
  528. It provides a REST-ful interface for accessing and controlling
  529. BIND 10.
  530. </p><p>
  531. When <span class="command"><strong>b10-cmdctl</strong></span> starts, it firsts
  532. asks <span class="command"><strong>b10-cfgmgr</strong></span> about what modules are
  533. running and what their configuration is (over the
  534. <span class="command"><strong>b10-msgq</strong></span> channel). Then it will start listening
  535. on HTTPS for clients &#8212; the user interface &#8212; such
  536. as <span class="command"><strong>bindctl</strong></span>.
  537. </p><p>
  538. <span class="command"><strong>b10-cmdctl</strong></span> directly sends commands
  539. (received from the user interface) to the specified component.
  540. Configuration changes are actually commands to
  541. <span class="command"><strong>b10-cfgmgr</strong></span> so are sent there.
  542. </p><p>The HTTPS server requires a private key,
  543. such as a RSA PRIVATE KEY.
  544. The default location is at
  545. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-keyfile.pem</code>.
  546. (A sample key is at
  547. <code class="filename">/usr/local/share/bind10-devel/cmdctl-keyfile.pem</code>.)
  548. It also uses a certificate located at
  549. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-certfile.pem</code>.
  550. (A sample certificate is at
  551. <code class="filename">/usr/local/share/bind10-devel/cmdctl-certfile.pem</code>.)
  552. This may be a self-signed certificate or purchased from a
  553. certification authority.
  554. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  555. The HTTPS server doesn't support a certificate request from a
  556. client (at this time).
  557. The <span class="command"><strong>b10-cmdctl</strong></span> daemon does not provide a
  558. public service. If any client wants to control BIND 10, then
  559. a certificate needs to be first received from the BIND 10
  560. administrator.
  561. The BIND 10 installation provides a sample PEM bundle that matches
  562. the sample key and certificate.
  563. </p></div><p>
  564. The <span class="command"><strong>b10-cmdctl</strong></span> daemon also requires
  565. the user account file located at
  566. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-accounts.csv</code>.
  567. This comma-delimited file lists the accounts with a user name,
  568. hashed password, and salt.
  569. (A sample file is at
  570. <code class="filename">/usr/local/share/bind10-devel/cmdctl-accounts.csv</code>.
  571. It contains the user named <span class="quote">&#8220;<span class="quote">root</span>&#8221;</span> with the password
  572. <span class="quote">&#8220;<span class="quote">bind10</span>&#8221;</span>.)
  573. </p><p>
  574. The administrator may create a user account with the
  575. <span class="command"><strong>b10-cmdctl-usermgr</strong></span> tool.
  576. </p><p>
  577. By default the HTTPS server listens on the localhost port 8080.
  578. The port can be set by using the <code class="option">--port</code> command line option.
  579. The address to listen on can be set using the <code class="option">--address</code> command
  580. line argument.
  581. Each HTTPS connection is stateless and times out in 1200 seconds
  582. by default. This can be
  583. redefined by using the <code class="option">--idle-timeout</code> command line argument.
  584. </p><div class="section" title="6.1. Configuration specification for b10-cmdctl"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cmdctl.spec"></a>6.1. Configuration specification for b10-cmdctl</h2></div></div></div><p>
  585. The configuration items for <span class="command"><strong>b10-cmdctl</strong></span> are:
  586. key_file
  587. cert_file
  588. accounts_file
  589. </p><p>
  590. The control commands are:
  591. print_settings
  592. shutdown
  593. </p></div></div><div class="chapter" title="Chapter 7. Control and configure user interface"><div class="titlepage"><div><div><h2 class="title"><a name="bindctl"></a>Chapter 7. Control and configure user interface</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  594. For this development prototype release, <span class="command"><strong>bindctl</strong></span>
  595. is the only user interface. It is expected that upcoming
  596. releases will provide another interactive command-line
  597. interface and a web-based interface for controlling and
  598. configuring BIND 10.
  599. </p></div><p>
  600. The <span class="command"><strong>bindctl</strong></span> tool provides an interactive
  601. prompt for configuring, controlling, and querying the BIND 10
  602. components.
  603. It communicates directly with a REST-ful interface over HTTPS
  604. provided by <span class="command"><strong>b10-cmdctl</strong></span>. It doesn't
  605. communicate to any other components directly.
  606. </p><p>
  607. Configuration changes are actually commands to
  608. <span class="command"><strong>b10-cfgmgr</strong></span>. So when <span class="command"><strong>bindctl</strong></span>
  609. sends a configuration, it is sent to <span class="command"><strong>b10-cmdctl</strong></span>
  610. (over a HTTPS connection); then <span class="command"><strong>b10-cmdctl</strong></span>
  611. sends the command (over a <span class="command"><strong>b10-msgq</strong></span> command
  612. channel) to <span class="command"><strong>b10-cfgmgr</strong></span> which then stores
  613. the details and relays (over a <span class="command"><strong>b10-msgq</strong></span> command
  614. channel) the configuration on to the specified module.
  615. </p><p>
  616. </p></div><div class="chapter" title="Chapter 8. Authoritative Server"><div class="titlepage"><div><div><h2 class="title"><a name="authserver"></a>Chapter 8. Authoritative Server</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#idp280304">8.1. Server Configurations</a></span></dt><dt><span class="section"><a href="#idp323936">8.2. Data Source Backends</a></span></dt><dd><dl><dt><span class="section"><a href="#in-memory-datasource">8.2.1. In-memory Data Source</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-with-sqlite3-backend">8.2.2. In-memory Data Source With SQLite3 Backend</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-loading">8.2.3. Reloading an In-memory Data Source</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-disabling">8.2.4. Disabling In-memory Data Sources</a></span></dt></dl></dd><dt><span class="section"><a href="#idp357152">8.3. Loading Master Zones Files</a></span></dt></dl></div><p>
  617. The <span class="command"><strong>b10-auth</strong></span> is the authoritative DNS server.
  618. It supports EDNS0 and DNSSEC. It supports IPv6.
  619. Normally it is started by the <span class="command"><strong>bind10</strong></span> master
  620. process.
  621. </p><div class="section" title="8.1. Server Configurations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp280304"></a>8.1. Server Configurations</h2></div></div></div><p>
  622. <span class="command"><strong>b10-auth</strong></span> is configured via the
  623. <span class="command"><strong>b10-cfgmgr</strong></span> configuration manager.
  624. The module name is <span class="quote">&#8220;<span class="quote">Auth</span>&#8221;</span>.
  625. The configuration data items are:
  626. </p><div class="variablelist"><dl><dt><span class="term">database_file</span></dt><dd>This is an optional string to define the path to find
  627. the SQLite3 database file.
  628. Note: Later the DNS server will use various data source backends.
  629. This may be a temporary setting until then.
  630. </dd><dt><span class="term">datasources</span></dt><dd>
  631. <code class="varname">datasources</code> configures data sources.
  632. The list items include:
  633. <code class="varname">type</code> to define the required data source type
  634. (such as <span class="quote">&#8220;<span class="quote">memory</span>&#8221;</span>);
  635. <code class="varname">class</code> to optionally select the class
  636. (it defaults to <span class="quote">&#8220;<span class="quote">IN</span>&#8221;</span>);
  637. and
  638. <code class="varname">zones</code> to define
  639. the <code class="varname">file</code> path name,
  640. the <code class="varname">filetype</code> (e.g., <code class="varname">sqlite3</code>),
  641. and the <code class="varname">origin</code> (default domain).
  642. By default, this is empty.
  643. <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  644. In this development version, currently this is only used for the
  645. memory data source.
  646. Only the IN class is supported at this time.
  647. By default, the memory data source is disabled.
  648. Also, currently the zone file must be canonical such as
  649. generated by <span class="command"><strong>named-compilezone -D</strong></span>, or
  650. must be an SQLite3 database.
  651. </p></div>
  652. </dd><dt><span class="term">listen_on</span></dt><dd>
  653. <code class="varname">listen_on</code> is a list of addresses and ports for
  654. <span class="command"><strong>b10-auth</strong></span> to listen on.
  655. The list items are the <code class="varname">address</code> string
  656. and <code class="varname">port</code> number.
  657. By default, <span class="command"><strong>b10-auth</strong></span> listens on port 53
  658. on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses.
  659. <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  660. The default configuration is currently not appropriate for a multi-homed host.
  661. In case you have multiple public IP addresses, it is possible the
  662. query UDP packet comes through one interface and the answer goes out
  663. through another. The answer will probably be dropped by the client, as it
  664. has a different source address than the one it sent the query to. The
  665. client would fallback on TCP after several attempts, which works
  666. well in this situation, but is clearly not ideal.
  667. </p><p>
  668. There are plans to solve the problem such that the server handles
  669. it by itself. But until it is actually implemented, it is recommended to
  670. alter the configuration &#8212; remove the wildcard addresses and list all
  671. addresses explicitly. Then the server will answer on the same
  672. interface the request came on, preserving the correct address.
  673. </p></div>
  674. </dd><dt><span class="term">statistics-interval</span></dt><dd>
  675. <code class="varname">statistics-interval</code> is the timer interval
  676. in seconds for <span class="command"><strong>b10-auth</strong></span> to share its
  677. statistics information to
  678. <span class="citerefentry"><span class="refentrytitle">b10-stats</span>(8)</span>.
  679. Statistics updates can be disabled by setting this to 0.
  680. The default is 60.
  681. </dd></dl></div><p>
  682. </p><p>
  683. The configuration commands are:
  684. </p><div class="variablelist"><dl><dt><span class="term">loadzone</span></dt><dd>
  685. <span class="command"><strong>loadzone</strong></span> tells <span class="command"><strong>b10-auth</strong></span>
  686. to load or reload a zone file. The arguments include:
  687. <code class="varname">class</code> which optionally defines the class
  688. (it defaults to <span class="quote">&#8220;<span class="quote">IN</span>&#8221;</span>);
  689. <code class="varname">origin</code> is the domain name of the zone;
  690. and
  691. <code class="varname">datasrc</code> optionally defines the type of datasource
  692. (it defaults to <span class="quote">&#8220;<span class="quote">memory</span>&#8221;</span>).
  693. <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  694. In this development version, currently this only supports the
  695. IN class and the memory data source.
  696. </p></div>
  697. </dd><dt><span class="term">sendstats</span></dt><dd>
  698. <span class="command"><strong>sendstats</strong></span> tells <span class="command"><strong>b10-auth</strong></span>
  699. to send its statistics data to
  700. <span class="citerefentry"><span class="refentrytitle">b10-stats</span>(8)</span>
  701. immediately.
  702. </dd><dt><span class="term">shutdown</span></dt><dd>Stop the authoritative DNS server.
  703. This has an optional <code class="varname">pid</code> argument to
  704. select the process ID to stop.
  705. (Note that the BIND 10 boss process may restart this service
  706. if configured.)
  707. </dd></dl></div><p>
  708. </p></div><div class="section" title="8.2. Data Source Backends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp323936"></a>8.2. Data Source Backends</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  709. For the development prototype release, <span class="command"><strong>b10-auth</strong></span>
  710. supports a SQLite3 data source backend and in-memory data source
  711. backend.
  712. Upcoming versions will be able to use multiple different
  713. data sources, such as MySQL and Berkeley DB.
  714. </p></div><p>
  715. By default, the SQLite3 backend uses the data file located at
  716. <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>.
  717. (The full path is what was defined at build configure time for
  718. <code class="option">--localstatedir</code>.
  719. The default is <code class="filename">/usr/local/var/</code>.)
  720. This data file location may be changed by defining the
  721. <span class="quote">&#8220;<span class="quote">database_file</span>&#8221;</span> configuration.
  722. </p><div class="section" title="8.2.1. In-memory Data Source"><div class="titlepage"><div><div><h3 class="title"><a name="in-memory-datasource"></a>8.2.1. In-memory Data Source</h3></div></div></div><p>
  723. The following commands to <span class="command"><strong>bindctl</strong></span>
  724. provide an example of configuring an in-memory data
  725. source containing the <span class="quote">&#8220;<span class="quote">example.com</span>&#8221;</span> zone
  726. with the zone file named <span class="quote">&#8220;<span class="quote">example.com.zone</span>&#8221;</span>:
  727. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Auth/datasources</code></strong>
  728. &gt; <strong class="userinput"><code>config set Auth/datasources[0]/type "<code class="option">memory</code>"</code></strong>
  729. &gt; <strong class="userinput"><code>config add Auth/datasources[0]/zones</code></strong>
  730. &gt; <strong class="userinput"><code>config set Auth/datasources[0]/zones[0]/origin "<code class="option">example.com</code>"</code></strong>
  731. &gt; <strong class="userinput"><code>config set Auth/datasources[0]/zones[0]/file "<code class="option">example.com.zone</code>"</code></strong>
  732. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  733. The authoritative server will begin serving it immediately
  734. after it is loaded.
  735. </p></div><div class="section" title="8.2.2. In-memory Data Source With SQLite3 Backend"><div class="titlepage"><div><div><h3 class="title"><a name="in-memory-datasource-with-sqlite3-backend"></a>8.2.2. In-memory Data Source With SQLite3 Backend</h3></div></div></div><p>
  736. The following commands to <span class="command"><strong>bindctl</strong></span>
  737. provide an example of configuring an in-memory data
  738. source containing the <span class="quote">&#8220;<span class="quote">example.org</span>&#8221;</span> zone
  739. with a SQLite3 backend file named <span class="quote">&#8220;<span class="quote">example.org.sqlite3</span>&#8221;</span>:
  740. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Auth/datasources</code></strong>
  741. &gt; <strong class="userinput"><code>config set Auth/datasources[1]/type "<code class="option">memory</code>"</code></strong>
  742. &gt; <strong class="userinput"><code>config add Auth/datasources[1]/zones</code></strong>
  743. &gt; <strong class="userinput"><code>config set Auth/datasources[1]/zones[0]/origin "<code class="option">example.org</code>"</code></strong>
  744. &gt; <strong class="userinput"><code>config set Auth/datasources[1]/zones[0]/file "<code class="option">example.org.sqlite3</code>"</code></strong>
  745. &gt; <strong class="userinput"><code>config set Auth/datasources[1]/zones[0]/filetype "<code class="option">sqlite3</code>"</code></strong>
  746. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  747. The authoritative server will begin serving it immediately
  748. after it is loaded.
  749. </p></div><div class="section" title="8.2.3. Reloading an In-memory Data Source"><div class="titlepage"><div><div><h3 class="title"><a name="in-memory-datasource-loading"></a>8.2.3. Reloading an In-memory Data Source</h3></div></div></div><p>
  750. Use the <span class="command"><strong>Auth loadzone</strong></span> command in
  751. <span class="command"><strong>bindctl</strong></span> to reload a changed master
  752. file into memory; for example:
  753. </p><pre class="screen">&gt; <strong class="userinput"><code>Auth loadzone origin="example.com"</code></strong>
  754. </pre><p>
  755. </p></div><div class="section" title="8.2.4. Disabling In-memory Data Sources"><div class="titlepage"><div><div><h3 class="title"><a name="in-memory-datasource-disabling"></a>8.2.4. Disabling In-memory Data Sources</h3></div></div></div><p>
  756. By default, the memory data source is disabled; it must be
  757. configured explicitly. To disable all the in-memory zones,
  758. specify a null list for <code class="varname">Auth/datasources</code>:
  759. </p><pre class="screen">&gt; <strong class="userinput"><code>config set Auth/datasources/ []</code></strong>
  760. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  761. </p><p>
  762. The following example stops serving a specific zone:
  763. </p><pre class="screen">&gt; <strong class="userinput"><code>config remove Auth/datasources[<code class="option">0</code>]/zones[<code class="option">0</code>]</code></strong>
  764. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  765. (Replace the list number(s) in
  766. <code class="varname">datasources[<em class="replaceable"><code>0</code></em>]</code>
  767. and/or <code class="varname">zones[<em class="replaceable"><code>0</code></em>]</code>
  768. for the relevant zone as needed.)
  769. </p></div></div><div class="section" title="8.3. Loading Master Zones Files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp357152"></a>8.3. Loading Master Zones Files</h2></div></div></div><p>
  770. RFC 1035 style DNS master zone files may imported
  771. into a BIND 10 SQLite3 data source by using the
  772. <span class="command"><strong>b10-loadzone</strong></span> utility.
  773. </p><p>
  774. <span class="command"><strong>b10-loadzone</strong></span> supports the following
  775. special directives (control entries):
  776. </p><div class="variablelist"><dl><dt><span class="term">$INCLUDE</span></dt><dd>Loads an additional zone file. This may be recursive.
  777. </dd><dt><span class="term">$ORIGIN</span></dt><dd>Defines the relative domain name.
  778. </dd><dt><span class="term">$TTL</span></dt><dd>Defines the time-to-live value used for following
  779. records that don't include a TTL.
  780. </dd></dl></div><p>
  781. </p><p>
  782. The <code class="option">-o</code> argument may be used to define the
  783. default origin for loaded zone file records.
  784. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  785. In the development prototype release, only the SQLite3 back
  786. end is used by <span class="command"><strong>b10-loadzone</strong></span>.
  787. By default, it stores the zone data in
  788. <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>
  789. unless the <code class="option">-d</code> switch is used to set the
  790. database filename.
  791. Multiple zones are stored in a single SQLite3 zone database.
  792. </p></div><p>
  793. If you reload a zone already existing in the database,
  794. all records from that prior zone disappear and a whole new set
  795. appears.
  796. </p></div></div><div class="chapter" title="Chapter 9. Incoming Zone Transfers"><div class="titlepage"><div><div><h2 class="title"><a name="xfrin"></a>Chapter 9. Incoming Zone Transfers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#idp375360">9.1. Configuration for Incoming Zone Transfers</a></span></dt><dt><span class="section"><a href="#idp380704">9.2. Enabling IXFR</a></span></dt><dt><span class="section"><a href="#zonemgr">9.3. Secondary Manager</a></span></dt><dt><span class="section"><a href="#idp397792">9.4. Trigger an Incoming Zone Transfer Manually</a></span></dt><dt><span class="section"><a href="#idp401488">9.5. Incoming Transfers with In-memory Datasource</a></span></dt></dl></div><p>
  797. Incoming zones are transferred using the <span class="command"><strong>b10-xfrin</strong></span>
  798. process which is started by <span class="command"><strong>bind10</strong></span>.
  799. When received, the zone is stored in the corresponding BIND 10
  800. data source, and its records can be served by
  801. <span class="command"><strong>b10-auth</strong></span>.
  802. In combination with <span class="command"><strong>b10-zonemgr</strong></span> (for
  803. automated SOA checks), this allows the BIND 10 server to
  804. provide <span class="quote">&#8220;<span class="quote">secondary</span>&#8221;</span> service.
  805. </p><p>
  806. The <span class="command"><strong>b10-xfrin</strong></span> process supports both AXFR and
  807. IXFR. Due to some implementation limitations of the current
  808. development release, however, it only tries AXFR by default,
  809. and care should be taken to enable IXFR.
  810. </p><div class="section" title="9.1. Configuration for Incoming Zone Transfers"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp375360"></a>9.1. Configuration for Incoming Zone Transfers</h2></div></div></div><p>
  811. In practice, you need to specify a list of secondary zones to
  812. enable incoming zone transfers for these zones (you can still
  813. trigger a zone transfer manually, without a prior configuration
  814. (see below)).
  815. </p><p>
  816. For example, to enable zone transfers for a zone named "example.com"
  817. (whose master address is assumed to be 2001:db8::53 here),
  818. run the following at the <span class="command"><strong>bindctl</strong></span> prompt:
  819. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Xfrin/zones</code></strong>
  820. &gt; <strong class="userinput"><code>config set Xfrin/zones[0]/name "<code class="option">example.com</code>"</code></strong>
  821. &gt; <strong class="userinput"><code>config set Xfrin/zones[0]/master_addr "<code class="option">2001:db8::53</code>"</code></strong>
  822. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  823. (We assume there has been no zone configuration before).
  824. </p></div><div class="section" title="9.2. Enabling IXFR"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp380704"></a>9.2. Enabling IXFR</h2></div></div></div><p>
  825. As noted above, <span class="command"><strong>b10-xfrin</strong></span> uses AXFR for
  826. zone transfers by default. To enable IXFR for zone transfers
  827. for a particular zone, set the <strong class="userinput"><code>use_ixfr</code></strong>
  828. configuration parameter to <strong class="userinput"><code>true</code></strong>.
  829. In the above example of configuration sequence, you'll need
  830. to add the following before performing <strong class="userinput"><code>commit</code></strong>:
  831. </p><pre class="screen">&gt; <strong class="userinput"><code>config set Xfrin/zones[0]/use_ixfr true</code></strong></pre><p>
  832. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  833. One reason why IXFR is disabled by default in the current
  834. release is because it does not support automatic fallback from IXFR to
  835. AXFR when it encounters a primary server that doesn't support
  836. outbound IXFR (and, not many existing implementations support
  837. it). Another, related reason is that it does not use AXFR even
  838. if it has no knowledge about the zone (like at the very first
  839. time the secondary server is set up). IXFR requires the
  840. "current version" of the zone, so obviously it doesn't work
  841. in this situation and AXFR is the only workable choice.
  842. The current release of <span class="command"><strong>b10-xfrin</strong></span> does not
  843. make this selection automatically.
  844. These features will be implemented in a near future
  845. version, at which point we will enable IXFR by default.
  846. </p></div></div><div class="section" title="9.3. Secondary Manager"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="zonemgr"></a>9.3. Secondary Manager</h2></div></div></div><p>
  847. The <span class="command"><strong>b10-zonemgr</strong></span> process is started by
  848. <span class="command"><strong>bind10</strong></span>.
  849. It keeps track of SOA refresh, retry, and expire timers
  850. and other details for BIND 10 to perform as a slave.
  851. When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
  852. receives a NOTIFY message, <span class="command"><strong>b10-zonemgr</strong></span>
  853. may tell <span class="command"><strong>b10-xfrin</strong></span> to do a refresh
  854. to start an inbound zone transfer.
  855. The secondary manager resets its counters when a new zone is
  856. transferred in.
  857. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  858. Access control (such as allowing notifies) is not yet provided.
  859. The primary/secondary service is not yet complete.
  860. </p></div><p>
  861. The following example shows using <span class="command"><strong>bindctl</strong></span>
  862. to configure the server to be a secondary for the example zone:
  863. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Zonemgr/secondary_zones</code></strong>
  864. &gt; <strong class="userinput"><code>config set Zonemgr/secondary_zones[0]/name "<code class="option">example.com</code>"</code></strong>
  865. &gt; <strong class="userinput"><code>config set Zonemgr/secondary_zones[0]/class "<code class="option">IN</code>"</code></strong>
  866. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  867. </p><p>
  868. If the zone does not exist in the data source already
  869. (i.e. no SOA record for it), <span class="command"><strong>b10-zonemgr</strong></span>
  870. will automatically tell <span class="command"><strong>b10-xfrin</strong></span>
  871. to transfer the zone in.
  872. </p></div><div class="section" title="9.4. Trigger an Incoming Zone Transfer Manually"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp397792"></a>9.4. Trigger an Incoming Zone Transfer Manually</h2></div></div></div><p>
  873. To manually trigger a zone transfer to retrieve a remote zone,
  874. you may use the <span class="command"><strong>bindctl</strong></span> utility.
  875. For example, at the <span class="command"><strong>bindctl</strong></span> prompt run:
  876. </p><pre class="screen">&gt; <strong class="userinput"><code>Xfrin retransfer zone_name="<code class="option">foo.example.org</code>" master=<code class="option">192.0.2.99</code></code></strong></pre><p>
  877. </p></div><div class="section" title="9.5. Incoming Transfers with In-memory Datasource"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp401488"></a>9.5. Incoming Transfers with In-memory Datasource</h2></div></div></div><p>
  878. In the case of an incoming zone transfer, the received zone is
  879. first stored in the corresponding BIND 10 datasource. In
  880. case the secondary zone is served by an in-memory datasource
  881. with an SQLite3 backend, <span class="command"><strong>b10-auth</strong></span> is
  882. automatically sent a <code class="varname">loadzone</code> command to
  883. reload the corresponding zone into memory from the backend.
  884. </p><p>
  885. The administrator doesn't have to do anything for
  886. <span class="command"><strong>b10-auth</strong></span> to serve the new version of the
  887. zone, except for the configuration such as the one described in
  888. <a class="xref" href="#in-memory-datasource-with-sqlite3-backend" title="8.2.2. In-memory Data Source With SQLite3 Backend">Section 8.2.2, &#8220;In-memory Data Source With SQLite3 Backend&#8221;</a>.
  889. </p></div></div><div class="chapter" title="Chapter 10. Outbound Zone Transfers"><div class="titlepage"><div><div><h2 class="title"><a name="xfrout"></a>Chapter 10. Outbound Zone Transfers</h2></div></div></div><p>
  890. The <span class="command"><strong>b10-xfrout</strong></span> process is started by
  891. <span class="command"><strong>bind10</strong></span>.
  892. When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
  893. receives an AXFR or IXFR request, <span class="command"><strong>b10-auth</strong></span>
  894. internally forwards the request to <span class="command"><strong>b10-xfrout</strong></span>,
  895. which handles the rest of request processing.
  896. This is used to provide primary DNS service to share zones
  897. to secondary name servers.
  898. The <span class="command"><strong>b10-xfrout</strong></span> is also used to send
  899. NOTIFY messages to secondary servers.
  900. </p><p>
  901. A global or per zone <code class="option">transfer_acl</code> configuration
  902. can be used to control accessibility of the outbound zone
  903. transfer service.
  904. By default, <span class="command"><strong>b10-xfrout</strong></span> allows any clients to
  905. perform zone transfers for any zones:
  906. </p><pre class="screen">&gt; <strong class="userinput"><code>config show Xfrout/transfer_acl</code></strong>
  907. Xfrout/transfer_acl[0] {"action": "ACCEPT"} any (default)</pre><p>
  908. You can change this to, for example, rejecting all transfer
  909. requests by default while allowing requests for the transfer
  910. of zone "example.com" from 192.0.2.1 and 2001:db8::1 as follows:
  911. </p><pre class="screen">&gt; <strong class="userinput"><code>config set Xfrout/transfer_acl[0] {"action": "REJECT"}</code></strong>
  912. &gt; <strong class="userinput"><code>config add Xfrout/zone_config</code></strong>
  913. &gt; <strong class="userinput"><code>config set Xfrout/zone_config[0]/origin "example.com"</code></strong>
  914. &gt; <strong class="userinput"><code>config set Xfrout/zone_config[0]/transfer_acl [{"action": "ACCEPT", "from": "192.0.2.1"},</code></strong>
  915. <strong class="userinput"><code> {"action": "ACCEPT", "from": "2001:db8::1"}]</code></strong>
  916. &gt; <strong class="userinput"><code>config commit</code></strong></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  917. In the above example the lines
  918. for <code class="option">transfer_acl</code> were divided for
  919. readability. In the actual input it must be in a single line.
  920. </p></div><p>
  921. If you want to require TSIG in access control, a system wide TSIG
  922. "key ring" must be configured.
  923. For example, to change the previous example to allowing requests
  924. from 192.0.2.1 signed by a TSIG with a key name of
  925. "key.example", you'll need to do this:
  926. </p><pre class="screen">&gt; <strong class="userinput"><code>config set tsig_keys/keys ["key.example:&lt;base64-key&gt;"]</code></strong>
  927. &gt; <strong class="userinput"><code>config set Xfrout/zone_config[0]/transfer_acl [{"action": "ACCEPT", "from": "192.0.2.1", "key": "key.example"}]</code></strong>
  928. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>Both Xfrout and Auth will use the system wide keyring to check
  929. TSIGs in the incoming messages and to sign responses.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  930. The way to specify zone specific configuration (ACLs, etc) is
  931. likely to be changed.
  932. </p></div></div><div class="chapter" title="Chapter 11. Dynamic DNS Update"><div class="titlepage"><div><div><h2 class="title"><a name="ddns"></a>Chapter 11. Dynamic DNS Update</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#idp433840">11.1. Enabling Dynamic Update</a></span></dt><dt><span class="section"><a href="#idp448128">11.2. Access Control</a></span></dt><dt><span class="section"><a href="#idp471872">11.3. Miscellaneous Operational Issues</a></span></dt></dl></div><p>
  933. BIND 10 supports the server side of the Dynamic DNS Update
  934. (DDNS) protocol as defined in RFC 2136.
  935. This service is provided by the <span class="command"><strong>b10-ddns</strong></span>
  936. component, which is started by the <span class="command"><strong>bind10</strong></span>
  937. process if configured so.
  938. </p><p>
  939. When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
  940. receives an UPDATE request, it internally forwards the request
  941. to <span class="command"><strong>b10-ddns</strong></span>, which handles the rest of
  942. request processing.
  943. When the processing is completed <span class="command"><strong>b10-ddns</strong></span>
  944. will send a response to the client with the RCODE set to the
  945. value as specified in RFC 2136 (NOERROR for successful update,
  946. REFUSED if rejected due to ACL check, etc).
  947. If the zone has been changed as a result, it will internally
  948. notify <span class="command"><strong>b10-xfrout</strong></span> so that other secondary
  949. servers will be notified via the DNS notify protocol.
  950. In addition, if <span class="command"><strong>b10-auth</strong></span> serves the updated
  951. zone from its in-memory cache (as described in
  952. <a class="xref" href="#in-memory-datasource-with-sqlite3-backend" title="8.2.2. In-memory Data Source With SQLite3 Backend">Section 8.2.2, &#8220;In-memory Data Source With SQLite3 Backend&#8221;</a>),
  953. <span class="command"><strong>b10-ddns</strong></span> will also
  954. notify <span class="command"><strong>b10-auth</strong></span> so that <span class="command"><strong>b10-auth</strong></span>
  955. will re-cache the updated zone content.
  956. </p><p>
  957. The <span class="command"><strong>b10-ddns</strong></span> component supports requests over
  958. both UDP and TCP, and both IPv6 and IPv4; for TCP requests,
  959. however, it terminates the TCP connection immediately after
  960. each single request has been processed. Clients cannot reuse the
  961. same TCP connection for multiple requests. (This is a current
  962. implementation limitation of <span class="command"><strong>b10-ddns</strong></span>.
  963. While RFC 2136 doesn't specify anything about such reuse of TCP
  964. connection, there is no reason for disallowing it as RFC 1035
  965. generally allows multiple requests sent over a single TCP
  966. connection. BIND 9 supports such reuse.)
  967. </p><p>
  968. As of this writing <span class="command"><strong>b10-ddns</strong></span> does not support
  969. update forwarding for secondary zones.
  970. If it receives an update request for a secondary zone, it will
  971. immediately return a response with an RCODE of NOTIMP.
  972. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  973. For feature completeness update forwarding should be
  974. eventually supported. But right now it's considered a lower
  975. priority task and there is no specific plan of implementing
  976. this feature.
  977. </p></div><p>
  978. </p><div class="section" title="11.1. Enabling Dynamic Update"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp433840"></a>11.1. Enabling Dynamic Update</h2></div></div></div><p>
  979. First off, it must be made sure that a few components on which
  980. <span class="command"><strong>b10-ddns</strong></span> depends are configured to run,
  981. which are <span class="command"><strong>b10-auth</strong></span>
  982. and <span class="command"><strong>b10-zonemgr</strong></span>.
  983. In addition, <span class="command"><strong>b10-xfrout</strong></span> should also be
  984. configured to run; otherwise the notification after an update
  985. (see above) will fail with a timeout, suspending the DDNS
  986. service while <span class="command"><strong>b10-ddns</strong></span> waits for the
  987. response (see the description of the <a class="ulink" href="bind10-messages.html#DDNS_UPDATE_NOTIFY_FAIL" target="_top">DDNS_UPDATE_NOTIFY_FAIL</a>
  988. log message for further details).
  989. If BIND 10 is already configured to provide authoritative DNS
  990. service they should normally be configured to run already.
  991. </p><p>
  992. Second, for the obvious reason dynamic update requires that the
  993. underlying data source storing the zone data be writable.
  994. In the current implementation this means the zone must be stored
  995. in an SQLite3-based data source.
  996. Also, right now, the <span class="command"><strong>b10-ddns</strong></span> component
  997. configures itself with the data source referring to the
  998. <span class="quote">&#8220;<span class="quote">database_file</span>&#8221;</span> configuration parameter of
  999. <span class="command"><strong>b10-auth</strong></span>.
  1000. So this information must be configured correctly before starting
  1001. <span class="command"><strong>b10-ddns</strong></span>.
  1002. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1003. The way to configure data sources is now being revised.
  1004. Configuration on the data source for DDNS will be very
  1005. likely to be changed in a backward incompatible manner in
  1006. a near future version.
  1007. </p></div><p>
  1008. </p><p>
  1009. In general, if something goes wrong regarding the dependency
  1010. described above, <span class="command"><strong>b10-ddns</strong></span> will log the
  1011. related event at the warning or error level.
  1012. It's advisable to check the log message when you first enable
  1013. DDNS or if it doesn't work as you expect to see if there's any
  1014. warning or error log message.
  1015. </p><p>
  1016. Next, to enable the DDNS service, <span class="command"><strong>b10-ddns</strong></span>
  1017. needs to be explicitly configured to run.
  1018. It can be done by using the <span class="command"><strong>bindctl</strong></span>
  1019. utility. For example:
  1020. </p><pre class="screen">
  1021. &gt; <strong class="userinput"><code>config add Boss/components b10-ddns</code></strong>
  1022. &gt; <strong class="userinput"><code>config set Boss/components/b10-ddns/address DDNS</code></strong>
  1023. &gt; <strong class="userinput"><code>config set Boss/components/b10-ddns/kind dispensable</code></strong>
  1024. &gt; <strong class="userinput"><code>config commit</code></strong>
  1025. </pre><p>
  1026. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1027. In theory "kind" could be omitted because "dispensable" is its
  1028. default. But there's some peculiar behavior (which should
  1029. be a bug and should be fixed eventually; see Trac ticket
  1030. #2064) with bindctl and you'll still need to specify that explicitly.
  1031. Likewise, "address" may look unnecessary because
  1032. <span class="command"><strong>b10-ddns</strong></span> would start and work without
  1033. specifying it. But for it to shutdown gracefully this
  1034. parameter should also be specified.
  1035. </p></div><p>
  1036. </p></div><div class="section" title="11.2. Access Control"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp448128"></a>11.2. Access Control</h2></div></div></div><p>
  1037. By default <span class="command"><strong>b10-ddns</strong></span> rejects any update
  1038. requests from any clients by returning a response with an RCODE
  1039. of REFUSED.
  1040. To allow updates to take effect, an access control rule
  1041. (called update ACL) with a policy allowing updates must explicitly be
  1042. configured.
  1043. Update ACL must be configured per zone basis in the
  1044. <span class="quote">&#8220;<span class="quote">zones</span>&#8221;</span> configuration parameter of
  1045. <span class="command"><strong>b10-ddns</strong></span>.
  1046. This is a list of per-zone configurations regarding DDNS.
  1047. Each list element consists of the following parameters:
  1048. </p><div class="variablelist"><dl><dt><span class="term">origin</span></dt><dd>The zone's origin name</dd><dt><span class="term">class</span></dt><dd>The RR class of the zone
  1049. (normally <span class="quote">&#8220;<span class="quote">IN</span>&#8221;</span>, and in that case
  1050. can be omitted in configuration)</dd><dt><span class="term">update_acl</span></dt><dd>List of access control rules (ACL) for the zone</dd></dl></div><p>
  1051. The syntax of the ACL is the same as ACLs for other
  1052. components.
  1053. Specific examples are given below.
  1054. </p><p>
  1055. In general, an update ACL rule that allows an update request
  1056. should be configured with a TSIG key.
  1057. This is an example update ACL that allows updates to the zone
  1058. named <span class="quote">&#8220;<span class="quote">example.org</span>&#8221;</span> of RR class <span class="quote">&#8220;<span class="quote">IN</span>&#8221;</span>
  1059. from clients that send requests signed with a TSIG whose
  1060. key name is "key.example.org" (and refuses all others):
  1061. </p><pre class="screen">
  1062. &gt; <strong class="userinput"><code>config add DDNS/zones</code></strong>
  1063. &gt; <strong class="userinput"><code>config set DDNS/zones[0]/origin example.org</code></strong>
  1064. &gt; <strong class="userinput"><code>config set DDNS/zones[0]/class IN</code></strong>
  1065. (Note: "class" can be omitted)
  1066. &gt; <strong class="userinput"><code>config add DDNS/zones[0]/update_acl {"action": "ACCEPT", "key": "key.example.org"}</code></strong>
  1067. &gt; <strong class="userinput"><code>config commit</code></strong>
  1068. </pre><p>
  1069. The TSIG key must be configured system wide
  1070. (see <a class="xref" href="#xfrout" title="Chapter 10. Outbound Zone Transfers">Chapter 10, <i>Outbound Zone Transfers</i></a>.)
  1071. </p><p>
  1072. Multiple rules can be specified in the ACL, and an ACL rule
  1073. can consist of multiple constraints, such as a combination of
  1074. IP address and TSIG.
  1075. The following configuration sequence will add a new rule to
  1076. the ACL created in the above example. This additional rule
  1077. allows update requests sent from a client
  1078. using TSIG key name of "key.example" (different from the
  1079. key used in the previous example) and has an IPv6 address of ::1.
  1080. </p><pre class="screen">
  1081. &gt; <strong class="userinput"><code>config add DDNS/zones[0]/update_acl {"action": "ACCEPT", "from": "::1", "key": "key.example"}</code></strong>
  1082. &gt; <strong class="userinput"><code>config show DDNS/zones[0]/update_acl</code></strong>
  1083. DDNS/zones[0]/update_acl[0] {"action": "ACCEPT", "key": "key.example.org"} any (modified)
  1084. DDNS/zones[0]/update_acl[1] {"action": "ACCEPT", "from": "::1", "key": "key.example"} any (modified)
  1085. &gt; <strong class="userinput"><code>config commit</code></strong>
  1086. </pre><p>
  1087. (Note the "add" in the first line. Before this sequence, we
  1088. have had only entry in zones[0]/update_acl. The "add" command
  1089. with a value (rule) adds a new entry and sets it to the given rule.
  1090. Due to a limitation of the current implementation, it doesn't
  1091. work if you first try to just add a new entry and then set it to
  1092. a given rule).
  1093. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1094. The <span class="command"><strong>b10-ddns</strong></span> component accepts an ACL
  1095. rule that just allows updates from a specific IP address
  1096. (i.e., without requiring TSIG), but this is highly
  1097. discouraged (remember that requests can be made over UDP and
  1098. spoofing the source address of a UDP packet is often pretty
  1099. easy).
  1100. Unless you know what you are doing and that you can accept
  1101. its consequence, any update ACL rule that allows updates
  1102. should have a TSIG key in its constraints.
  1103. </p></div><p>
  1104. The ACL rules will be checked in the listed order, and the
  1105. first matching one will apply.
  1106. If none of the rules matches, the default rule will apply,
  1107. which is rejecting any requests in the case of
  1108. <span class="command"><strong>b10-ddns</strong></span>.
  1109. </p><p>
  1110. Other actions than "ACCEPT", namely "REJECT" and "DROP", can be
  1111. used, too.
  1112. See <a class="xref" href="#resolverserver" title="Chapter 12. Recursive Name Server">Chapter 12, <i>Recursive Name Server</i></a> about their effects.
  1113. </p><p>
  1114. Currently update ACL can only control updates per zone basis;
  1115. it's not possible to specify access control with higher
  1116. granularity such as for particular domain names or specific
  1117. types of RRs.
  1118. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1119. Contrary to what RFC 2136 (literally) specifies,
  1120. <span class="command"><strong>b10-ddns</strong></span> checks the update ACL before
  1121. checking the prerequisites of the update request.
  1122. This is a deliberate implementation decision.
  1123. This counter intuitive specification has been repeatedly
  1124. discussed among implementers and in the IETF, and it is now
  1125. widely agreed that it does not make sense to strictly follow
  1126. that part of RFC.
  1127. One known specific bad result of following the RFC is that it
  1128. could leak information about which name or record exists or does not
  1129. exist in the zone as a result of prerequisite checks even if a
  1130. zone is somehow configured to reject normal queries from
  1131. arbitrary clients.
  1132. There have been other troubles that could have been avoided if
  1133. the ACL could be checked before the prerequisite check.
  1134. </p></div></div><div class="section" title="11.3. Miscellaneous Operational Issues"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp471872"></a>11.3. Miscellaneous Operational Issues</h2></div></div></div><p>
  1135. Unlike BIND 9, BIND 10 currently does not support automatic
  1136. resigning of DNSSEC-signed zone when it's updated via DDNS.
  1137. It could be possible to resign the updated zone afterwards
  1138. or make sure the update request also updates related DNSSEC
  1139. records, but that will be pretty error-prone operation.
  1140. In general, it's not advisable to allow DDNS for a signed zone
  1141. at this moment.
  1142. </p><p>
  1143. Also unlike BIND 9, it's currently not possible
  1144. to <span class="quote">&#8220;<span class="quote">freeze</span>&#8221;</span> a zone temporarily in order to
  1145. suspend DDNS while you manually update the zone.
  1146. If you need to make manual updates to a dynamic zone,
  1147. you'll need to temporarily reject any updates to the zone via
  1148. the update ACLs.
  1149. </p><p>
  1150. Dynamic updates are only applicable to primary zones.
  1151. In order to avoid updating secondary zones via DDNS requests,
  1152. <span class="command"><strong>b10-ddns</strong></span> refers to the
  1153. <span class="quote">&#8220;<span class="quote">secondary_zones</span>&#8221;</span> configuration of
  1154. <span class="command"><strong>b10-zonemgr</strong></span>. Zones listed in
  1155. <span class="quote">&#8220;<span class="quote">secondary_zones</span>&#8221;</span> will never be updated via DDNS
  1156. regardless of the update ACL configuration;
  1157. <span class="command"><strong>b10-ddns</strong></span> will return a response with an
  1158. RCODE of NOTAUTH as specified in RFC 2136.
  1159. If you have a "conceptual" secondary zone whose content is a
  1160. copy of some external source but is not updated via the
  1161. standard zone transfers and therefore not listed in
  1162. <span class="quote">&#8220;<span class="quote">secondary_zones</span>&#8221;</span>, be careful not to allow DDNS
  1163. for the zone; it would be quite likely to lead to inconsistent
  1164. state between different servers.
  1165. Normally this should not be a problem because the default
  1166. update ACL rejects any update requests, but you may want to
  1167. take an extra care about the configuration if you have such
  1168. type of secondary zones.
  1169. </p><p>
  1170. The difference of two versions of a zone, before and after a
  1171. DDNS transaction, is automatically recorded in the underlying
  1172. data source, and can be retrieved in the form of outbound
  1173. IXFR.
  1174. This is done automatically; it does not require specific
  1175. configuration to make this possible.
  1176. </p></div></div><div class="chapter" title="Chapter 12. Recursive Name Server"><div class="titlepage"><div><div><h2 class="title"><a name="resolverserver"></a>Chapter 12. Recursive Name Server</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#idp492912">12.1. Access Control</a></span></dt><dt><span class="section"><a href="#idp509632">12.2. Forwarding</a></span></dt></dl></div><p>
  1177. The <span class="command"><strong>b10-resolver</strong></span> process is started by
  1178. <span class="command"><strong>bind10</strong></span>.
  1179. </p><p>
  1180. The main <span class="command"><strong>bind10</strong></span> process can be configured
  1181. to select to run either the authoritative or resolver or both.
  1182. By default, it doesn't start either one. You may change this using
  1183. <span class="command"><strong>bindctl</strong></span>, for example:
  1184. </p><pre class="screen">
  1185. &gt; <strong class="userinput"><code>config add Boss/components b10-resolver</code></strong>
  1186. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/special resolver</code></strong>
  1187. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/kind needed</code></strong>
  1188. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/priority 10</code></strong>
  1189. &gt; <strong class="userinput"><code>config commit</code></strong>
  1190. </pre><p>
  1191. </p><p>
  1192. The master <span class="command"><strong>bind10</strong></span> will stop and start
  1193. the desired services.
  1194. </p><p>
  1195. By default, the resolver listens on port 53 for 127.0.0.1 and ::1.
  1196. The following example shows how it can be configured to
  1197. listen on an additional address (and port):
  1198. </p><pre class="screen">
  1199. &gt; <strong class="userinput"><code>config add Resolver/listen_on</code></strong>
  1200. &gt; <strong class="userinput"><code>config set Resolver/listen_on[<em class="replaceable"><code>2</code></em>]/address "192.168.1.1"</code></strong>
  1201. &gt; <strong class="userinput"><code>config set Resolver/listen_on[<em class="replaceable"><code>2</code></em>]/port 53</code></strong>
  1202. &gt; <strong class="userinput"><code>config commit</code></strong>
  1203. </pre><p>
  1204. </p><p>(Replace the <span class="quote">&#8220;<span class="quote"><em class="replaceable"><code>2</code></em></span>&#8221;</span>
  1205. as needed; run <span class="quote">&#8220;<span class="quote"><strong class="userinput"><code>config show
  1206. Resolver/listen_on</code></strong></span>&#8221;</span> if needed.)</p><div class="section" title="12.1. Access Control"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp492912"></a>12.1. Access Control</h2></div></div></div><p>
  1207. By default, the <span class="command"><strong>b10-resolver</strong></span> daemon only accepts
  1208. DNS queries from the localhost (127.0.0.1 and ::1).
  1209. The <code class="option">Resolver/query_acl</code> configuration may
  1210. be used to reject, drop, or allow specific IPs or networks.
  1211. This configuration list is first match.
  1212. </p><p>
  1213. The configuration's <code class="option">action</code> item may be
  1214. set to <span class="quote">&#8220;<span class="quote">ACCEPT</span>&#8221;</span> to allow the incoming query,
  1215. <span class="quote">&#8220;<span class="quote">REJECT</span>&#8221;</span> to respond with a DNS REFUSED return
  1216. code, or <span class="quote">&#8220;<span class="quote">DROP</span>&#8221;</span> to ignore the query without
  1217. any response (such as a blackhole). For more information,
  1218. see the respective debugging messages: <a class="ulink" href="bind10-messages.html#RESOLVER_QUERY_ACCEPTED" target="_top">RESOLVER_QUERY_ACCEPTED</a>,
  1219. <a class="ulink" href="bind10-messages.html#RESOLVER_QUERY_REJECTED" target="_top">RESOLVER_QUERY_REJECTED</a>,
  1220. and <a class="ulink" href="bind10-messages.html#RESOLVER_QUERY_DROPPED" target="_top">RESOLVER_QUERY_DROPPED</a>.
  1221. </p><p>
  1222. The required configuration's <code class="option">from</code> item is set
  1223. to an IPv4 or IPv6 address, addresses with an network mask, or to
  1224. the special lowercase keywords <span class="quote">&#8220;<span class="quote">any6</span>&#8221;</span> (for
  1225. any IPv6 address) or <span class="quote">&#8220;<span class="quote">any4</span>&#8221;</span> (for any IPv4
  1226. address).
  1227. </p><p>
  1228. For example to allow the <em class="replaceable"><code>192.168.1.0/24</code></em>
  1229. network to use your recursive name server, at the
  1230. <span class="command"><strong>bindctl</strong></span> prompt run:
  1231. </p><pre class="screen">
  1232. &gt; <strong class="userinput"><code>config add Resolver/query_acl</code></strong>
  1233. &gt; <strong class="userinput"><code>config set Resolver/query_acl[<em class="replaceable"><code>2</code></em>]/action "ACCEPT"</code></strong>
  1234. &gt; <strong class="userinput"><code>config set Resolver/query_acl[<em class="replaceable"><code>2</code></em>]/from "<em class="replaceable"><code>192.168.1.0/24</code></em>"</code></strong>
  1235. &gt; <strong class="userinput"><code>config commit</code></strong>
  1236. </pre><p>(Replace the <span class="quote">&#8220;<span class="quote"><em class="replaceable"><code>2</code></em></span>&#8221;</span>
  1237. as needed; run <span class="quote">&#8220;<span class="quote"><strong class="userinput"><code>config show
  1238. Resolver/query_acl</code></strong></span>&#8221;</span> if needed.)</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This prototype access control configuration
  1239. syntax may be changed.</p></div></div><div class="section" title="12.2. Forwarding"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp509632"></a>12.2. Forwarding</h2></div></div></div><p>
  1240. To enable forwarding, the upstream address and port must be
  1241. configured to forward queries to, such as:
  1242. </p><pre class="screen">
  1243. &gt; <strong class="userinput"><code>config set Resolver/forward_addresses [{ "address": "<em class="replaceable"><code>192.168.1.1</code></em>", "port": 53 }]</code></strong>
  1244. &gt; <strong class="userinput"><code>config commit</code></strong>
  1245. </pre><p>
  1246. (Replace <em class="replaceable"><code>192.168.1.1</code></em> to point to your
  1247. full resolver.)
  1248. </p><p>
  1249. Normal iterative name service can be re-enabled by clearing the
  1250. forwarding address(es); for example:
  1251. </p><pre class="screen">
  1252. &gt; <strong class="userinput"><code>config set Resolver/forward_addresses []</code></strong>
  1253. &gt; <strong class="userinput"><code>config commit</code></strong>
  1254. </pre><p>
  1255. </p></div></div><div class="chapter" title="Chapter 13. DHCPv4 Server"><div class="titlepage"><div><div><h2 class="title"><a name="dhcp4"></a>Chapter 13. DHCPv4 Server</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#dhcp4-usage">13.1. DHCPv4 Server Usage</a></span></dt><dt><span class="section"><a href="#dhcp4-config">13.2. DHCPv4 Server Configuration</a></span></dt><dt><span class="section"><a href="#dhcp4-std">13.3. Supported standards</a></span></dt><dt><span class="section"><a href="#dhcp4-limit">13.4. DHCPv4 Server Limitations</a></span></dt></dl></div><p>Dynamic Host Configuration Protocol for IPv4 (DHCP or
  1256. DHCPv4) and Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
  1257. are protocols that allow one node (server) to provision
  1258. configuration parameters to many hosts and devices (clients). To
  1259. ease deployment in larger networks, additional nodes (relays) may
  1260. be deployed that facilitate communication between servers and
  1261. clients. Even though principles of both DHCPv4 and DHCPv6 are
  1262. somewhat similar, these are two radically different
  1263. protocols. BIND10 offers server implementations for both DHCPv4
  1264. and DHCPv6. This chapter is about DHCP for IPv4. For a description
  1265. of the DHCPv6 server, see <a class="xref" href="#dhcp6" title="Chapter 14. DHCPv6 Server">Chapter 14, <i>DHCPv6 Server</i></a>.</p><p>The DHCPv4 server component is currently under intense
  1266. development. You may want to check out <a class="ulink" href="http://bind10.isc.org/wiki/Kea" target="_top">BIND10 DHCP (Kea) wiki</a>
  1267. and recent posts on <a class="ulink" href="https://lists.isc.org/mailman/listinfo/bind10-dev" target="_top">BIND10
  1268. developers mailing list</a>.</p><p>The DHCPv4 and DHCPv6 components in BIND10 architecture are
  1269. internally code named <span class="quote">&#8220;<span class="quote">Kea</span>&#8221;</span>.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1270. As of December 2011, both DHCPv4 and DHCPv6 components are
  1271. skeleton servers. That means that while they are capable of
  1272. performing DHCP configuration, they are not fully functional
  1273. yet. In particular, neither has functional lease
  1274. databases. This means that they will assign the same, fixed,
  1275. hardcoded addresses to any client that will ask. See <a class="xref" href="#dhcp4-limit" title="13.4. DHCPv4 Server Limitations">Section 13.4, &#8220;DHCPv4 Server Limitations&#8221;</a> and <a class="xref" href="#dhcp6-limit" title="14.4. DHCPv6 Server Limitations">Section 14.4, &#8220;DHCPv6 Server Limitations&#8221;</a> for
  1276. detailed description.
  1277. </p></div><div class="section" title="13.1. DHCPv4 Server Usage"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp4-usage"></a>13.1. DHCPv4 Server Usage</h2></div></div></div><p>BIND10 provides the DHCPv4 server component since December
  1278. 2011. It is a skeleton server and can be described as an early
  1279. prototype that is not fully functional yet. It is mature enough
  1280. to conduct first tests in lab environment, but it has
  1281. significant limitations. See <a class="xref" href="#dhcp4-limit" title="13.4. DHCPv4 Server Limitations">Section 13.4, &#8220;DHCPv4 Server Limitations&#8221;</a> for
  1282. details.
  1283. </p><p>
  1284. <span class="command"><strong>b10-dhcp4</strong></span> is a BIND10 component and is being
  1285. run under BIND10 framework. To add a DHCPv4 process to the set of running
  1286. BIND10 services, you can use following commands in <span class="command"><strong>bindctl</strong></span>:
  1287. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Boss/components b10-dhcp4</code></strong>
  1288. &gt; <strong class="userinput"><code>config set Boss/components/b10-dhcp4/kind dispensable</code></strong>
  1289. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  1290. To shutdown running <span class="command"><strong>b10-dhcp4</strong></span>, please use the
  1291. following command:
  1292. </p><pre class="screen">&gt; <strong class="userinput"><code>Dhcp4 shutdown</code></strong></pre><p>
  1293. or
  1294. </p><pre class="screen">&gt; <strong class="userinput"><code>config remove Boss/components b10-dhcp4</code></strong>
  1295. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  1296. At start, the server will detect available network interfaces
  1297. and will attempt to open UDP sockets on all interfaces that
  1298. are up, running, are not loopback, and have IPv4 address
  1299. assigned.
  1300. The server will then listen to incoming traffic. Currently
  1301. supported client messages are DISCOVER and REQUEST. The server
  1302. will respond to them with OFFER and ACK, respectively.
  1303. Since the DHCPv4 server opens privileged ports, it requires root
  1304. access. Make sure you run this daemon as root.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1305. Integration with <span class="command"><strong>bind10</strong></span> is
  1306. planned. Ultimately, <span class="command"><strong>b10-dhcp4</strong></span> will not
  1307. be started directly, but rather via
  1308. <span class="command"><strong>bind10</strong></span>. Please be aware of this planned
  1309. change.
  1310. </p></div></div><div class="section" title="13.2. DHCPv4 Server Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp4-config"></a>13.2. DHCPv4 Server Configuration</h2></div></div></div><p>
  1311. The DHCPv4 server does not have a lease database implemented yet
  1312. nor any support for configuration, so every time the same set
  1313. of configuration options (including the same fixed address)
  1314. will be assigned every time.
  1315. </p><p>
  1316. At this stage of development, the only way to alter the server
  1317. configuration is to tweak its source code. To do so, please
  1318. edit src/bin/dhcp4/dhcp4_srv.cc file and modify following
  1319. parameters and recompile:
  1320. </p><pre class="screen">
  1321. const std::string HARDCODED_LEASE = "192.0.2.222"; // assigned lease
  1322. const std::string HARDCODED_NETMASK = "255.255.255.0";
  1323. const uint32_t HARDCODED_LEASE_TIME = 60; // in seconds
  1324. const std::string HARDCODED_GATEWAY = "192.0.2.1";
  1325. const std::string HARDCODED_DNS_SERVER = "192.0.2.2";
  1326. const std::string HARDCODED_DOMAIN_NAME = "isc.example.com";
  1327. const std::string HARDCODED_SERVER_ID = "192.0.2.1";</pre><p>
  1328. Lease database and configuration support is planned for 2012.
  1329. </p></div><div class="section" title="13.3. Supported standards"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp4-std"></a>13.3. Supported standards</h2></div></div></div><p>The following standards and draft standards are currently
  1330. supported:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">RFC2131: Supported messages are DISCOVER, OFFER,
  1331. REQUEST, and ACK.</li><li class="listitem">RFC2132: Supported options are: PAD (0),
  1332. END(255), Message Type(53), DHCP Server Identifier (54),
  1333. Domain Name (15), DNS Servers (6), IP Address Lease Time
  1334. (51), Subnet mask (1), and Routers (3).</li></ul></div></div><div class="section" title="13.4. DHCPv4 Server Limitations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp4-limit"></a>13.4. DHCPv4 Server Limitations</h2></div></div></div><p>These are the current limitations of the DHCPv4 server
  1335. software. Most of them are reflections of the early stage of
  1336. development and should be treated as <span class="quote">&#8220;<span class="quote">not implemented
  1337. yet</span>&#8221;</span>, rather than actual limitations.</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">During initial IPv4 node configuration, the
  1338. server is expected to send packets to a node that does not
  1339. have IPv4 address assigned yet. The server requires
  1340. certain tricks (or hacks) to transmit such packets. This
  1341. is not implemented yet, therefore DHCPv4 server supports
  1342. relayed traffic only (that is, normal point to point
  1343. communication).</li><li class="listitem"><span class="command"><strong>b10-dhcp4</strong></span> provides a single,
  1344. fixed, hardcoded lease to any client that asks. There is
  1345. no lease manager implemented. If two clients request
  1346. addresses, they will both get the same fixed
  1347. address.</li><li class="listitem"><span class="command"><strong>b10-dhcp4</strong></span> does not support any
  1348. configuration mechanisms yet. The whole configuration is
  1349. currently hardcoded. The only way to tweak configuration
  1350. is to directly modify source code. See see <a class="xref" href="#dhcp4-config" title="13.2. DHCPv4 Server Configuration">Section 13.2, &#8220;DHCPv4 Server Configuration&#8221;</a> for details.</li><li class="listitem">Upon start, the server will open sockets on all
  1351. interfaces that are not loopback, are up and running and
  1352. have IPv4 address.</li><li class="listitem">PRL (Parameter Request List, a list of options
  1353. requested by a client) is currently ignored and server
  1354. assigns DNS SERVER and DOMAIN NAME options.</li><li class="listitem"><span class="command"><strong>b10-dhcp4</strong></span> does not support
  1355. BOOTP. That is a design choice. This limitation is
  1356. permanent. If you have legacy nodes that can't use DHCP and
  1357. require BOOTP support, please use latest version of ISC DHCP
  1358. <a class="ulink" href="http://www.isc.org/software/dhcp" target="_top">http://www.isc.org/software/dhcp</a>.</li><li class="listitem">Interface detection is currently working on Linux
  1359. only. See <a class="xref" href="#iface-detect" title="15.1. Interface detection">Section 15.1, &#8220;Interface detection&#8221;</a> for details.</li><li class="listitem"><span class="command"><strong>b10-dhcp4</strong></span> does not verify that
  1360. assigned address is unused. According to RFC2131, the
  1361. allocating server should verify that address is no used by
  1362. sending ICMP echo request.</li><li class="listitem">Address renewal (RENEW), rebinding (REBIND),
  1363. confirmation (CONFIRM), duplication report (DECLINE) and
  1364. release (RELEASE) are not supported yet.</li><li class="listitem">DNS Update is not supported yet.</li><li class="listitem">-v (verbose) command line option is currently
  1365. the default, and cannot be disabled.</li></ul></div></div></div><div class="chapter" title="Chapter 14. DHCPv6 Server"><div class="titlepage"><div><div><h2 class="title"><a name="dhcp6"></a>Chapter 14. DHCPv6 Server</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#dhcp6-usage">14.1. DHCPv6 Server Usage</a></span></dt><dt><span class="section"><a href="#dhcp6-config">14.2. DHCPv6 Server Configuration</a></span></dt><dt><span class="section"><a href="#dhcp6-std">14.3. Supported DHCPv6 Standards</a></span></dt><dt><span class="section"><a href="#dhcp6-limit">14.4. DHCPv6 Server Limitations</a></span></dt></dl></div><p>Dynamic Host Configuration Protocol for IPv6 (DHCPv6) is
  1366. specified in RFC3315. BIND10 provides DHCPv6 server implementation
  1367. that is described in this chapter. For a description of the DHCPv4
  1368. server implementation, see <a class="xref" href="#dhcp4" title="Chapter 13. DHCPv4 Server">Chapter 13, <i>DHCPv4 Server</i></a>.
  1369. </p><p>The DHCPv6 server component is currently under intense
  1370. development. You may want to check out <a class="ulink" href="http://bind10.isc.org/wiki/Kea" target="_top">BIND10 DHCP (Kea) wiki</a>
  1371. and recent posts on <a class="ulink" href="https://lists.isc.org/mailman/listinfo/bind10-dev" target="_top">BIND10
  1372. developers mailing list</a>.</p><p>The DHCPv4 and DHCPv6 components in BIND10 architecture are
  1373. internally code named <span class="quote">&#8220;<span class="quote">Kea</span>&#8221;</span>.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1374. As of December 2011, both DHCPv4 and DHCPv6 components are
  1375. skeleton servers. That means that while they are capable of
  1376. performing DHCP configuration, they are not fully functional
  1377. yet. In particular, neither has functional lease
  1378. databases. This means that they will assign the same, fixed,
  1379. hardcoded addresses to any client that will ask. See <a class="xref" href="#dhcp4-limit" title="13.4. DHCPv4 Server Limitations">Section 13.4, &#8220;DHCPv4 Server Limitations&#8221;</a> and <a class="xref" href="#dhcp6-limit" title="14.4. DHCPv6 Server Limitations">Section 14.4, &#8220;DHCPv6 Server Limitations&#8221;</a> for
  1380. detailed description.
  1381. </p></div><div class="section" title="14.1. DHCPv6 Server Usage"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp6-usage"></a>14.1. DHCPv6 Server Usage</h2></div></div></div><p>
  1382. BIND10 provides the DHCPv6 server component since September
  1383. 2011. It is a skeleton server and can be described as an early
  1384. prototype that is not fully functional yet. It is mature
  1385. enough to conduct first tests in lab environment, but it has
  1386. significant limitations. See <a class="xref" href="#dhcp6-limit" title="14.4. DHCPv6 Server Limitations">Section 14.4, &#8220;DHCPv6 Server Limitations&#8221;</a> for
  1387. details.
  1388. </p><p>
  1389. The DHCPv6 server is implemented as <span class="command"><strong>b10-dhcp6</strong></span>
  1390. daemon. As it is not configurable yet, it is fully autonomous,
  1391. that is it does not interact with <span class="command"><strong>b10-cfgmgr</strong></span>.
  1392. To start DHCPv6 server, simply input:
  1393. </p><pre class="screen">
  1394. #<strong class="userinput"><code>cd src/bin/dhcp6</code></strong>
  1395. #<strong class="userinput"><code>./b10-dhcp6</code></strong>
  1396. </pre><p>
  1397. Depending on your installation, <span class="command"><strong>b10-dhcp6</strong></span>
  1398. binary may reside in src/bin/dhcp6 in your source code
  1399. directory, in /usr/local/bin/b10-dhcp6 or other directory
  1400. you specified during compilation.
  1401. At start, server will detect available network interfaces
  1402. and will attempt to open UDP sockets on all interfaces that
  1403. are up, running, are not loopback, are multicast-capable, and
  1404. have IPv6 address assigned.
  1405. The server will then listen to incoming traffic. Currently
  1406. supported client messages are SOLICIT and REQUEST. The server
  1407. will respond to them with ADVERTISE and REPLY, respectively.
  1408. Since the DHCPv6 server opens privileged ports, it requires root
  1409. access. Make sure you run this daemon as root.
  1410. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1411. Integration with <span class="command"><strong>bind10</strong></span> is
  1412. planned. Ultimately, <span class="command"><strong>b10-dhcp6</strong></span> will not
  1413. be started directly, but rather via
  1414. <span class="command"><strong>bind10</strong></span>. Please be aware of this planned
  1415. change.
  1416. </p></div></div><div class="section" title="14.2. DHCPv6 Server Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp6-config"></a>14.2. DHCPv6 Server Configuration</h2></div></div></div><p>
  1417. The DHCPv6 server does not have lease database implemented yet
  1418. or any support for configuration, so every time the same set
  1419. of configuration options (including the same fixed address)
  1420. will be assigned every time.
  1421. </p><p>
  1422. At this stage of development, the only way to alter server
  1423. configuration is to tweak its source code. To do so, please
  1424. edit src/bin/dhcp6/dhcp6_srv.cc file and modify following
  1425. parameters and recompile:
  1426. </p><pre class="screen">
  1427. const std::string HARDCODED_LEASE = "2001:db8:1::1234:abcd";
  1428. const uint32_t HARDCODED_T1 = 1500; // in seconds
  1429. const uint32_t HARDCODED_T2 = 2600; // in seconds
  1430. const uint32_t HARDCODED_PREFERRED_LIFETIME = 3600; // in seconds
  1431. const uint32_t HARDCODED_VALID_LIFETIME = 7200; // in seconds
  1432. const std::string HARDCODED_DNS_SERVER = "2001:db8:1::1";</pre><p>
  1433. Lease database and configuration support is planned for 2012.
  1434. </p></div><div class="section" title="14.3. Supported DHCPv6 Standards"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp6-std"></a>14.3. Supported DHCPv6 Standards</h2></div></div></div><p>The following standards and draft standards are currently
  1435. supported:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">RFC3315: Supported messages are SOLICIT,
  1436. ADVERTISE, REQUEST, and REPLY. Supported options are
  1437. SERVER_ID, CLIENT_ID, IA_NA, and IAADDRESS.</li><li class="listitem">RFC3646: Supported option is DNS_SERVERS.</li></ul></div></div><div class="section" title="14.4. DHCPv6 Server Limitations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp6-limit"></a>14.4. DHCPv6 Server Limitations</h2></div></div></div><p> These are the current limitations of the DHCPv6 server
  1438. software. Most of them are reflections of the early stage of
  1439. development and should be treated as <span class="quote">&#8220;<span class="quote">not implemented
  1440. yet</span>&#8221;</span>, rather than actual limitations.</p><p>
  1441. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">Relayed traffic is not supported.</li><li class="listitem"><span class="command"><strong>b10-dhcp6</strong></span> provides a single,
  1442. fixed, hardcoded lease to any client that asks. There is no
  1443. lease manager implemented. If two clients request addresses,
  1444. they will both get the same fixed address.</li><li class="listitem"><span class="command"><strong>b10-dhcp6</strong></span> does not support any
  1445. configuration mechanisms yet. The whole configuration is
  1446. currently hardcoded. The only way to tweak configuration
  1447. is to directly modify source code. See see <a class="xref" href="#dhcp6-config" title="14.2. DHCPv6 Server Configuration">Section 14.2, &#8220;DHCPv6 Server Configuration&#8221;</a> for details.</li><li class="listitem">Upon start, the server will open sockets on all
  1448. interfaces that are not loopback, are up, running and are
  1449. multicast capable and have IPv6 address. Support for
  1450. multiple interfaces is not coded in reception routines yet,
  1451. so if you are running this code on a machine that has many
  1452. interfaces and <span class="command"><strong>b10-dhcp6</strong></span> happens to
  1453. listen on wrong interface, the easiest way to work around
  1454. this problem is to turn down other interfaces. This
  1455. limitation will be fixed shortly.</li><li class="listitem">ORO (Option Request Option, a list of options
  1456. requested by a client) is currently ignored and server
  1457. assigns DNS SERVER option.</li><li class="listitem">Temporary addresses are not supported yet.</li><li class="listitem">Prefix delegation is not supported yet.</li><li class="listitem">Address renewal (RENEW), rebinding (REBIND),
  1458. confirmation (CONFIRM), duplication report (DECLINE) and
  1459. release (RELEASE) are not supported yet.</li><li class="listitem">DNS Update is not supported yet.</li><li class="listitem">Interface detection is currently working on Linux
  1460. only. See <a class="xref" href="#iface-detect" title="15.1. Interface detection">Section 15.1, &#8220;Interface detection&#8221;</a> for details.</li><li class="listitem">-v (verbose) command line option is currently the
  1461. default, and cannot be disabled.</li></ul></div><p>
  1462. </p></div></div><div class="chapter" title="Chapter 15. libdhcp++ library"><div class="titlepage"><div><div><h2 class="title"><a name="libdhcp"></a>Chapter 15. libdhcp++ library</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#iface-detect">15.1. Interface detection</a></span></dt><dt><span class="section"><a href="#packet-handling">15.2. DHCPv4/DHCPv6 packet handling</a></span></dt></dl></div><p>libdhcp++ is a common library written in C++ that handles
  1463. many DHCP-related tasks, like DHCPv4 and DHCPv6 packets parsing,
  1464. manipulation and assembly, option parsing, manipulation and
  1465. assembly, network interface detection and socket operations, like
  1466. socket creations, data transmission and reception and socket
  1467. closing.
  1468. </p><p>
  1469. While this library is currently used by
  1470. <span class="command"><strong>b10-dhcp4</strong></span> and <span class="command"><strong>b10-dhcp6</strong></span>
  1471. only, it is designed to be portable, universal library useful for
  1472. any kind of DHCP-related software.
  1473. </p><div class="section" title="15.1. Interface detection"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="iface-detect"></a>15.1. Interface detection</h2></div></div></div><p>Both DHCPv4 and DHCPv6 components share network
  1474. interface detection routines. Interface detection is
  1475. currently only supported on Linux systems.</p><p>For non-Linux systems, there is currently stub
  1476. implementation provided. Interface manager detects loopback
  1477. interfaces only as their name (lo or lo0) can be easily predicted.
  1478. Please contact BIND10 development team if you are interested
  1479. in running DHCP components on systems other than Linux.</p></div><div class="section" title="15.2. DHCPv4/DHCPv6 packet handling"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="packet-handling"></a>15.2. DHCPv4/DHCPv6 packet handling</h2></div></div></div><p>TODO: Describe packet handling here, with pointers to wiki</p></div></div><div class="chapter" title="Chapter 16. Statistics"><div class="titlepage"><div><div><h2 class="title"><a name="statistics"></a>Chapter 16. Statistics</h2></div></div></div><p>
  1480. The <span class="command"><strong>b10-stats</strong></span> process is started by
  1481. <span class="command"><strong>bind10</strong></span>.
  1482. It periodically collects statistics data from various modules
  1483. and aggregates it.
  1484. </p><p>
  1485. This stats daemon provides commands to identify if it is
  1486. running, show specified or all statistics data, show specified
  1487. or all statistics data schema, and set specified statistics
  1488. data.
  1489. For example, using <span class="command"><strong>bindctl</strong></span>:
  1490. </p><pre class="screen">
  1491. &gt; <strong class="userinput"><code>Stats show</code></strong>
  1492. {
  1493. "Auth": {
  1494. "opcode.iquery": 0,
  1495. "opcode.notify": 10,
  1496. "opcode.query": 869617,
  1497. ...
  1498. "queries.tcp": 1749,
  1499. "queries.udp": 867868
  1500. },
  1501. "Boss": {
  1502. "boot_time": "2011-01-20T16:59:03Z"
  1503. },
  1504. "Stats": {
  1505. "boot_time": "2011-01-20T16:59:05Z",
  1506. "last_update_time": "2011-01-20T17:04:05Z",
  1507. "lname": "4d3869d9_a@jreed.example.net",
  1508. "report_time": "2011-01-20T17:04:06Z",
  1509. "timestamp": 1295543046.823504
  1510. }
  1511. }
  1512. </pre><p>
  1513. </p></div><div class="chapter" title="Chapter 17. Logging"><div class="titlepage"><div><div><h2 class="title"><a name="logging"></a>Chapter 17. Logging</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#idp609968">17.1. Logging configuration</a></span></dt><dd><dl><dt><span class="section"><a href="#idp611664">17.1.1. Loggers</a></span></dt><dt><span class="section"><a href="#idp648032">17.1.2. Output Options</a></span></dt><dt><span class="section"><a href="#idp673088">17.1.3. Example session</a></span></dt></dl></dd><dt><span class="section"><a href="#idp704416">17.2. Logging Message Format</a></span></dt></dl></div><div class="section" title="17.1. Logging configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp609968"></a>17.1. Logging configuration</h2></div></div></div><p>
  1514. The logging system in BIND 10 is configured through the
  1515. Logging module. All BIND 10 modules will look at the
  1516. configuration in Logging to see what should be logged and
  1517. to where.
  1518. </p><div class="section" title="17.1.1. Loggers"><div class="titlepage"><div><div><h3 class="title"><a name="idp611664"></a>17.1.1. Loggers</h3></div></div></div><p>
  1519. Within BIND 10, a message is logged through a component
  1520. called a "logger". Different parts of BIND 10 log messages
  1521. through different loggers, and each logger can be configured
  1522. independently of one another.
  1523. </p><p>
  1524. In the Logging module, you can specify the configuration
  1525. for zero or more loggers; any that are not specified will
  1526. take appropriate default values.
  1527. </p><p>
  1528. The three most important elements of a logger configuration
  1529. are the <code class="option">name</code> (the component that is
  1530. generating the messages), the <code class="option">severity</code>
  1531. (what to log), and the <code class="option">output_options</code>
  1532. (where to log).
  1533. </p><div class="section" title="17.1.1.1. name (string)"><div class="titlepage"><div><div><h4 class="title"><a name="idp615424"></a>17.1.1.1. name (string)</h4></div></div></div><p>
  1534. Each logger in the system has a name, the name being that
  1535. of the component using it to log messages. For instance,
  1536. if you want to configure logging for the resolver module,
  1537. you add an entry for a logger named <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>. This
  1538. configuration will then be used by the loggers in the
  1539. Resolver module, and all the libraries used by it.
  1540. </p><p>
  1541. If you want to specify logging for one specific library
  1542. within the module, you set the name to
  1543. <em class="replaceable"><code>module.library</code></em>. For example, the
  1544. logger used by the nameserver address store component
  1545. has the full name of <span class="quote">&#8220;<span class="quote">Resolver.nsas</span>&#8221;</span>. If
  1546. there is no entry in Logging for a particular library,
  1547. it will use the configuration given for the module.
  1548. </p><p>
  1549. To illustrate this, suppose you want the cache library
  1550. to log messages of severity DEBUG, and the rest of the
  1551. resolver code to log messages of severity INFO. To achieve
  1552. this you specify two loggers, one with the name
  1553. <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span> and severity INFO, and one with
  1554. the name <span class="quote">&#8220;<span class="quote">Resolver.cache</span>&#8221;</span> with severity
  1555. DEBUG. As there are no entries for other libraries (e.g.
  1556. the nsas), they will use the configuration for the module
  1557. (<span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>), so giving the desired behavior.
  1558. </p><p>
  1559. One special case is that of a module name of <span class="quote">&#8220;<span class="quote">*</span>&#8221;</span>
  1560. (asterisks), which is interpreted as <span class="emphasis"><em>any</em></span>
  1561. module. You can set global logging options by using this,
  1562. including setting the logging configuration for a library
  1563. that is used by multiple modules (e.g. <span class="quote">&#8220;<span class="quote">*.config</span>&#8221;</span>
  1564. specifies the configuration library code in whatever
  1565. module is using it).
  1566. </p><p>
  1567. If there are multiple logger specifications in the
  1568. configuration that might match a particular logger, the
  1569. specification with the more specific logger name takes
  1570. precedence. For example, if there are entries for for
  1571. both <span class="quote">&#8220;<span class="quote">*</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>, the
  1572. resolver module &#8212; and all libraries it uses &#8212;
  1573. will log messages according to the configuration in the
  1574. second entry (<span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>). All other modules
  1575. will use the configuration of the first entry
  1576. (<span class="quote">&#8220;<span class="quote">*</span>&#8221;</span>). If there was also a configuration
  1577. entry for <span class="quote">&#8220;<span class="quote">Resolver.cache</span>&#8221;</span>, the cache library
  1578. within the resolver would use that in preference to the
  1579. entry for <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>.
  1580. </p><p>
  1581. One final note about the naming. When specifying the
  1582. module name within a logger, use the name of the module
  1583. as specified in <span class="command"><strong>bindctl</strong></span>, e.g.
  1584. <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span> for the resolver module,
  1585. <span class="quote">&#8220;<span class="quote">Xfrout</span>&#8221;</span> for the xfrout module, etc. When
  1586. the message is logged, the message will include the name
  1587. of the logger generating the message, but with the module
  1588. name replaced by the name of the process implementing
  1589. the module (so for example, a message generated by the
  1590. <span class="quote">&#8220;<span class="quote">Auth.cache</span>&#8221;</span> logger will appear in the output
  1591. with a logger name of <span class="quote">&#8220;<span class="quote">b10-auth.cache</span>&#8221;</span>).
  1592. </p></div><div class="section" title="17.1.1.2. severity (string)"><div class="titlepage"><div><div><h4 class="title"><a name="idp631472"></a>17.1.1.2. severity (string)</h4></div></div></div><p>
  1593. This specifies the category of messages logged.
  1594. Each message is logged with an associated severity which
  1595. may be one of the following (in descending order of
  1596. severity):
  1597. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> FATAL </li><li class="listitem"> ERROR </li><li class="listitem"> WARN </li><li class="listitem"> INFO </li><li class="listitem"> DEBUG </li></ul></div><p>
  1598. When the severity of a logger is set to one of these
  1599. values, it will only log messages of that severity, and
  1600. the severities above it. The severity may also be set to
  1601. NONE, in which case all messages from that logger are
  1602. inhibited.
  1603. </p></div><div class="section" title="17.1.1.3. output_options (list)"><div class="titlepage"><div><div><h4 class="title"><a name="idp638448"></a>17.1.1.3. output_options (list)</h4></div></div></div><p>
  1604. Each logger can have zero or more
  1605. <code class="option">output_options</code>. These specify where log
  1606. messages are sent to. These are explained in detail below.
  1607. </p><p>
  1608. The other options for a logger are:
  1609. </p></div><div class="section" title="17.1.1.4. debuglevel (integer)"><div class="titlepage"><div><div><h4 class="title"><a name="idp640720"></a>17.1.1.4. debuglevel (integer)</h4></div></div></div><p>
  1610. When a logger's severity is set to DEBUG, this value
  1611. specifies what debug messages should be printed. It ranges
  1612. from 0 (least verbose) to 99 (most verbose).
  1613. </p><p>
  1614. If severity for the logger is not DEBUG, this value is ignored.
  1615. </p></div><div class="section" title="17.1.1.5. additive (true or false)"><div class="titlepage"><div><div><h4 class="title"><a name="idp643104"></a>17.1.1.5. additive (true or false)</h4></div></div></div><p>
  1616. If this is true, the <code class="option">output_options</code> from
  1617. the parent will be used. For example, if there are two
  1618. loggers configured; <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span> and
  1619. <span class="quote">&#8220;<span class="quote">Resolver.cache</span>&#8221;</span>, and <code class="option">additive</code>
  1620. is true in the second, it will write the log messages
  1621. not only to the destinations specified for
  1622. <span class="quote">&#8220;<span class="quote">Resolver.cache</span>&#8221;</span>, but also to the destinations
  1623. as specified in the <code class="option">output_options</code> in
  1624. the logger named <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>.
  1625. </p></div></div><div class="section" title="17.1.2. Output Options"><div class="titlepage"><div><div><h3 class="title"><a name="idp648032"></a>17.1.2. Output Options</h3></div></div></div><p>
  1626. The main settings for an output option are the
  1627. <code class="option">destination</code> and a value called
  1628. <code class="option">output</code>, the meaning of which depends on
  1629. the destination that is set.
  1630. </p><div class="section" title="17.1.2.1. destination (string)"><div class="titlepage"><div><div><h4 class="title"><a name="idp650112"></a>17.1.2.1. destination (string)</h4></div></div></div><p>
  1631. The destination is the type of output. It can be one of:
  1632. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> console </li><li class="listitem"> file </li><li class="listitem"> syslog </li></ul></div></div><div class="section" title="17.1.2.2. output (string)"><div class="titlepage"><div><div><h4 class="title"><a name="idp654176"></a>17.1.2.2. output (string)</h4></div></div></div><p>
  1633. Depending on what is set as the output destination, this
  1634. value is interpreted as follows:
  1635. </p><div class="variablelist"><dl><dt><span class="term"><code class="option">destination</code> is <span class="quote">&#8220;<span class="quote">console</span>&#8221;</span></span></dt><dd><p>
  1636. The value of output must be one of <span class="quote">&#8220;<span class="quote">stdout</span>&#8221;</span>
  1637. (messages printed to standard output) or
  1638. <span class="quote">&#8220;<span class="quote">stderr</span>&#8221;</span> (messages printed to standard
  1639. error).
  1640. </p><p>
  1641. Note: if output is set to <span class="quote">&#8220;<span class="quote">stderr</span>&#8221;</span> and a lot of
  1642. messages are produced in a short time (e.g. if the logging
  1643. level is set to DEBUG), you may occasionally see some messages
  1644. jumbled up together. This is due to a combination of the way
  1645. that messages are written to the screen and the unbuffered
  1646. nature of the standard error stream. If this occurs, it is
  1647. recommended that output be set to <span class="quote">&#8220;<span class="quote">stdout</span>&#8221;</span>.
  1648. </p></dd><dt><span class="term"><code class="option">destination</code> is <span class="quote">&#8220;<span class="quote">file</span>&#8221;</span></span></dt><dd><p>
  1649. The value of output is interpreted as a file name;
  1650. log messages will be appended to this file.
  1651. </p></dd><dt><span class="term"><code class="option">destination</code> is <span class="quote">&#8220;<span class="quote">syslog</span>&#8221;</span></span></dt><dd><p>
  1652. The value of output is interpreted as the
  1653. <span class="command"><strong>syslog</strong></span> facility (e.g.
  1654. <span class="emphasis"><em>local0</em></span>) that should be used
  1655. for log messages.
  1656. </p></dd></dl></div><p>
  1657. The other options for <code class="option">output_options</code> are:
  1658. </p><div class="section" title="17.1.2.2.1. flush (true of false)"><div class="titlepage"><div><div><h5 class="title"><a name="idp667136"></a>17.1.2.2.1. flush (true of false)</h5></div></div></div><p>
  1659. Flush buffers after each log message. Doing this will
  1660. reduce performance but will ensure that if the program
  1661. terminates abnormally, all messages up to the point of
  1662. termination are output.
  1663. </p></div><div class="section" title="17.1.2.2.2. maxsize (integer)"><div class="titlepage"><div><div><h5 class="title"><a name="idp668576"></a>17.1.2.2.2. maxsize (integer)</h5></div></div></div><p>
  1664. Only relevant when destination is file, this is maximum
  1665. file size of output files in bytes. When the maximum
  1666. size is reached, the file is renamed and a new file opened.
  1667. (For example, a ".1" is appended to the name &#8212;
  1668. if a ".1" file exists, it is renamed ".2",
  1669. etc.)
  1670. </p><p>
  1671. If this is 0, no maximum file size is used.
  1672. </p></div><div class="section" title="17.1.2.2.3. maxver (integer)"><div class="titlepage"><div><div><h5 class="title"><a name="idp670640"></a>17.1.2.2.3. maxver (integer)</h5></div></div></div><p>
  1673. Maximum number of old log files to keep around when
  1674. rolling the output file. Only relevant when
  1675. <code class="option">destination</code> is <span class="quote">&#8220;<span class="quote">file</span>&#8221;</span>.
  1676. </p></div></div></div><div class="section" title="17.1.3. Example session"><div class="titlepage"><div><div><h3 class="title"><a name="idp673088"></a>17.1.3. Example session</h3></div></div></div><p>
  1677. In this example we want to set the global logging to
  1678. write to the file <code class="filename">/var/log/my_bind10.log</code>,
  1679. at severity WARN. We want the authoritative server to
  1680. log at DEBUG with debuglevel 40, to a different file
  1681. (<code class="filename">/tmp/debug_messages</code>).
  1682. </p><p>
  1683. Start <span class="command"><strong>bindctl</strong></span>.
  1684. </p><p>
  1685. </p><pre class="screen">["login success "]
  1686. &gt; <strong class="userinput"><code>config show Logging</code></strong>
  1687. Logging/loggers [] list
  1688. </pre><p>
  1689. </p><p>
  1690. By default, no specific loggers are configured, in which
  1691. case the severity defaults to INFO and the output is
  1692. written to stderr.
  1693. </p><p>
  1694. Let's first add a default logger:
  1695. </p><p>
  1696. </p><pre class="screen"><strong class="userinput"><code>&gt; config add Logging/loggers</code></strong>
  1697. &gt; <strong class="userinput"><code>config show Logging</code></strong>
  1698. Logging/loggers/ list (modified)
  1699. </pre><p>
  1700. </p><p>
  1701. The loggers value line changed to indicate that it is no
  1702. longer an empty list:
  1703. </p><p>
  1704. </p><pre class="screen">&gt; <strong class="userinput"><code>config show Logging/loggers</code></strong>
  1705. Logging/loggers[0]/name "" string (default)
  1706. Logging/loggers[0]/severity "INFO" string (default)
  1707. Logging/loggers[0]/debuglevel 0 integer (default)
  1708. Logging/loggers[0]/additive false boolean (default)
  1709. Logging/loggers[0]/output_options [] list (default)
  1710. </pre><p>
  1711. </p><p>
  1712. The name is mandatory, so we must set it. We will also
  1713. change the severity as well. Let's start with the global
  1714. logger.
  1715. </p><p>
  1716. </p><pre class="screen">&gt; <strong class="userinput"><code>config set Logging/loggers[0]/name *</code></strong>
  1717. &gt; <strong class="userinput"><code>config set Logging/loggers[0]/severity WARN</code></strong>
  1718. &gt; <strong class="userinput"><code>config show Logging/loggers</code></strong>
  1719. Logging/loggers[0]/name "*" string (modified)
  1720. Logging/loggers[0]/severity "WARN" string (modified)
  1721. Logging/loggers[0]/debuglevel 0 integer (default)
  1722. Logging/loggers[0]/additive false boolean (default)
  1723. Logging/loggers[0]/output_options [] list (default)
  1724. </pre><p>
  1725. </p><p>
  1726. Of course, we need to specify where we want the log
  1727. messages to go, so we add an entry for an output option.
  1728. </p><p>
  1729. </p><pre class="screen">&gt; <strong class="userinput"><code> config add Logging/loggers[0]/output_options</code></strong>
  1730. &gt; <strong class="userinput"><code> config show Logging/loggers[0]/output_options</code></strong>
  1731. Logging/loggers[0]/output_options[0]/destination "console" string (default)
  1732. Logging/loggers[0]/output_options[0]/output "stdout" string (default)
  1733. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  1734. Logging/loggers[0]/output_options[0]/maxsize 0 integer (default)
  1735. Logging/loggers[0]/output_options[0]/maxver 0 integer (default)
  1736. </pre><p>
  1737. </p><p>
  1738. These aren't the values we are looking for.
  1739. </p><p>
  1740. </p><pre class="screen">&gt; <strong class="userinput"><code> config set Logging/loggers[0]/output_options[0]/destination file</code></strong>
  1741. &gt; <strong class="userinput"><code> config set Logging/loggers[0]/output_options[0]/output /var/log/bind10.log</code></strong>
  1742. &gt; <strong class="userinput"><code> config set Logging/loggers[0]/output_options[0]/maxsize 204800</code></strong>
  1743. &gt; <strong class="userinput"><code> config set Logging/loggers[0]/output_options[0]/maxver 8</code></strong>
  1744. </pre><p>
  1745. </p><p>
  1746. Which would make the entire configuration for this logger
  1747. look like:
  1748. </p><p>
  1749. </p><pre class="screen">&gt; <strong class="userinput"><code> config show all Logging/loggers</code></strong>
  1750. Logging/loggers[0]/name "*" string (modified)
  1751. Logging/loggers[0]/severity "WARN" string (modified)
  1752. Logging/loggers[0]/debuglevel 0 integer (default)
  1753. Logging/loggers[0]/additive false boolean (default)
  1754. Logging/loggers[0]/output_options[0]/destination "file" string (modified)
  1755. Logging/loggers[0]/output_options[0]/output "/var/log/bind10.log" string (modified)
  1756. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  1757. Logging/loggers[0]/output_options[0]/maxsize 204800 integer (modified)
  1758. Logging/loggers[0]/output_options[0]/maxver 8 integer (modified)
  1759. </pre><p>
  1760. </p><p>
  1761. That looks OK, so let's commit it before we add the
  1762. configuration for the authoritative server's logger.
  1763. </p><p>
  1764. </p><pre class="screen">&gt; <strong class="userinput"><code> config commit</code></strong></pre><p>
  1765. </p><p>
  1766. Now that we have set it, and checked each value along
  1767. the way, adding a second entry is quite similar.
  1768. </p><p>
  1769. </p><pre class="screen">&gt; <strong class="userinput"><code> config add Logging/loggers</code></strong>
  1770. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/name Auth</code></strong>
  1771. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/severity DEBUG</code></strong>
  1772. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/debuglevel 40</code></strong>
  1773. &gt; <strong class="userinput"><code> config add Logging/loggers[1]/output_options</code></strong>
  1774. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/output_options[0]/destination file</code></strong>
  1775. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/output_options[0]/output /tmp/auth_debug.log</code></strong>
  1776. &gt; <strong class="userinput"><code> config commit</code></strong>
  1777. </pre><p>
  1778. </p><p>
  1779. And that's it. Once we have found whatever it was we
  1780. needed the debug messages for, we can simply remove the
  1781. second logger to let the authoritative server use the
  1782. same settings as the rest.
  1783. </p><p>
  1784. </p><pre class="screen">&gt; <strong class="userinput"><code> config remove Logging/loggers[1]</code></strong>
  1785. &gt; <strong class="userinput"><code> config commit</code></strong>
  1786. </pre><p>
  1787. </p><p>
  1788. And every module will now be using the values from the
  1789. logger named <span class="quote">&#8220;<span class="quote">*</span>&#8221;</span>.
  1790. </p></div></div><div class="section" title="17.2. Logging Message Format"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp704416"></a>17.2. Logging Message Format</h2></div></div></div><p>
  1791. Each message written by BIND 10 to the configured logging
  1792. destinations comprises a number of components that identify
  1793. the origin of the message and, if the message indicates
  1794. a problem, information about the problem that may be
  1795. useful in fixing it.
  1796. </p><p>
  1797. Consider the message below logged to a file:
  1798. </p><pre class="screen">2011-06-15 13:48:22.034 ERROR [b10-resolver.asiolink]
  1799. ASIODNS_OPENSOCK error 111 opening TCP socket to 127.0.0.1(53)</pre><p>
  1800. </p><p>
  1801. Note: the layout of messages written to the system logging
  1802. file (syslog) may be slightly different. This message has
  1803. been split across two lines here for display reasons; in the
  1804. logging file, it will appear on one line.)
  1805. </p><p>
  1806. The log message comprises a number of components:
  1807. </p><div class="variablelist"><dl><dt><span class="term">2011-06-15 13:48:22.034</span></dt><dd><p>
  1808. The date and time at which the message was generated.
  1809. </p></dd><dt><span class="term">ERROR</span></dt><dd><p>
  1810. The severity of the message.
  1811. </p></dd><dt><span class="term">[b10-resolver.asiolink]</span></dt><dd><p>
  1812. The source of the message. This comprises two components:
  1813. the BIND 10 process generating the message (in this
  1814. case, <span class="command"><strong>b10-resolver</strong></span>) and the module
  1815. within the program from which the message originated
  1816. (which in the example is the asynchronous I/O link
  1817. module, asiolink).
  1818. </p></dd><dt><span class="term">ASIODNS_OPENSOCK</span></dt><dd><p>
  1819. The message identification. Every message in BIND 10
  1820. has a unique identification, which can be used as an
  1821. index into the <a class="ulink" href="bind10-messages.html" target="_top"><em class="citetitle">BIND 10 Messages
  1822. Manual</em></a> (<a class="ulink" href="http://bind10.isc.org/docs/bind10-messages.html" target="_top">http://bind10.isc.org/docs/bind10-messages.html</a>) from which more information can be obtained.
  1823. </p></dd><dt><span class="term">error 111 opening TCP socket to 127.0.0.1(53)</span></dt><dd><p>
  1824. A brief description of the cause of the problem.
  1825. Within this text, information relating to the condition
  1826. that caused the message to be logged will be included.
  1827. In this example, error number 111 (an operating
  1828. system-specific error number) was encountered when
  1829. trying to open a TCP connection to port 53 on the
  1830. local system (address 127.0.0.1). The next step
  1831. would be to find out the reason for the failure by
  1832. consulting your system's documentation to identify
  1833. what error number 111 means.
  1834. </p></dd></dl></div><p>
  1835. </p></div></div></div></body></html>