bind10-guide.html 153 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042
  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="id1168229451102"></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="#id1168229451188">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="#id1168229451275">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="#id1168229436957">2.5.1. Download Tar File</a></span></dt><dt><span class="section"><a href="#id1168229436977">2.5.2. Retrieve from Git</a></span></dt><dt><span class="section"><a href="#id1168229437037">2.5.3. Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168229437136">2.5.4. Build</a></span></dt><dt><span class="section"><a href="#id1168229437150">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="#id1168229438312">8.1. Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168229438638">8.2. Data Source Backends</a></span></dt><dd><dl><dt><span class="section"><a href="#in-memory-datasource">8.2.1. In-memory Data Source</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-with-sqlite3-backend">8.2.2. In-memory Data Source with SQLite3 Backend</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-loading">8.2.3. Reloading an In-memory Data Source</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-disabling">8.2.4. Disabling In-memory Data Sources</a></span></dt></dl></dd><dt><span class="section"><a href="#id1168229438940">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="#id1168229439105">9.1. Configuration for Incoming Zone Transfers</a></span></dt><dt><span class="section"><a href="#id1168229439142">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="#id1168229439316">9.4. Trigger an Incoming Zone Transfer Manually</a></span></dt><dt><span class="section"><a href="#id1168229439342">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="#id1168229439633">11.1. Enabling Dynamic Update</a></span></dt><dt><span class="section"><a href="#id1168229439733">11.2. Access Control</a></span></dt><dt><span class="section"><a href="#id1168229439954">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="#id1168229440091">12.1. Access Control</a></span></dt><dt><span class="section"><a href="#id1168229440276">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="#id1168229440926">17.1. Logging configuration</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168229440937">17.1.1. Loggers</a></span></dt><dt><span class="section"><a href="#id1168229441248">17.1.2. Output Options</a></span></dt><dt><span class="section"><a href="#id1168229441431">17.1.3. Example session</a></span></dt></dl></dd><dt><span class="section"><a href="#id1168229441640">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="#id1168229437333">Special startup components</a></dt></dl></div><div class="preface" title="Preface"><div class="titlepage"><div><div><h2 class="title"><a name="id1168229451188"></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="#id1168229451275">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="id1168229451275"></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="#id1168229436957">2.5.1. Download Tar File</a></span></dt><dt><span class="section"><a href="#id1168229436977">2.5.2. Retrieve from Git</a></span></dt><dt><span class="section"><a href="#id1168229437037">2.5.3. Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168229437136">2.5.4. Build</a></span></dt><dt><span class="section"><a href="#id1168229437150">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="id1168229436957"></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="id1168229436977"></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="id1168229437037"></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="id1168229437136"></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="id1168229437150"></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="id1168229437333"></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="#id1168229438312">8.1. Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168229438638">8.2. Data Source Backends</a></span></dt><dd><dl><dt><span class="section"><a href="#in-memory-datasource">8.2.1. In-memory Data Source</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-with-sqlite3-backend">8.2.2. In-memory Data Source with SQLite3 Backend</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-loading">8.2.3. Reloading an In-memory Data Source</a></span></dt><dt><span class="section"><a href="#in-memory-datasource-disabling">8.2.4. Disabling In-memory Data Sources</a></span></dt></dl></dd><dt><span class="section"><a href="#id1168229438940">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="id1168229438312"></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="id1168229438638"></a>8.2. Data Source Backends</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  739. For the development prototype release, <span class="command"><strong>b10-auth</strong></span>
  740. supports a SQLite3 data source backend and in-memory data source
  741. backend.
  742. Upcoming versions will be able to use multiple different
  743. data sources, such as MySQL and Berkeley DB.
  744. </p></div><p>
  745. By default, the SQLite3 backend uses the data file located at
  746. <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>.
  747. (The full path is what was defined at build configure time for
  748. <code class="option">--localstatedir</code>.
  749. The default is <code class="filename">/usr/local/var/</code>.)
  750. This data file location may be changed by defining the
  751. <span class="quote">&#8220;<span class="quote">database_file</span>&#8221;</span> configuration.
  752. </p><div class="section" title="8.2.1. In-memory Data Source"><div class="titlepage"><div><div><h3 class="title"><a name="in-memory-datasource"></a>8.2.1. In-memory Data Source</h3></div></div></div><p>
  753. The following commands to <span class="command"><strong>bindctl</strong></span>
  754. provide an example of configuring an in-memory data
  755. source containing the <span class="quote">&#8220;<span class="quote">example.com</span>&#8221;</span> zone
  756. with the zone file named <span class="quote">&#8220;<span class="quote">example.com.zone</span>&#8221;</span>:
  757. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Auth/datasources</code></strong>
  758. &gt; <strong class="userinput"><code>config set Auth/datasources[0]/type "<code class="option">memory</code>"</code></strong>
  759. &gt; <strong class="userinput"><code>config add Auth/datasources[0]/zones</code></strong>
  760. &gt; <strong class="userinput"><code>config set Auth/datasources[0]/zones[0]/origin "<code class="option">example.com</code>"</code></strong>
  761. &gt; <strong class="userinput"><code>config set Auth/datasources[0]/zones[0]/file "<code class="option">example.com.zone</code>"</code></strong>
  762. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  763. The authoritative server will begin serving it immediately
  764. after the zone data is loaded from the master text file.
  765. </p></div><div class="section" title="8.2.2. In-memory Data Source with SQLite3 Backend"><div class="titlepage"><div><div><h3 class="title"><a name="in-memory-datasource-with-sqlite3-backend"></a>8.2.2. In-memory Data Source with SQLite3 Backend</h3></div></div></div><p>
  766. The following commands to <span class="command"><strong>bindctl</strong></span>
  767. provide an example of configuring an in-memory data
  768. source containing the <span class="quote">&#8220;<span class="quote">example.org</span>&#8221;</span> zone
  769. with a SQLite3 backend file named <span class="quote">&#8220;<span class="quote">example.org.sqlite3</span>&#8221;</span>:
  770. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Auth/datasources</code></strong>
  771. &gt; <strong class="userinput"><code>config set Auth/datasources[1]/type "<code class="option">memory</code>"</code></strong>
  772. &gt; <strong class="userinput"><code>config add Auth/datasources[1]/zones</code></strong>
  773. &gt; <strong class="userinput"><code>config set Auth/datasources[1]/zones[0]/origin "<code class="option">example.org</code>"</code></strong>
  774. &gt; <strong class="userinput"><code>config set Auth/datasources[1]/zones[0]/file "<code class="option">example.org.sqlite3</code>"</code></strong>
  775. &gt; <strong class="userinput"><code>config set Auth/datasources[1]/zones[0]/filetype "<code class="option">sqlite3</code>"</code></strong>
  776. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  777. The authoritative server will begin serving it immediately
  778. after the zone data is loaded from the database file.
  779. </p></div><div class="section" title="8.2.3. Reloading an In-memory Data Source"><div class="titlepage"><div><div><h3 class="title"><a name="in-memory-datasource-loading"></a>8.2.3. Reloading an In-memory Data Source</h3></div></div></div><p>
  780. Use the <span class="command"><strong>Auth loadzone</strong></span> command in
  781. <span class="command"><strong>bindctl</strong></span> to reload a changed master
  782. file into memory; for example:
  783. </p><pre class="screen">&gt; <strong class="userinput"><code>Auth loadzone origin="example.com"</code></strong>
  784. </pre><p>
  785. </p></div><div class="section" title="8.2.4. Disabling In-memory Data Sources"><div class="titlepage"><div><div><h3 class="title"><a name="in-memory-datasource-disabling"></a>8.2.4. Disabling In-memory Data Sources</h3></div></div></div><p>
  786. By default, the memory data source is disabled; it must be
  787. configured explicitly. To disable all the in-memory zones,
  788. specify a null list for <code class="varname">Auth/datasources</code>:
  789. </p><pre class="screen">&gt; <strong class="userinput"><code>config set Auth/datasources/ []</code></strong>
  790. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  791. </p><p>
  792. The following example stops serving a specific zone:
  793. </p><pre class="screen">&gt; <strong class="userinput"><code>config remove Auth/datasources[<code class="option">0</code>]/zones[<code class="option">0</code>]</code></strong>
  794. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  795. (Replace the list number(s) in
  796. <code class="varname">datasources[<em class="replaceable"><code>0</code></em>]</code>
  797. and/or <code class="varname">zones[<em class="replaceable"><code>0</code></em>]</code>
  798. for the relevant zone as needed.)
  799. </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="id1168229438940"></a>8.3. Loading Master Zones Files</h2></div></div></div><p>
  800. RFC 1035 style DNS master zone files may imported
  801. into a BIND 10 SQLite3 data source by using the
  802. <span class="command"><strong>b10-loadzone</strong></span> utility.
  803. </p><p>
  804. <span class="command"><strong>b10-loadzone</strong></span> supports the following
  805. special directives (control entries):
  806. </p><div class="variablelist"><dl><dt><span class="term">$INCLUDE</span></dt><dd>Loads an additional zone file. This may be recursive.
  807. </dd><dt><span class="term">$ORIGIN</span></dt><dd>Defines the relative domain name.
  808. </dd><dt><span class="term">$TTL</span></dt><dd>Defines the time-to-live value used for following
  809. records that don't include a TTL.
  810. </dd></dl></div><p>
  811. </p><p>
  812. The <code class="option">-o</code> argument may be used to define the
  813. default origin for loaded zone file records.
  814. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  815. In the development prototype release, only the SQLite3 back
  816. end is used by <span class="command"><strong>b10-loadzone</strong></span>.
  817. By default, it stores the zone data in
  818. <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>
  819. unless the <code class="option">-d</code> switch is used to set the
  820. database filename.
  821. Multiple zones are stored in a single SQLite3 zone database.
  822. </p></div><p>
  823. If you reload a zone already existing in the database,
  824. all records from that prior zone disappear and a whole new set
  825. appears.
  826. </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="#id1168229439105">9.1. Configuration for Incoming Zone Transfers</a></span></dt><dt><span class="section"><a href="#id1168229439142">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="#id1168229439316">9.4. Trigger an Incoming Zone Transfer Manually</a></span></dt><dt><span class="section"><a href="#id1168229439342">9.5. Incoming Transfers with In-memory Datasource</a></span></dt></dl></div><p>
  827. Incoming zones are transferred using the <span class="command"><strong>b10-xfrin</strong></span>
  828. process which is started by <span class="command"><strong>bind10</strong></span>.
  829. When received, the zone is stored in the corresponding BIND 10
  830. data source, and its records can be served by
  831. <span class="command"><strong>b10-auth</strong></span>.
  832. In combination with <span class="command"><strong>b10-zonemgr</strong></span> (for
  833. automated SOA checks), this allows the BIND 10 server to
  834. provide <span class="emphasis"><em>secondary</em></span> service.
  835. </p><p>
  836. The <span class="command"><strong>b10-xfrin</strong></span> process supports both AXFR and
  837. IXFR. Due to some implementation limitations of the current
  838. development release, however, it only tries AXFR by default,
  839. and care should be taken to enable IXFR.
  840. </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="id1168229439105"></a>9.1. Configuration for Incoming Zone Transfers</h2></div></div></div><p>
  841. In practice, you need to specify a list of secondary zones to
  842. enable incoming zone transfers for these zones (you can still
  843. trigger a zone transfer manually, without a prior configuration
  844. (see below)).
  845. </p><p>
  846. For example, to enable zone transfers for a zone named "example.com"
  847. (whose master address is assumed to be 2001:db8::53 here),
  848. run the following at the <span class="command"><strong>bindctl</strong></span> prompt:
  849. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Xfrin/zones</code></strong>
  850. &gt; <strong class="userinput"><code>config set Xfrin/zones[0]/name "<code class="option">example.com</code>"</code></strong>
  851. &gt; <strong class="userinput"><code>config set Xfrin/zones[0]/master_addr "<code class="option">2001:db8::53</code>"</code></strong>
  852. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  853. (We assume there has been no zone configuration before).
  854. </p></div><div class="section" title="9.2. Enabling IXFR"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168229439142"></a>9.2. Enabling IXFR</h2></div></div></div><p>
  855. As noted above, <span class="command"><strong>b10-xfrin</strong></span> uses AXFR for
  856. zone transfers by default. To enable IXFR for zone transfers
  857. for a particular zone, set the <strong class="userinput"><code>use_ixfr</code></strong>
  858. configuration parameter to <strong class="userinput"><code>true</code></strong>.
  859. In the above example of configuration sequence, you'll need
  860. to add the following before performing <strong class="userinput"><code>commit</code></strong>:
  861. </p><pre class="screen">&gt; <strong class="userinput"><code>config set Xfrin/zones[0]/use_ixfr true</code></strong></pre><p>
  862. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  863. One reason why IXFR is disabled by default in the current
  864. release is because it does not support automatic fallback from IXFR to
  865. AXFR when it encounters a primary server that doesn't support
  866. outbound IXFR (and, not many existing implementations support
  867. it). Another, related reason is that it does not use AXFR even
  868. if it has no knowledge about the zone (like at the very first
  869. time the secondary server is set up). IXFR requires the
  870. "current version" of the zone, so obviously it doesn't work
  871. in this situation and AXFR is the only workable choice.
  872. The current release of <span class="command"><strong>b10-xfrin</strong></span> does not
  873. make this selection automatically.
  874. These features will be implemented in a near future
  875. version, at which point we will enable IXFR by default.
  876. </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>
  877. The <span class="command"><strong>b10-zonemgr</strong></span> process is started by
  878. <span class="command"><strong>bind10</strong></span>.
  879. It keeps track of SOA refresh, retry, and expire timers
  880. and other details for BIND 10 to perform as a slave.
  881. When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
  882. receives a NOTIFY message, <span class="command"><strong>b10-zonemgr</strong></span>
  883. may tell <span class="command"><strong>b10-xfrin</strong></span> to do a refresh
  884. to start an inbound zone transfer.
  885. The secondary manager resets its counters when a new zone is
  886. transferred in.
  887. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  888. Access control (such as allowing notifies) is not yet provided.
  889. The primary/secondary service is not yet complete.
  890. </p></div><p>
  891. The following example shows using <span class="command"><strong>bindctl</strong></span>
  892. to configure the server to be a secondary for the example zone:
  893. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Zonemgr/secondary_zones</code></strong>
  894. &gt; <strong class="userinput"><code>config set Zonemgr/secondary_zones[0]/name "<code class="option">example.com</code>"</code></strong>
  895. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  896. </p><p>
  897. If the zone does not exist in the data source already
  898. (i.e. no SOA record for it), <span class="command"><strong>b10-zonemgr</strong></span>
  899. will automatically tell <span class="command"><strong>b10-xfrin</strong></span>
  900. to transfer the zone in.
  901. </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="id1168229439316"></a>9.4. Trigger an Incoming Zone Transfer Manually</h2></div></div></div><p>
  902. To manually trigger a zone transfer to retrieve a remote zone,
  903. you may use the <span class="command"><strong>bindctl</strong></span> utility.
  904. For example, at the <span class="command"><strong>bindctl</strong></span> prompt run:
  905. </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>
  906. </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="id1168229439342"></a>9.5. Incoming Transfers with In-memory Datasource</h2></div></div></div><p>
  907. In the case of an incoming zone transfer, the received zone is
  908. first stored in the corresponding BIND 10 datasource. In
  909. case the secondary zone is served by an in-memory datasource
  910. with an SQLite3 backend, <span class="command"><strong>b10-auth</strong></span> is
  911. automatically sent a <code class="varname">loadzone</code> command to
  912. reload the corresponding zone into memory from the backend.
  913. </p><p>
  914. The administrator doesn't have to do anything for
  915. <span class="command"><strong>b10-auth</strong></span> to serve the new version of the
  916. zone, except for the configuration such as the one described in
  917. <a class="xref" href="#in-memory-datasource-with-sqlite3-backend" title="8.2.2. In-memory Data Source with SQLite3 Backend">Section 8.2.2, &#8220;In-memory Data Source with SQLite3 Backend&#8221;</a>.
  918. </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>
  919. The <span class="command"><strong>b10-xfrout</strong></span> process is started by
  920. <span class="command"><strong>bind10</strong></span>.
  921. When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
  922. receives an AXFR or IXFR request, <span class="command"><strong>b10-auth</strong></span>
  923. internally forwards the request to <span class="command"><strong>b10-xfrout</strong></span>,
  924. which handles the rest of this request processing.
  925. This is used to provide primary DNS service to share zones
  926. to secondary name servers.
  927. The <span class="command"><strong>b10-xfrout</strong></span> is also used to send
  928. NOTIFY messages to secondary servers.
  929. </p><p>
  930. A global or per zone <code class="option">transfer_acl</code> configuration
  931. can be used to control accessibility of the outbound zone
  932. transfer service.
  933. By default, <span class="command"><strong>b10-xfrout</strong></span> allows any clients to
  934. perform zone transfers for any zones:
  935. </p><pre class="screen">&gt; <strong class="userinput"><code>config show Xfrout/transfer_acl</code></strong>
  936. Xfrout/transfer_acl[0] {"action": "ACCEPT"} any (default)</pre><p>
  937. You can change this to, for example, rejecting all transfer
  938. requests by default while allowing requests for the transfer
  939. of zone "example.com" from 192.0.2.1 and 2001:db8::1 as follows:
  940. </p><pre class="screen">&gt; <strong class="userinput"><code>config set Xfrout/transfer_acl[0] {"action": "REJECT"}</code></strong>
  941. &gt; <strong class="userinput"><code>config add Xfrout/zone_config</code></strong>
  942. &gt; <strong class="userinput"><code>config set Xfrout/zone_config[0]/origin "example.com"</code></strong>
  943. &gt; <strong class="userinput"><code>config set Xfrout/zone_config[0]/transfer_acl [{"action": "ACCEPT", "from": "192.0.2.1"},</code></strong>
  944. <strong class="userinput"><code> {"action": "ACCEPT", "from": "2001:db8::1"}]</code></strong>
  945. &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>
  946. In the above example the lines
  947. for <code class="option">transfer_acl</code> were divided for
  948. readability. In the actual input it must be in a single line.
  949. </p></div><p>
  950. If you want to require TSIG in access control, a system wide TSIG
  951. "key ring" must be configured.
  952. For example, to change the previous example to allowing requests
  953. from 192.0.2.1 signed by a TSIG with a key name of
  954. "key.example", you'll need to do this:
  955. </p><pre class="screen">&gt; <strong class="userinput"><code>config set tsig_keys/keys ["key.example:&lt;base64-key&gt;"]</code></strong>
  956. &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>
  957. &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>
  958. will use the system wide keyring to check
  959. 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>
  960. The way to specify zone specific configuration (ACLs, etc) is
  961. likely to be changed.
  962. </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="#id1168229439633">11.1. Enabling Dynamic Update</a></span></dt><dt><span class="section"><a href="#id1168229439733">11.2. Access Control</a></span></dt><dt><span class="section"><a href="#id1168229439954">11.3. Miscellaneous Operational Issues</a></span></dt></dl></div><p>
  963. BIND 10 supports the server side of the Dynamic DNS Update
  964. (DDNS) protocol as defined in RFC 2136.
  965. This service is provided by the <span class="command"><strong>b10-ddns</strong></span>
  966. component, which is started by the <span class="command"><strong>bind10</strong></span>
  967. process if configured so.
  968. </p><p>
  969. When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
  970. receives an UPDATE request, it internally forwards the request
  971. to <span class="command"><strong>b10-ddns</strong></span>, which handles the rest of
  972. this request processing.
  973. When the processing is completed, <span class="command"><strong>b10-ddns</strong></span>
  974. will send a response to the client as specified in RFC 2136
  975. (NOERROR for successful update, REFUSED if rejected due to
  976. ACL check, etc).
  977. If the zone has been changed as a result, it will internally
  978. notify <span class="command"><strong>b10-xfrout</strong></span> so that other secondary
  979. servers will be notified via the DNS NOTIFY protocol.
  980. In addition, if <span class="command"><strong>b10-auth</strong></span> serves the updated
  981. zone from its in-memory cache (as described in
  982. <a class="xref" href="#in-memory-datasource-with-sqlite3-backend" title="8.2.2. In-memory Data Source with SQLite3 Backend">Section 8.2.2, &#8220;In-memory Data Source with SQLite3 Backend&#8221;</a>),
  983. <span class="command"><strong>b10-ddns</strong></span> will also
  984. notify <span class="command"><strong>b10-auth</strong></span> so that <span class="command"><strong>b10-auth</strong></span>
  985. will re-cache the updated zone content.
  986. </p><p>
  987. The <span class="command"><strong>b10-ddns</strong></span> component supports requests over
  988. both UDP and TCP, and both IPv6 and IPv4; for TCP requests,
  989. however, it terminates the TCP connection immediately after
  990. each single request has been processed. Clients cannot reuse the
  991. same TCP connection for multiple requests. (This is a current
  992. implementation limitation of <span class="command"><strong>b10-ddns</strong></span>.
  993. While RFC 2136 doesn't specify anything about such reuse of TCP
  994. connection, there is no reason for disallowing it as RFC 1035
  995. generally allows multiple requests sent over a single TCP
  996. connection. BIND 9 supports such reuse.)
  997. </p><p>
  998. As of this writing <span class="command"><strong>b10-ddns</strong></span> does not support
  999. update forwarding for secondary zones.
  1000. If it receives an update request for a secondary zone, it will
  1001. immediately return a <span class="quote">&#8220;<span class="quote">not implemented</span>&#8221;</span> response.
  1002. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1003. For feature completeness, update forwarding should be
  1004. eventually supported. But currently it's considered a lower
  1005. priority task and there is no specific plan of implementing
  1006. this feature.
  1007. </p></div><p>
  1008. </p><div class="section" title="11.1. Enabling Dynamic Update"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168229439633"></a>11.1. Enabling Dynamic Update</h2></div></div></div><p>
  1009. First off, it must be made sure that a few components on which
  1010. <span class="command"><strong>b10-ddns</strong></span> depends are configured to run,
  1011. which are <span class="command"><strong>b10-auth</strong></span>
  1012. and <span class="command"><strong>b10-zonemgr</strong></span>.
  1013. In addition, <span class="command"><strong>b10-xfrout</strong></span> should also be
  1014. configured to run; otherwise the notification after an update
  1015. (see above) will fail with a timeout, suspending the DDNS
  1016. service while <span class="command"><strong>b10-ddns</strong></span> waits for the
  1017. response (see the description of the <a class="ulink" href="bind10-messages.html#DDNS_UPDATE_NOTIFY_FAIL" target="_top">DDNS_UPDATE_NOTIFY_FAIL</a>
  1018. log message for further details).
  1019. If BIND 10 is already configured to provide authoritative DNS
  1020. service they should normally be configured to run already.
  1021. </p><p>
  1022. Second, for the obvious reason dynamic update requires that the
  1023. underlying data source storing the zone data be writable.
  1024. In the current implementation this means the zone must be stored
  1025. in an SQLite3-based data source.
  1026. Also, in this development version, the <span class="command"><strong>b10-ddns</strong></span>
  1027. component configures itself with the data source referring to the
  1028. <code class="varname">database_file</code> configuration parameter of
  1029. <span class="command"><strong>b10-auth</strong></span>.
  1030. So this information must be configured correctly before starting
  1031. <span class="command"><strong>b10-ddns</strong></span>.
  1032. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1033. The way to configure data sources is now being revised.
  1034. Configuration on the data source for DDNS will be very
  1035. likely to be changed in a backward incompatible manner in
  1036. a near future version.
  1037. </p></div><p>
  1038. </p><p>
  1039. In general, if something goes wrong regarding the dependency
  1040. described above, <span class="command"><strong>b10-ddns</strong></span> will log the
  1041. related event at the warning or error level.
  1042. It's advisable to check the log message when you first enable
  1043. DDNS or if it doesn't work as you expect to see if there's any
  1044. warning or error log message.
  1045. </p><p>
  1046. Next, to enable the DDNS service, <span class="command"><strong>b10-ddns</strong></span>
  1047. needs to be explicitly configured to run.
  1048. It can be done by using the <span class="command"><strong>bindctl</strong></span>
  1049. utility. For example:
  1050. </p><pre class="screen">
  1051. &gt; <strong class="userinput"><code>config add Boss/components b10-ddns</code></strong>
  1052. &gt; <strong class="userinput"><code>config set Boss/components/b10-ddns/address DDNS</code></strong>
  1053. &gt; <strong class="userinput"><code>config set Boss/components/b10-ddns/kind dispensable</code></strong>
  1054. &gt; <strong class="userinput"><code>config commit</code></strong>
  1055. </pre><p>
  1056. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1057. In theory <code class="varname">kind</code> could be omitted because
  1058. "dispensable" is its default.
  1059. But there's some peculiar behavior (which should be a
  1060. bug and should be fixed eventually; see Trac ticket #2064)
  1061. with <span class="command"><strong>bindctl</strong></span> and you'll still need to
  1062. specify that explicitly. Likewise, <code class="varname">address</code>
  1063. may look unnecessary because <span class="command"><strong>b10-ddns</strong></span>
  1064. would start and work without specifying it. But for it
  1065. to shutdown gracefully this parameter should also be
  1066. specified.
  1067. </p></div><p>
  1068. </p></div><div class="section" title="11.2. Access Control"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168229439733"></a>11.2. Access Control</h2></div></div></div><p>
  1069. By default, <span class="command"><strong>b10-ddns</strong></span> rejects any update
  1070. requests from any clients by returning a REFUSED response.
  1071. To allow updates to take effect, an access control rule
  1072. (called update ACL) with a policy allowing updates must explicitly be
  1073. configured.
  1074. Update ACL must be configured per zone basis in the
  1075. <code class="varname">zones</code> configuration parameter of
  1076. <span class="command"><strong>b10-ddns</strong></span>.
  1077. This is a list of per-zone configurations regarding DDNS.
  1078. Each list element consists of the following parameters:
  1079. </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
  1080. (normally <span class="quote">&#8220;<span class="quote">IN</span>&#8221;</span>, and in that case
  1081. 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>
  1082. The syntax of the ACL is the same as ACLs for other
  1083. components.
  1084. Specific examples are given below.
  1085. </p><p>
  1086. In general, an update ACL rule that allows an update request
  1087. should be configured with a TSIG key.
  1088. This is an example update ACL that allows updates to the zone
  1089. 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>)
  1090. from clients that send requests signed with a TSIG whose
  1091. key name is "key.example.org" (and refuses all others):
  1092. </p><pre class="screen">
  1093. &gt; <strong class="userinput"><code>config add DDNS/zones</code></strong>
  1094. &gt; <strong class="userinput"><code>config set DDNS/zones[0]/origin example.org</code></strong>
  1095. &gt; <strong class="userinput"><code>config add DDNS/zones[0]/update_acl {"action": "ACCEPT", "key": "key.example.org"}</code></strong>
  1096. &gt; <strong class="userinput"><code>config commit</code></strong>
  1097. </pre><p>
  1098. The TSIG key must be configured system wide
  1099. (see <a class="xref" href="#xfrout" title="Chapter 10. Outbound Zone Transfers">Chapter 10, <i>Outbound Zone Transfers</i></a>.)
  1100. </p><p>
  1101. Multiple rules can be specified in the ACL, and an ACL rule
  1102. can consist of multiple constraints, such as a combination of
  1103. IP address and TSIG.
  1104. The following configuration sequence will add a new rule to
  1105. the ACL created in the above example. This additional rule
  1106. allows update requests sent from a client
  1107. using TSIG key name of "key.example" (different from the
  1108. key used in the previous example) and has an IPv6 address of ::1.
  1109. </p><pre class="screen">
  1110. &gt; <strong class="userinput"><code>config add DDNS/zones[0]/update_acl {"action": "ACCEPT", "from": "::1", "key": "key.example"}</code></strong>
  1111. &gt; <strong class="userinput"><code>config show DDNS/zones[0]/update_acl</code></strong>
  1112. DDNS/zones[0]/update_acl[0] {"action": "ACCEPT", "key": "key.example.org"} any (modified)
  1113. DDNS/zones[0]/update_acl[1] {"action": "ACCEPT", "from": "::1", "key": "key.example"} any (modified)
  1114. &gt; <strong class="userinput"><code>config commit</code></strong>
  1115. </pre><p>
  1116. (Note the "add" in the first line. Before this sequence, we
  1117. have had only entry in <code class="varname">zones[0]/update_acl</code>.
  1118. The <span class="command"><strong>add</strong></span> command with a value (rule) adds
  1119. a new entry and sets it to the given rule.
  1120. Due to a limitation of the current implementation, it doesn't
  1121. work if you first try to just add a new entry and then set it to
  1122. a given rule.)
  1123. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1124. The <span class="command"><strong>b10-ddns</strong></span> component accepts an ACL
  1125. rule that just allows updates from a specific IP address
  1126. (i.e., without requiring TSIG), but this is highly
  1127. discouraged (remember that requests can be made over UDP and
  1128. spoofing the source address of a UDP packet is often pretty
  1129. easy).
  1130. Unless you know what you are doing and that you can accept
  1131. its consequence, any update ACL rule that allows updates
  1132. should have a TSIG key in its constraints.
  1133. </p></div><p>
  1134. The ACL rules will be checked in the listed order, and the
  1135. first matching one will apply.
  1136. If none of the rules matches, the default rule will apply,
  1137. which is rejecting any requests in the case of
  1138. <span class="command"><strong>b10-ddns</strong></span>.
  1139. </p><p>
  1140. Other actions than "ACCEPT", namely "REJECT" and "DROP", can be
  1141. used, too.
  1142. See <a class="xref" href="#resolverserver" title="Chapter 12. Recursive Name Server">Chapter 12, <i>Recursive Name Server</i></a> about their effects.
  1143. </p><p>
  1144. Currently update ACL can only control updates per zone basis;
  1145. it's not possible to specify access control with higher
  1146. granularity such as for particular domain names or specific
  1147. types of RRs.
  1148. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1149. Contrary to what RFC 2136 (literally) specifies,
  1150. <span class="command"><strong>b10-ddns</strong></span> checks the update ACL before
  1151. checking the prerequisites of the update request.
  1152. This is a deliberate implementation decision.
  1153. This counter intuitive specification has been repeatedly
  1154. discussed among implementers and in the IETF, and it is now
  1155. widely agreed that it does not make sense to strictly follow
  1156. that part of RFC.
  1157. One known specific bad result of following the RFC is that it
  1158. could leak information about which name or record exists or does not
  1159. exist in the zone as a result of prerequisite checks even if a
  1160. zone is somehow configured to reject normal queries from
  1161. arbitrary clients.
  1162. There have been other troubles that could have been avoided if
  1163. the ACL could be checked before the prerequisite check.
  1164. </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="id1168229439954"></a>11.3. Miscellaneous Operational Issues</h2></div></div></div><p>
  1165. Unlike BIND 9, BIND 10 currently does not support automatic
  1166. re-signing of DNSSEC-signed zone when it's updated via DDNS.
  1167. It could be possible to re-sign the updated zone afterwards
  1168. or make sure the update request also updates related DNSSEC
  1169. records, but that will be pretty error-prone operation.
  1170. In general, it's not advisable to allow DDNS for a signed zone
  1171. at this moment.
  1172. </p><p>
  1173. Also unlike BIND 9, it's currently not possible
  1174. to <span class="quote">&#8220;<span class="quote">freeze</span>&#8221;</span> a zone temporarily in order to
  1175. suspend DDNS while you manually update the zone.
  1176. If you need to make manual updates to a dynamic zone,
  1177. you'll need to temporarily reject any updates to the zone via
  1178. the update ACLs.
  1179. </p><p>
  1180. Dynamic updates are only applicable to primary zones.
  1181. In order to avoid updating secondary zones via DDNS requests,
  1182. <span class="command"><strong>b10-ddns</strong></span> refers to the
  1183. <span class="quote">&#8220;<span class="quote">secondary_zones</span>&#8221;</span> configuration of
  1184. <span class="command"><strong>b10-zonemgr</strong></span>. Zones listed in
  1185. <span class="quote">&#8220;<span class="quote">secondary_zones</span>&#8221;</span> will never be updated via DDNS
  1186. regardless of the update ACL configuration;
  1187. <span class="command"><strong>b10-ddns</strong></span> will return a NOTAUTH (server
  1188. not authoritative for the zone) response.
  1189. If you have a "conceptual" secondary zone whose content is a
  1190. copy of some external source but is not updated via the
  1191. standard zone transfers and therefore not listed in
  1192. <span class="quote">&#8220;<span class="quote">secondary_zones</span>&#8221;</span>, be careful not to allow DDNS
  1193. for the zone; it would be quite likely to lead to inconsistent
  1194. state between different servers.
  1195. Normally this should not be a problem because the default
  1196. update ACL rejects any update requests, but you may want to
  1197. take an extra care about the configuration if you have such
  1198. type of secondary zones.
  1199. </p><p>
  1200. The difference of two versions of a zone, before and after a
  1201. DDNS transaction, is automatically recorded in the underlying
  1202. data source, and can be retrieved in the form of outbound
  1203. IXFR.
  1204. This is done automatically; it does not require specific
  1205. configuration to make this possible.
  1206. </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="#id1168229440091">12.1. Access Control</a></span></dt><dt><span class="section"><a href="#id1168229440276">12.2. Forwarding</a></span></dt></dl></div><p>
  1207. The <span class="command"><strong>b10-resolver</strong></span> process is started by
  1208. <span class="command"><strong>bind10</strong></span>.
  1209. </p><p>
  1210. The main <span class="command"><strong>bind10</strong></span> process can be configured
  1211. to select to run either the authoritative or resolver or both.
  1212. By default, it doesn't start either one. You may change this using
  1213. <span class="command"><strong>bindctl</strong></span>, for example:
  1214. </p><pre class="screen">
  1215. &gt; <strong class="userinput"><code>config add Boss/components b10-resolver</code></strong>
  1216. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/special resolver</code></strong>
  1217. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/kind needed</code></strong>
  1218. &gt; <strong class="userinput"><code>config set Boss/components/b10-resolver/priority 10</code></strong>
  1219. &gt; <strong class="userinput"><code>config commit</code></strong>
  1220. </pre><p>
  1221. </p><p>
  1222. The master <span class="command"><strong>bind10</strong></span> will stop and start
  1223. the desired services.
  1224. </p><p>
  1225. By default, the resolver listens on port 53 for 127.0.0.1 and ::1.
  1226. The following example shows how it can be configured to
  1227. listen on an additional address (and port):
  1228. </p><pre class="screen">
  1229. &gt; <strong class="userinput"><code>config add Resolver/listen_on</code></strong>
  1230. &gt; <strong class="userinput"><code>config set Resolver/listen_on[<em class="replaceable"><code>2</code></em>]/address "192.168.1.1"</code></strong>
  1231. &gt; <strong class="userinput"><code>config set Resolver/listen_on[<em class="replaceable"><code>2</code></em>]/port 53</code></strong>
  1232. &gt; <strong class="userinput"><code>config commit</code></strong>
  1233. </pre><p>
  1234. </p><p>(Replace the <span class="quote">&#8220;<span class="quote"><em class="replaceable"><code>2</code></em></span>&#8221;</span>
  1235. as needed; run <span class="quote">&#8220;<span class="quote"><strong class="userinput"><code>config show
  1236. 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="id1168229440091"></a>12.1. Access Control</h2></div></div></div><p>
  1237. By default, the <span class="command"><strong>b10-resolver</strong></span> daemon only accepts
  1238. DNS queries from the localhost (127.0.0.1 and ::1).
  1239. The <code class="option">Resolver/query_acl</code> configuration may
  1240. be used to reject, drop, or allow specific IPs or networks.
  1241. This configuration list is first match.
  1242. </p><p>
  1243. The configuration's <code class="option">action</code> item may be
  1244. set to <span class="quote">&#8220;<span class="quote">ACCEPT</span>&#8221;</span> to allow the incoming query,
  1245. <span class="quote">&#8220;<span class="quote">REJECT</span>&#8221;</span> to respond with a DNS REFUSED return
  1246. code, or <span class="quote">&#8220;<span class="quote">DROP</span>&#8221;</span> to ignore the query without
  1247. any response (such as a blackhole). For more information,
  1248. see the respective debugging messages: <a class="ulink" href="bind10-messages.html#RESOLVER_QUERY_ACCEPTED" target="_top">RESOLVER_QUERY_ACCEPTED</a>,
  1249. <a class="ulink" href="bind10-messages.html#RESOLVER_QUERY_REJECTED" target="_top">RESOLVER_QUERY_REJECTED</a>,
  1250. and <a class="ulink" href="bind10-messages.html#RESOLVER_QUERY_DROPPED" target="_top">RESOLVER_QUERY_DROPPED</a>.
  1251. </p><p>
  1252. The required configuration's <code class="option">from</code> item is set
  1253. to an IPv4 or IPv6 address, addresses with an network mask, or to
  1254. the special lowercase keywords <span class="quote">&#8220;<span class="quote">any6</span>&#8221;</span> (for
  1255. any IPv6 address) or <span class="quote">&#8220;<span class="quote">any4</span>&#8221;</span> (for any IPv4
  1256. address).
  1257. </p><p>
  1258. For example to allow the <em class="replaceable"><code>192.168.1.0/24</code></em>
  1259. network to use your recursive name server, at the
  1260. <span class="command"><strong>bindctl</strong></span> prompt run:
  1261. </p><pre class="screen">
  1262. &gt; <strong class="userinput"><code>config add Resolver/query_acl</code></strong>
  1263. &gt; <strong class="userinput"><code>config set Resolver/query_acl[<em class="replaceable"><code>2</code></em>]/action "ACCEPT"</code></strong>
  1264. &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>
  1265. &gt; <strong class="userinput"><code>config commit</code></strong>
  1266. </pre><p>(Replace the <span class="quote">&#8220;<span class="quote"><em class="replaceable"><code>2</code></em></span>&#8221;</span>
  1267. as needed; run <span class="quote">&#8220;<span class="quote"><strong class="userinput"><code>config show
  1268. 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
  1269. 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="id1168229440276"></a>12.2. Forwarding</h2></div></div></div><p>
  1270. To enable forwarding, the upstream address and port must be
  1271. configured to forward queries to, such as:
  1272. </p><pre class="screen">
  1273. &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>
  1274. &gt; <strong class="userinput"><code>config commit</code></strong>
  1275. </pre><p>
  1276. (Replace <em class="replaceable"><code>192.168.1.1</code></em> to point to your
  1277. full resolver.)
  1278. </p><p>
  1279. Normal iterative name service can be re-enabled by clearing the
  1280. forwarding address(es); for example:
  1281. </p><pre class="screen">
  1282. &gt; <strong class="userinput"><code>config set Resolver/forward_addresses []</code></strong>
  1283. &gt; <strong class="userinput"><code>config commit</code></strong>
  1284. </pre><p>
  1285. </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
  1286. DHCPv4) and Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
  1287. are protocols that allow one node (server) to provision
  1288. configuration parameters to many hosts and devices (clients). To
  1289. ease deployment in larger networks, additional nodes (relays) may
  1290. be deployed that facilitate communication between servers and
  1291. clients. Even though principles of both DHCPv4 and DHCPv6 are
  1292. somewhat similar, these are two radically different
  1293. protocols. BIND10 offers server implementations for both DHCPv4
  1294. and DHCPv6. This chapter is about DHCP for IPv4. For a description
  1295. 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
  1296. development. You may want to check out <a class="ulink" href="http://bind10.isc.org/wiki/Kea" target="_top">BIND10 DHCP (Kea) wiki</a>
  1297. and recent posts on <a class="ulink" href="https://lists.isc.org/mailman/listinfo/bind10-dev" target="_top">BIND10
  1298. developers mailing list</a>.</p><p>The DHCPv4 and DHCPv6 components in BIND10 architecture are
  1299. 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>
  1300. As of December 2011, both DHCPv4 and DHCPv6 components are
  1301. skeleton servers. That means that while they are capable of
  1302. performing DHCP configuration, they are not fully functional
  1303. yet. In particular, neither has functional lease
  1304. databases. This means that they will assign the same, fixed,
  1305. 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
  1306. detailed description.
  1307. </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
  1308. 2011. It is a skeleton server and can be described as an early
  1309. prototype that is not fully functional yet. It is mature enough
  1310. to conduct first tests in lab environment, but it has
  1311. 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
  1312. details.
  1313. </p><p>
  1314. <span class="command"><strong>b10-dhcp4</strong></span> is a BIND10 component and is being
  1315. run under BIND10 framework. To add a DHCPv4 process to the set of running
  1316. BIND10 services, you can use following commands in <span class="command"><strong>bindctl</strong></span>:
  1317. </p><pre class="screen">&gt; <strong class="userinput"><code>config add Boss/components b10-dhcp4</code></strong>
  1318. &gt; <strong class="userinput"><code>config set Boss/components/b10-dhcp4/kind dispensable</code></strong>
  1319. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  1320. To shutdown running <span class="command"><strong>b10-dhcp4</strong></span>, please use the
  1321. following command:
  1322. </p><pre class="screen">&gt; <strong class="userinput"><code>Dhcp4 shutdown</code></strong></pre><p>
  1323. or
  1324. </p><pre class="screen">&gt; <strong class="userinput"><code>config remove Boss/components b10-dhcp4</code></strong>
  1325. &gt; <strong class="userinput"><code>config commit</code></strong></pre><p>
  1326. At start, the server will detect available network interfaces
  1327. and will attempt to open UDP sockets on all interfaces that
  1328. are up, running, are not loopback, and have IPv4 address
  1329. assigned.
  1330. The server will then listen to incoming traffic. Currently
  1331. supported client messages are DISCOVER and REQUEST. The server
  1332. will respond to them with OFFER and ACK, respectively.
  1333. Since the DHCPv4 server opens privileged ports, it requires root
  1334. access. Make sure you run this daemon as root.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1335. Integration with <span class="command"><strong>bind10</strong></span> is
  1336. planned. Ultimately, <span class="command"><strong>b10-dhcp4</strong></span> will not
  1337. be started directly, but rather via
  1338. <span class="command"><strong>bind10</strong></span>. Please be aware of this planned
  1339. change.
  1340. </p></div></div><div class="section" title="13.2. DHCPv4 Server Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp4-config"></a>13.2. DHCPv4 Server Configuration</h2></div></div></div><p>
  1341. The DHCPv4 server does not have a lease database implemented yet
  1342. nor any support for configuration, so every time the same set
  1343. of configuration options (including the same fixed address)
  1344. will be assigned every time.
  1345. </p><p>
  1346. At this stage of development, the only way to alter the server
  1347. configuration is to tweak its source code. To do so, please
  1348. edit src/bin/dhcp4/dhcp4_srv.cc file and modify following
  1349. parameters and recompile:
  1350. </p><pre class="screen">
  1351. const std::string HARDCODED_LEASE = "192.0.2.222"; // assigned lease
  1352. const std::string HARDCODED_NETMASK = "255.255.255.0";
  1353. const uint32_t HARDCODED_LEASE_TIME = 60; // in seconds
  1354. const std::string HARDCODED_GATEWAY = "192.0.2.1";
  1355. const std::string HARDCODED_DNS_SERVER = "192.0.2.2";
  1356. const std::string HARDCODED_DOMAIN_NAME = "isc.example.com";
  1357. const std::string HARDCODED_SERVER_ID = "192.0.2.1";</pre><p>
  1358. Lease database and configuration support is planned for 2012.
  1359. </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
  1360. supported:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">RFC2131: Supported messages are DISCOVER, OFFER,
  1361. REQUEST, and ACK.</li><li class="listitem">RFC2132: Supported options are: PAD (0),
  1362. END(255), Message Type(53), DHCP Server Identifier (54),
  1363. Domain Name (15), DNS Servers (6), IP Address Lease Time
  1364. (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
  1365. software. Most of them are reflections of the early stage of
  1366. development and should be treated as <span class="quote">&#8220;<span class="quote">not implemented
  1367. 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
  1368. server is expected to send packets to a node that does not
  1369. have IPv4 address assigned yet. The server requires
  1370. certain tricks (or hacks) to transmit such packets. This
  1371. is not implemented yet, therefore DHCPv4 server supports
  1372. relayed traffic only (that is, normal point to point
  1373. communication).</li><li class="listitem"><span class="command"><strong>b10-dhcp4</strong></span> provides a single,
  1374. fixed, hardcoded lease to any client that asks. There is
  1375. no lease manager implemented. If two clients request
  1376. addresses, they will both get the same fixed
  1377. address.</li><li class="listitem"><span class="command"><strong>b10-dhcp4</strong></span> does not support any
  1378. configuration mechanisms yet. The whole configuration is
  1379. currently hardcoded. The only way to tweak configuration
  1380. 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
  1381. interfaces that are not loopback, are up and running and
  1382. have IPv4 address.</li><li class="listitem">PRL (Parameter Request List, a list of options
  1383. requested by a client) is currently ignored and server
  1384. assigns DNS SERVER and DOMAIN NAME options.</li><li class="listitem"><span class="command"><strong>b10-dhcp4</strong></span> does not support
  1385. BOOTP. That is a design choice. This limitation is
  1386. permanent. If you have legacy nodes that can't use DHCP and
  1387. require BOOTP support, please use latest version of ISC DHCP
  1388. <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
  1389. 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
  1390. assigned address is unused. According to RFC2131, the
  1391. allocating server should verify that address is no used by
  1392. sending ICMP echo request.</li><li class="listitem">Address renewal (RENEW), rebinding (REBIND),
  1393. confirmation (CONFIRM), duplication report (DECLINE) and
  1394. 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
  1395. 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
  1396. specified in RFC3315. BIND10 provides DHCPv6 server implementation
  1397. that is described in this chapter. For a description of the DHCPv4
  1398. server implementation, see <a class="xref" href="#dhcp4" title="Chapter 13. DHCPv4 Server">Chapter 13, <i>DHCPv4 Server</i></a>.
  1399. </p><p>The DHCPv6 server component is currently under intense
  1400. development. You may want to check out <a class="ulink" href="http://bind10.isc.org/wiki/Kea" target="_top">BIND10 DHCP (Kea) wiki</a>
  1401. and recent posts on <a class="ulink" href="https://lists.isc.org/mailman/listinfo/bind10-dev" target="_top">BIND10
  1402. developers mailing list</a>.</p><p>The DHCPv4 and DHCPv6 components in BIND10 architecture are
  1403. 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>
  1404. As of December 2011, both DHCPv4 and DHCPv6 components are
  1405. skeleton servers. That means that while they are capable of
  1406. performing DHCP configuration, they are not fully functional
  1407. yet. In particular, neither has functional lease
  1408. databases. This means that they will assign the same, fixed,
  1409. 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
  1410. detailed description.
  1411. </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>
  1412. BIND10 provides the DHCPv6 server component since September
  1413. 2011. It is a skeleton server and can be described as an early
  1414. prototype that is not fully functional yet. It is mature
  1415. enough to conduct first tests in lab environment, but it has
  1416. 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
  1417. details.
  1418. </p><p>
  1419. The DHCPv6 server is implemented as <span class="command"><strong>b10-dhcp6</strong></span>
  1420. daemon. As it is not configurable yet, it is fully autonomous,
  1421. that is it does not interact with <span class="command"><strong>b10-cfgmgr</strong></span>.
  1422. To start DHCPv6 server, simply input:
  1423. </p><pre class="screen">
  1424. #<strong class="userinput"><code>cd src/bin/dhcp6</code></strong>
  1425. #<strong class="userinput"><code>./b10-dhcp6</code></strong>
  1426. </pre><p>
  1427. Depending on your installation, <span class="command"><strong>b10-dhcp6</strong></span>
  1428. binary may reside in src/bin/dhcp6 in your source code
  1429. directory, in /usr/local/bin/b10-dhcp6 or other directory
  1430. you specified during compilation.
  1431. At start, server will detect available network interfaces
  1432. and will attempt to open UDP sockets on all interfaces that
  1433. are up, running, are not loopback, are multicast-capable, and
  1434. have IPv6 address assigned.
  1435. The server will then listen to incoming traffic. Currently
  1436. supported client messages are SOLICIT and REQUEST. The server
  1437. will respond to them with ADVERTISE and REPLY, respectively.
  1438. Since the DHCPv6 server opens privileged ports, it requires root
  1439. access. Make sure you run this daemon as root.
  1440. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  1441. Integration with <span class="command"><strong>bind10</strong></span> is
  1442. planned. Ultimately, <span class="command"><strong>b10-dhcp6</strong></span> will not
  1443. be started directly, but rather via
  1444. <span class="command"><strong>bind10</strong></span>. Please be aware of this planned
  1445. change.
  1446. </p></div></div><div class="section" title="14.2. DHCPv6 Server Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dhcp6-config"></a>14.2. DHCPv6 Server Configuration</h2></div></div></div><p>
  1447. The DHCPv6 server does not have lease database implemented yet
  1448. or any support for configuration, so every time the same set
  1449. of configuration options (including the same fixed address)
  1450. will be assigned every time.
  1451. </p><p>
  1452. At this stage of development, the only way to alter server
  1453. configuration is to tweak its source code. To do so, please
  1454. edit src/bin/dhcp6/dhcp6_srv.cc file and modify following
  1455. parameters and recompile:
  1456. </p><pre class="screen">
  1457. const std::string HARDCODED_LEASE = "2001:db8:1::1234:abcd";
  1458. const uint32_t HARDCODED_T1 = 1500; // in seconds
  1459. const uint32_t HARDCODED_T2 = 2600; // in seconds
  1460. const uint32_t HARDCODED_PREFERRED_LIFETIME = 3600; // in seconds
  1461. const uint32_t HARDCODED_VALID_LIFETIME = 7200; // in seconds
  1462. const std::string HARDCODED_DNS_SERVER = "2001:db8:1::1";</pre><p>
  1463. Lease database and configuration support is planned for 2012.
  1464. </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
  1465. supported:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">RFC3315: Supported messages are SOLICIT,
  1466. ADVERTISE, REQUEST, and REPLY. Supported options are
  1467. 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
  1468. software. Most of them are reflections of the early stage of
  1469. development and should be treated as <span class="quote">&#8220;<span class="quote">not implemented
  1470. yet</span>&#8221;</span>, rather than actual limitations.</p><p>
  1471. </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,
  1472. fixed, hardcoded lease to any client that asks. There is no
  1473. lease manager implemented. If two clients request addresses,
  1474. they will both get the same fixed address.</li><li class="listitem"><span class="command"><strong>b10-dhcp6</strong></span> does not support any
  1475. configuration mechanisms yet. The whole configuration is
  1476. currently hardcoded. The only way to tweak configuration
  1477. 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
  1478. interfaces that are not loopback, are up, running and are
  1479. multicast capable and have IPv6 address. Support for
  1480. multiple interfaces is not coded in reception routines yet,
  1481. so if you are running this code on a machine that has many
  1482. interfaces and <span class="command"><strong>b10-dhcp6</strong></span> happens to
  1483. listen on wrong interface, the easiest way to work around
  1484. this problem is to turn down other interfaces. This
  1485. limitation will be fixed shortly.</li><li class="listitem">ORO (Option Request Option, a list of options
  1486. requested by a client) is currently ignored and server
  1487. 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),
  1488. confirmation (CONFIRM), duplication report (DECLINE) and
  1489. 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
  1490. 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
  1491. default, and cannot be disabled.</li></ul></div><p>
  1492. </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
  1493. many DHCP-related tasks, like DHCPv4 and DHCPv6 packets parsing,
  1494. manipulation and assembly, option parsing, manipulation and
  1495. assembly, network interface detection and socket operations, like
  1496. socket creations, data transmission and reception and socket
  1497. closing.
  1498. </p><p>
  1499. While this library is currently used by
  1500. <span class="command"><strong>b10-dhcp4</strong></span> and <span class="command"><strong>b10-dhcp6</strong></span>
  1501. only, it is designed to be portable, universal library useful for
  1502. any kind of DHCP-related software.
  1503. </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
  1504. interface detection routines. Interface detection is
  1505. currently only supported on Linux systems.</p><p>For non-Linux systems, there is currently stub
  1506. implementation provided. Interface manager detects loopback
  1507. interfaces only as their name (lo or lo0) can be easily predicted.
  1508. Please contact BIND10 development team if you are interested
  1509. 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>
  1510. The <span class="command"><strong>b10-stats</strong></span> process is started by
  1511. <span class="command"><strong>bind10</strong></span>.
  1512. It periodically collects statistics data from various modules
  1513. and aggregates it.
  1514. </p><p>
  1515. This stats daemon provides commands to identify if it is
  1516. running, show specified or all statistics data, show specified
  1517. or all statistics data schema, and set specified statistics
  1518. data.
  1519. For example, using <span class="command"><strong>bindctl</strong></span>:
  1520. </p><pre class="screen">
  1521. &gt; <strong class="userinput"><code>Stats show</code></strong>
  1522. {
  1523. "Auth": {
  1524. "opcode.iquery": 0,
  1525. "opcode.notify": 10,
  1526. "opcode.query": 869617,
  1527. ...
  1528. "queries.tcp": 1749,
  1529. "queries.udp": 867868
  1530. },
  1531. "Boss": {
  1532. "boot_time": "2011-01-20T16:59:03Z"
  1533. },
  1534. "Stats": {
  1535. "boot_time": "2011-01-20T16:59:05Z",
  1536. "last_update_time": "2011-01-20T17:04:05Z",
  1537. "lname": "4d3869d9_a@jreed.example.net",
  1538. "report_time": "2011-01-20T17:04:06Z",
  1539. "timestamp": 1295543046.823504
  1540. }
  1541. }
  1542. </pre><p>
  1543. </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="#id1168229440926">17.1. Logging configuration</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168229440937">17.1.1. Loggers</a></span></dt><dt><span class="section"><a href="#id1168229441248">17.1.2. Output Options</a></span></dt><dt><span class="section"><a href="#id1168229441431">17.1.3. Example session</a></span></dt></dl></dd><dt><span class="section"><a href="#id1168229441640">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="id1168229440926"></a>17.1. Logging configuration</h2></div></div></div><p>
  1544. The logging system in BIND 10 is configured through the
  1545. Logging module. All BIND 10 modules will look at the
  1546. configuration in Logging to see what should be logged and
  1547. to where.
  1548. </p><div class="section" title="17.1.1. Loggers"><div class="titlepage"><div><div><h3 class="title"><a name="id1168229440937"></a>17.1.1. Loggers</h3></div></div></div><p>
  1549. Within BIND 10, a message is logged through a component
  1550. called a "logger". Different parts of BIND 10 log messages
  1551. through different loggers, and each logger can be configured
  1552. independently of one another.
  1553. </p><p>
  1554. In the Logging module, you can specify the configuration
  1555. for zero or more loggers; any that are not specified will
  1556. take appropriate default values.
  1557. </p><p>
  1558. The three most important elements of a logger configuration
  1559. are the <code class="option">name</code> (the component that is
  1560. generating the messages), the <code class="option">severity</code>
  1561. (what to log), and the <code class="option">output_options</code>
  1562. (where to log).
  1563. </p><div class="section" title="17.1.1.1. name (string)"><div class="titlepage"><div><div><h4 class="title"><a name="id1168229440962"></a>17.1.1.1. name (string)</h4></div></div></div><p>
  1564. Each logger in the system has a name, the name being that
  1565. of the component using it to log messages. For instance,
  1566. if you want to configure logging for the resolver module,
  1567. you add an entry for a logger named <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>. This
  1568. configuration will then be used by the loggers in the
  1569. Resolver module, and all the libraries used by it.
  1570. </p><p>
  1571. If you want to specify logging for one specific library
  1572. within the module, you set the name to
  1573. <em class="replaceable"><code>module.library</code></em>. For example, the
  1574. logger used by the nameserver address store component
  1575. has the full name of <span class="quote">&#8220;<span class="quote">Resolver.nsas</span>&#8221;</span>. If
  1576. there is no entry in Logging for a particular library,
  1577. it will use the configuration given for the module.
  1578. </p><p>
  1579. To illustrate this, suppose you want the cache library
  1580. to log messages of severity DEBUG, and the rest of the
  1581. resolver code to log messages of severity INFO. To achieve
  1582. this you specify two loggers, one with the name
  1583. <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span> and severity INFO, and one with
  1584. the name <span class="quote">&#8220;<span class="quote">Resolver.cache</span>&#8221;</span> with severity
  1585. DEBUG. As there are no entries for other libraries (e.g.
  1586. the nsas), they will use the configuration for the module
  1587. (<span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>), so giving the desired behavior.
  1588. </p><p>
  1589. One special case is that of a module name of <span class="quote">&#8220;<span class="quote">*</span>&#8221;</span>
  1590. (asterisks), which is interpreted as <span class="emphasis"><em>any</em></span>
  1591. module. You can set global logging options by using this,
  1592. including setting the logging configuration for a library
  1593. that is used by multiple modules (e.g. <span class="quote">&#8220;<span class="quote">*.config</span>&#8221;</span>
  1594. specifies the configuration library code in whatever
  1595. module is using it).
  1596. </p><p>
  1597. If there are multiple logger specifications in the
  1598. configuration that might match a particular logger, the
  1599. specification with the more specific logger name takes
  1600. precedence. For example, if there are entries for for
  1601. both <span class="quote">&#8220;<span class="quote">*</span>&#8221;</span> and <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>, the
  1602. resolver module &#8212; and all libraries it uses &#8212;
  1603. will log messages according to the configuration in the
  1604. second entry (<span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>). All other modules
  1605. will use the configuration of the first entry
  1606. (<span class="quote">&#8220;<span class="quote">*</span>&#8221;</span>). If there was also a configuration
  1607. entry for <span class="quote">&#8220;<span class="quote">Resolver.cache</span>&#8221;</span>, the cache library
  1608. within the resolver would use that in preference to the
  1609. entry for <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>.
  1610. </p><p>
  1611. One final note about the naming. When specifying the
  1612. module name within a logger, use the name of the module
  1613. as specified in <span class="command"><strong>bindctl</strong></span>, e.g.
  1614. <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span> for the resolver module,
  1615. <span class="quote">&#8220;<span class="quote">Xfrout</span>&#8221;</span> for the xfrout module, etc. When
  1616. the message is logged, the message will include the name
  1617. of the logger generating the message, but with the module
  1618. name replaced by the name of the process implementing
  1619. the module (so for example, a message generated by the
  1620. <span class="quote">&#8220;<span class="quote">Auth.cache</span>&#8221;</span> logger will appear in the output
  1621. with a logger name of <span class="quote">&#8220;<span class="quote">b10-auth.cache</span>&#8221;</span>).
  1622. </p></div><div class="section" title="17.1.1.2. severity (string)"><div class="titlepage"><div><div><h4 class="title"><a name="id1168229441130"></a>17.1.1.2. severity (string)</h4></div></div></div><p>
  1623. This specifies the category of messages logged.
  1624. Each message is logged with an associated severity which
  1625. may be one of the following (in descending order of
  1626. severity):
  1627. </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>
  1628. When the severity of a logger is set to one of these
  1629. values, it will only log messages of that severity, and
  1630. the severities above it. The severity may also be set to
  1631. NONE, in which case all messages from that logger are
  1632. inhibited.
  1633. </p></div><div class="section" title="17.1.1.3. output_options (list)"><div class="titlepage"><div><div><h4 class="title"><a name="id1168229441180"></a>17.1.1.3. output_options (list)</h4></div></div></div><p>
  1634. Each logger can have zero or more
  1635. <code class="option">output_options</code>. These specify where log
  1636. messages are sent to. These are explained in detail below.
  1637. </p><p>
  1638. The other options for a logger are:
  1639. </p></div><div class="section" title="17.1.1.4. debuglevel (integer)"><div class="titlepage"><div><div><h4 class="title"><a name="id1168229441197"></a>17.1.1.4. debuglevel (integer)</h4></div></div></div><p>
  1640. When a logger's severity is set to DEBUG, this value
  1641. specifies what debug messages should be printed. It ranges
  1642. from 0 (least verbose) to 99 (most verbose).
  1643. </p><p>
  1644. If severity for the logger is not DEBUG, this value is ignored.
  1645. </p></div><div class="section" title="17.1.1.5. additive (true or false)"><div class="titlepage"><div><div><h4 class="title"><a name="id1168229441212"></a>17.1.1.5. additive (true or false)</h4></div></div></div><p>
  1646. If this is true, the <code class="option">output_options</code> from
  1647. the parent will be used. For example, if there are two
  1648. loggers configured; <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span> and
  1649. <span class="quote">&#8220;<span class="quote">Resolver.cache</span>&#8221;</span>, and <code class="option">additive</code>
  1650. is true in the second, it will write the log messages
  1651. not only to the destinations specified for
  1652. <span class="quote">&#8220;<span class="quote">Resolver.cache</span>&#8221;</span>, but also to the destinations
  1653. as specified in the <code class="option">output_options</code> in
  1654. the logger named <span class="quote">&#8220;<span class="quote">Resolver</span>&#8221;</span>.
  1655. </p></div></div><div class="section" title="17.1.2. Output Options"><div class="titlepage"><div><div><h3 class="title"><a name="id1168229441248"></a>17.1.2. Output Options</h3></div></div></div><p>
  1656. The main settings for an output option are the
  1657. <code class="option">destination</code> and a value called
  1658. <code class="option">output</code>, the meaning of which depends on
  1659. the destination that is set.
  1660. </p><div class="section" title="17.1.2.1. destination (string)"><div class="titlepage"><div><div><h4 class="title"><a name="id1168229441264"></a>17.1.2.1. destination (string)</h4></div></div></div><p>
  1661. The destination is the type of output. It can be one of:
  1662. </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="id1168229441296"></a>17.1.2.2. output (string)</h4></div></div></div><p>
  1663. Depending on what is set as the output destination, this
  1664. value is interpreted as follows:
  1665. </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>
  1666. The value of output must be one of <span class="quote">&#8220;<span class="quote">stdout</span>&#8221;</span>
  1667. (messages printed to standard output) or
  1668. <span class="quote">&#8220;<span class="quote">stderr</span>&#8221;</span> (messages printed to standard
  1669. error).
  1670. </p><p>
  1671. Note: if output is set to <span class="quote">&#8220;<span class="quote">stderr</span>&#8221;</span> and a lot of
  1672. messages are produced in a short time (e.g. if the logging
  1673. level is set to DEBUG), you may occasionally see some messages
  1674. jumbled up together. This is due to a combination of the way
  1675. that messages are written to the screen and the unbuffered
  1676. nature of the standard error stream. If this occurs, it is
  1677. recommended that output be set to <span class="quote">&#8220;<span class="quote">stdout</span>&#8221;</span>.
  1678. </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>
  1679. The value of output is interpreted as a file name;
  1680. log messages will be appended to this file.
  1681. </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>
  1682. The value of output is interpreted as the
  1683. <span class="command"><strong>syslog</strong></span> facility (e.g.
  1684. <span class="emphasis"><em>local0</em></span>) that should be used
  1685. for log messages.
  1686. </p></dd></dl></div><p>
  1687. The other options for <code class="option">output_options</code> are:
  1688. </p><div class="section" title="17.1.2.2.1. flush (true of false)"><div class="titlepage"><div><div><h5 class="title"><a name="id1168229441389"></a>17.1.2.2.1. flush (true of false)</h5></div></div></div><p>
  1689. Flush buffers after each log message. Doing this will
  1690. reduce performance but will ensure that if the program
  1691. terminates abnormally, all messages up to the point of
  1692. termination are output.
  1693. </p></div><div class="section" title="17.1.2.2.2. maxsize (integer)"><div class="titlepage"><div><div><h5 class="title"><a name="id1168229441400"></a>17.1.2.2.2. maxsize (integer)</h5></div></div></div><p>
  1694. Only relevant when destination is file, this is maximum
  1695. file size of output files in bytes. When the maximum
  1696. size is reached, the file is renamed and a new file opened.
  1697. (For example, a ".1" is appended to the name &#8212;
  1698. if a ".1" file exists, it is renamed ".2",
  1699. etc.)
  1700. </p><p>
  1701. If this is 0, no maximum file size is used.
  1702. </p></div><div class="section" title="17.1.2.2.3. maxver (integer)"><div class="titlepage"><div><div><h5 class="title"><a name="id1168229441413"></a>17.1.2.2.3. maxver (integer)</h5></div></div></div><p>
  1703. Maximum number of old log files to keep around when
  1704. rolling the output file. Only relevant when
  1705. <code class="option">destination</code> is <span class="quote">&#8220;<span class="quote">file</span>&#8221;</span>.
  1706. </p></div></div></div><div class="section" title="17.1.3. Example session"><div class="titlepage"><div><div><h3 class="title"><a name="id1168229441431"></a>17.1.3. Example session</h3></div></div></div><p>
  1707. In this example we want to set the global logging to
  1708. write to the file <code class="filename">/var/log/my_bind10.log</code>,
  1709. at severity WARN. We want the authoritative server to
  1710. log at DEBUG with debuglevel 40, to a different file
  1711. (<code class="filename">/tmp/debug_messages</code>).
  1712. </p><p>
  1713. Start <span class="command"><strong>bindctl</strong></span>.
  1714. </p><p>
  1715. </p><pre class="screen">["login success "]
  1716. &gt; <strong class="userinput"><code>config show Logging</code></strong>
  1717. Logging/loggers [] list
  1718. </pre><p>
  1719. </p><p>
  1720. By default, no specific loggers are configured, in which
  1721. case the severity defaults to INFO and the output is
  1722. written to stderr.
  1723. </p><p>
  1724. Let's first add a default logger:
  1725. </p><p>
  1726. </p><pre class="screen"><strong class="userinput"><code>&gt; config add Logging/loggers</code></strong>
  1727. &gt; <strong class="userinput"><code>config show Logging</code></strong>
  1728. Logging/loggers/ list (modified)
  1729. </pre><p>
  1730. </p><p>
  1731. The loggers value line changed to indicate that it is no
  1732. longer an empty list:
  1733. </p><p>
  1734. </p><pre class="screen">&gt; <strong class="userinput"><code>config show Logging/loggers</code></strong>
  1735. Logging/loggers[0]/name "" string (default)
  1736. Logging/loggers[0]/severity "INFO" string (default)
  1737. Logging/loggers[0]/debuglevel 0 integer (default)
  1738. Logging/loggers[0]/additive false boolean (default)
  1739. Logging/loggers[0]/output_options [] list (default)
  1740. </pre><p>
  1741. </p><p>
  1742. The name is mandatory, so we must set it. We will also
  1743. change the severity as well. Let's start with the global
  1744. logger.
  1745. </p><p>
  1746. </p><pre class="screen">&gt; <strong class="userinput"><code>config set Logging/loggers[0]/name *</code></strong>
  1747. &gt; <strong class="userinput"><code>config set Logging/loggers[0]/severity WARN</code></strong>
  1748. &gt; <strong class="userinput"><code>config show Logging/loggers</code></strong>
  1749. Logging/loggers[0]/name "*" string (modified)
  1750. Logging/loggers[0]/severity "WARN" string (modified)
  1751. Logging/loggers[0]/debuglevel 0 integer (default)
  1752. Logging/loggers[0]/additive false boolean (default)
  1753. Logging/loggers[0]/output_options [] list (default)
  1754. </pre><p>
  1755. </p><p>
  1756. Of course, we need to specify where we want the log
  1757. messages to go, so we add an entry for an output option.
  1758. </p><p>
  1759. </p><pre class="screen">&gt; <strong class="userinput"><code> config add Logging/loggers[0]/output_options</code></strong>
  1760. &gt; <strong class="userinput"><code> config show Logging/loggers[0]/output_options</code></strong>
  1761. Logging/loggers[0]/output_options[0]/destination "console" string (default)
  1762. Logging/loggers[0]/output_options[0]/output "stdout" string (default)
  1763. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  1764. Logging/loggers[0]/output_options[0]/maxsize 0 integer (default)
  1765. Logging/loggers[0]/output_options[0]/maxver 0 integer (default)
  1766. </pre><p>
  1767. </p><p>
  1768. These aren't the values we are looking for.
  1769. </p><p>
  1770. </p><pre class="screen">&gt; <strong class="userinput"><code> config set Logging/loggers[0]/output_options[0]/destination file</code></strong>
  1771. &gt; <strong class="userinput"><code> config set Logging/loggers[0]/output_options[0]/output /var/log/bind10.log</code></strong>
  1772. &gt; <strong class="userinput"><code> config set Logging/loggers[0]/output_options[0]/maxsize 204800</code></strong>
  1773. &gt; <strong class="userinput"><code> config set Logging/loggers[0]/output_options[0]/maxver 8</code></strong>
  1774. </pre><p>
  1775. </p><p>
  1776. Which would make the entire configuration for this logger
  1777. look like:
  1778. </p><p>
  1779. </p><pre class="screen">&gt; <strong class="userinput"><code> config show all Logging/loggers</code></strong>
  1780. Logging/loggers[0]/name "*" string (modified)
  1781. Logging/loggers[0]/severity "WARN" string (modified)
  1782. Logging/loggers[0]/debuglevel 0 integer (default)
  1783. Logging/loggers[0]/additive false boolean (default)
  1784. Logging/loggers[0]/output_options[0]/destination "file" string (modified)
  1785. Logging/loggers[0]/output_options[0]/output "/var/log/bind10.log" string (modified)
  1786. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  1787. Logging/loggers[0]/output_options[0]/maxsize 204800 integer (modified)
  1788. Logging/loggers[0]/output_options[0]/maxver 8 integer (modified)
  1789. </pre><p>
  1790. </p><p>
  1791. That looks OK, so let's commit it before we add the
  1792. configuration for the authoritative server's logger.
  1793. </p><p>
  1794. </p><pre class="screen">&gt; <strong class="userinput"><code> config commit</code></strong></pre><p>
  1795. </p><p>
  1796. Now that we have set it, and checked each value along
  1797. the way, adding a second entry is quite similar.
  1798. </p><p>
  1799. </p><pre class="screen">&gt; <strong class="userinput"><code> config add Logging/loggers</code></strong>
  1800. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/name Auth</code></strong>
  1801. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/severity DEBUG</code></strong>
  1802. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/debuglevel 40</code></strong>
  1803. &gt; <strong class="userinput"><code> config add Logging/loggers[1]/output_options</code></strong>
  1804. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/output_options[0]/destination file</code></strong>
  1805. &gt; <strong class="userinput"><code> config set Logging/loggers[1]/output_options[0]/output /tmp/auth_debug.log</code></strong>
  1806. &gt; <strong class="userinput"><code> config commit</code></strong>
  1807. </pre><p>
  1808. </p><p>
  1809. And that's it. Once we have found whatever it was we
  1810. needed the debug messages for, we can simply remove the
  1811. second logger to let the authoritative server use the
  1812. same settings as the rest.
  1813. </p><p>
  1814. </p><pre class="screen">&gt; <strong class="userinput"><code> config remove Logging/loggers[1]</code></strong>
  1815. &gt; <strong class="userinput"><code> config commit</code></strong>
  1816. </pre><p>
  1817. </p><p>
  1818. And every module will now be using the values from the
  1819. logger named <span class="quote">&#8220;<span class="quote">*</span>&#8221;</span>.
  1820. </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="id1168229441640"></a>17.2. Logging Message Format</h2></div></div></div><p>
  1821. Each message written by BIND 10 to the configured logging
  1822. destinations comprises a number of components that identify
  1823. the origin of the message and, if the message indicates
  1824. a problem, information about the problem that may be
  1825. useful in fixing it.
  1826. </p><p>
  1827. Consider the message below logged to a file:
  1828. </p><pre class="screen">2011-06-15 13:48:22.034 ERROR [b10-resolver.asiolink]
  1829. ASIODNS_OPENSOCK error 111 opening TCP socket to 127.0.0.1(53)</pre><p>
  1830. </p><p>
  1831. Note: the layout of messages written to the system logging
  1832. file (syslog) may be slightly different. This message has
  1833. been split across two lines here for display reasons; in the
  1834. logging file, it will appear on one line.)
  1835. </p><p>
  1836. The log message comprises a number of components:
  1837. </p><div class="variablelist"><dl><dt><span class="term">2011-06-15 13:48:22.034</span></dt><dd><p>
  1838. The date and time at which the message was generated.
  1839. </p></dd><dt><span class="term">ERROR</span></dt><dd><p>
  1840. The severity of the message.
  1841. </p></dd><dt><span class="term">[b10-resolver.asiolink]</span></dt><dd><p>
  1842. The source of the message. This comprises two components:
  1843. the BIND 10 process generating the message (in this
  1844. case, <span class="command"><strong>b10-resolver</strong></span>) and the module
  1845. within the program from which the message originated
  1846. (which in the example is the asynchronous I/O link
  1847. module, asiolink).
  1848. </p></dd><dt><span class="term">ASIODNS_OPENSOCK</span></dt><dd><p>
  1849. The message identification. Every message in BIND 10
  1850. has a unique identification, which can be used as an
  1851. index into the <a class="ulink" href="bind10-messages.html" target="_top"><em class="citetitle">BIND 10 Messages
  1852. 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.
  1853. </p></dd><dt><span class="term">error 111 opening TCP socket to 127.0.0.1(53)</span></dt><dd><p>
  1854. A brief description of the cause of the problem.
  1855. Within this text, information relating to the condition
  1856. that caused the message to be logged will be included.
  1857. In this example, error number 111 (an operating
  1858. system-specific error number) was encountered when
  1859. trying to open a TCP connection to port 53 on the
  1860. local system (address 127.0.0.1). The next step
  1861. would be to find out the reason for the failure by
  1862. consulting your system's documentation to identify
  1863. what error number 111 means.
  1864. </p></dd></dl></div><p>
  1865. </p></div></div></div></body></html>