bind10-guide.html 154 KB

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