bind10-guide.html 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  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="This is the reference guide for BIND 10. The most up-to-date version of this document, 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="id1168230342594"></a>BIND 10 Guide</h1></div><div><h2 class="subtitle">Administrator Reference for BIND 10</h2></div><div><p class="copyright">Copyright © 2010 Internet Systems Consortium, Inc.</p></div><div><div class="abstract" title="Abstract"><p class="title"><b>Abstract</b></p><p>This is the reference guide for BIND 10.</p><p>
  2. The most up-to-date version of this document, along with other documents
  3. for BIND 10, can be found at
  4. <a class="ulink" href="http://bind10.isc.org/docs" target="_top">http://bind10.isc.org/docs</a>.
  5. </p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230342718">Supported Platforms</a></span></dt><dt><span class="section"><a href="#id1168230342746">Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">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="#id1168230328120">Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">Quick start</a></span></dt><dt><span class="section"><a href="#install">Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328382">Download Tar File</a></span></dt><dt><span class="section"><a href="#id1168230328403">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230328464">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328600">Build</a></span></dt><dt><span class="section"><a href="#id1168230328615">Install</a></span></dt><dt><span class="section"><a href="#id1168230328645">Install Hierarchy</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#bind10">3. Starting BIND10 with <span class="command"><strong>bind10</strong></span></a></span></dt><dd><dl><dt><span class="section"><a href="#start">Starting BIND 10</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">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="#id1168230329212">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329277">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329307">Loading Master Zones Files</a></span></dt></dl></dd><dt><span class="chapter"><a href="#xfrin">9. Incoming Zone Transfers</a></span></dt><dt><span class="chapter"><a href="#xfrout">10. Outbound Zone Transfers</a></span></dt></dl></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="#id1168230342718">Supported Platforms</a></span></dt><dt><span class="section"><a href="#id1168230342746">Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">Managing BIND 10</a></span></dt></dl></div><p>
  6. BIND is the popular implementation of a DNS server, developer
  7. interfaces, and DNS tools.
  8. BIND 10 is a rewrite of BIND 9. BIND 10 is written in C++ and Python
  9. and provides a modular environment for serving and maintaining DNS.
  10. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  11. This guide covers the experimental prototype version of
  12. BIND 10.
  13. </p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  14. BIND 10, at this time, does not provide an recursive
  15. DNS server. It does provide a EDNS0- and DNSSEC-capable
  16. authoritative DNS server.
  17. </p></div><div class="section" title="Supported Platforms"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230342718"></a>Supported Platforms</h2></div></div></div><p>
  18. BIND 10 builds have been tested on Debian GNU/Linux 5,
  19. Ubuntu 9.10, NetBSD 5, Solaris 10, FreeBSD 7, and CentOS
  20. Linux 5.3.
  21. It has been tested on Sparc, i386, and amd64 hardware
  22. platforms.
  23. It is planned for BIND 10 to build, install and run on
  24. Windows and standard Unix-type platforms.
  25. </p></div><div class="section" title="Required Software"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230342746"></a>Required Software</h2></div></div></div><p>
  26. BIND 10 requires Python 3.1. Later versions may work, but Python
  27. 3.1 is the minimum version which will work.
  28. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  29. For this development prototype release, the only supported
  30. data source backend is SQLite3. The authoritative server
  31. requires SQLite 3.3.9 or newer.
  32. The <span class="command"><strong>b10-xfrin</strong></span> and <span class="command"><strong>b10-xfrout</strong></span>
  33. modules require the libboost library, libpython3 library,
  34. and the Python _sqlite3.so module.
  35. </p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  36. Some operating systems do not provide these dependencies
  37. in their default installation nor standard packages
  38. collections.
  39. You may need to install them separately.
  40. </p></div></div><div class="section" title="Starting and Stopping the Server"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="starting_stopping"></a>Starting and Stopping the Server</h2></div></div></div><p>
  41. BIND 10 is modular. Part of this modularity is
  42. accomplished using multiple cooperating processes which, together,
  43. provide DNS functionality. This is a change from the previous generation
  44. of BIND software, which used a single process.
  45. </p><p>
  46. At first, running many different processes may seem confusing. However,
  47. these processes are started, stopped, and maintained by a single command,
  48. <span class="command"><strong>bind10</strong></span>. Additionally, the processes started by
  49. the <span class="command"><strong>bind10</strong></span> command have names starting with "b10-".
  50. </p><p>
  51. Starting and stopping the server is performed by a single command,
  52. <span class="command"><strong>bind10</strong></span>. This command starts a master process
  53. which will start other processes as needed.
  54. </p><p>
  55. Most of these are run automatically by a single command,
  56. <span class="command"><strong>bind10</strong></span> and should not be run manually.
  57. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
  58. <span class="command"><strong>b10-msgq</strong></span> &#8212;
  59. message bus daemon.
  60. This process coordinates communication between all of the other
  61. BIND 10 processes.
  62. </li><li class="listitem">
  63. <span class="command"><strong>b10-auth</strong></span> &#8212;
  64. authoritative DNS server.
  65. This process serves DNS requests.
  66. </li><li class="listitem">
  67. <span class="command"><strong>b10-cfgmgr</strong></span> &#8212;
  68. configuration manager.
  69. This process maintains all of the configuration for BIND 10.
  70. </li><li class="listitem">
  71. <span class="command"><strong>b10-cmdctl</strong></span> &#8212;
  72. command and control service.
  73. This process allows external control of the BIND 10 system.
  74. </li><li class="listitem">
  75. <span class="command"><strong>b10-xfrin</strong></span> &#8212;
  76. Incoming zone transfer service.
  77. This process is used to transfer a new copy
  78. of a zone into BIND 10, when acting as a secondary server.
  79. </li><li class="listitem">
  80. <span class="command"><strong>b10-xfrout</strong></span> &#8212;
  81. Outgoing zone transfer service.
  82. This process is used to handle transfer requests to
  83. send a local zone to a remote secondary server,
  84. when acting as a master server.
  85. </li></ul></div><p>
  86. </p></div><div class="section" title="Managing BIND 10"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="managing_once_running"></a>Managing BIND 10</h2></div></div></div><p>
  87. Once BIND 10 is running, a few commands are used to interact
  88. directly with the system:
  89. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
  90. <span class="command"><strong>bindctl</strong></span> &#8212;
  91. interactive administration interface.
  92. This is a command-line tool which allows an administrator
  93. to control BIND 10.
  94. </li><li class="listitem">
  95. <span class="command"><strong>b10-loadzone</strong></span> &#8212;
  96. zone file loader.
  97. This tool will load standard masterfile-format zone files into
  98. BIND 10.
  99. </li><li class="listitem">
  100. <span class="command"><strong>b10-cmdctl-usermgr</strong></span> &#8212;
  101. user access control.
  102. This tool allows an administrator to authorize additional users
  103. to manage BIND 10.
  104. </li></ul></div><p>
  105. </p></div><p>
  106. The tools and modules are covered in full detail in this guide.
  107. In addition, manual pages are also provided in the default installation.
  108. </p><p>
  109. BIND 10 also provides libraries and programmer interfaces
  110. for C++ and Python for the message bus, configuration backend,
  111. and, of course, DNS. These include detailed developer
  112. documentation and code examples.
  113. </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="#id1168230328120">Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">Quick start</a></span></dt><dt><span class="section"><a href="#install">Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328382">Download Tar File</a></span></dt><dt><span class="section"><a href="#id1168230328403">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230328464">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328600">Build</a></span></dt><dt><span class="section"><a href="#id1168230328615">Install</a></span></dt><dt><span class="section"><a href="#id1168230328645">Install Hierarchy</a></span></dt></dl></dd></dl></div><div class="section" title="Building Requirements"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230328120"></a>Building Requirements</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  114. Some operating systems have split their distribution packages into
  115. a run-time and a development package. You will need to install
  116. the development package versions, which include header files and
  117. libraries, to build BIND 10 from source code.
  118. </p></div><p>
  119. Building from source code requires the Boost
  120. build-time headers. At least Boost version 1.34 is required.
  121. </p><p>
  122. The Boost Library, Boost Python library, Python Library,
  123. and Python _sqlite3 module are required to enable the
  124. Xfrout and Xfrin support.
  125. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  126. The Python related libraries and modules need to be built
  127. for Python 3.1.
  128. </p></div><p>
  129. If the Boost System Library is detected at configure time,
  130. BIND 10 will be built using an alternative method for
  131. networking I/O using Boost ASIO support. This provides
  132. asynchrony support; with ASIO the Authoritative DNS server
  133. can handle other queries while the processing of a TCP
  134. transaction stalls.
  135. This dependency is not required unless you need
  136. this feature as TCP transport support is
  137. provided using alternative code.
  138. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  139. We recommend using the Boost libraries as it provides a safer TCP
  140. implementation in BIND 10.
  141. </p></div><p>
  142. Building BIND 10 also requires a C++ compiler and
  143. standard development headers.
  144. BIND 10 builds have been tested with GCC g++ 3.4.3, 4.1.2,
  145. 4.1.3, 4.2.1, 4.3.2, and 4.4.1.
  146. </p></div><div class="section" title="Quick start"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="quickstart"></a>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>
  147. This quickly covers the standard steps for installing
  148. and deploying BIND 10 as an authoritative name server using
  149. its defaults. For troubleshooting, full customizations and further
  150. details, see the respective chapters in the BIND 10 guide.
  151. </p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  152. The development prototype of the b10-auth server listens on
  153. 0.0.0.0 (all interfaces) port 5300. (This is not the standard
  154. domain service port.)
  155. </p></div><p>
  156. To quickly get started with BIND 10, follow these steps.
  157. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
  158. Install required build dependencies.
  159. </li><li class="listitem">
  160. Download the BIND 10 source tar file from
  161. <a class="ulink" href="ftp://ftp.isc.org/isc/bind10/" target="_top">ftp://ftp.isc.org/isc/bind10/</a>.
  162. </li><li class="listitem"><p>Extract the tar file:
  163. </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>
  164. </p></li><li class="listitem"><p>Go into the source and run configure:
  165. </p><pre class="screen">$ <strong class="userinput"><code>cd bind10-<em class="replaceable"><code>VERSION</code></em></code></strong>
  166. $ <strong class="userinput"><code>./configure</code></strong></pre><p>
  167. </p></li><li class="listitem"><p>Build it:
  168. </p><pre class="screen">$ <strong class="userinput"><code>make</code></strong></pre><p>
  169. </p></li><li class="listitem"><p>Install it (to default /usr/local):
  170. </p><pre class="screen">$ <strong class="userinput"><code>make install</code></strong></pre><p>
  171. </p></li><li class="listitem"><p>Start the server:
  172. </p><pre class="screen">$ <strong class="userinput"><code>/usr/local/sbin/bind10</code></strong></pre><p>
  173. </p></li><li class="listitem"><p>Test it; for example:
  174. </p><pre class="screen">$ <strong class="userinput"><code>dig @127.0.0.1 -p 5300 -c CH -t TXT authors.bind</code></strong></pre><p>
  175. </p></li><li class="listitem"><p>Load desired zone file(s), for example:
  176. </p><pre class="screen">$ <strong class="userinput"><code>b10-loadzone <em class="replaceable"><code>your.zone.example.org</code></em></code></strong></pre><p>
  177. </p></li><li class="listitem">
  178. Test the new zone.
  179. </li></ol></div></div><div class="section" title="Installation from source"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="install"></a>Installation from source</h2></div></div></div><p>
  180. BIND 10 is open source software written in C++ and Python.
  181. It is freely available in source code form from ISC via
  182. the Subversion code revision control system or as a downloadable
  183. tar file. It may also be available in pre-compiled ready-to-use
  184. packages from operating system vendors.
  185. </p><div class="section" title="Download Tar File"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328382"></a>Download Tar File</h3></div></div></div><p>
  186. Downloading a release tar file is the recommended method to
  187. obtain the source code.
  188. </p><p>
  189. The BIND 10 releases are available as tar file downloads from
  190. <a class="ulink" href="ftp://ftp.isc.org/isc/bind10/" target="_top">ftp://ftp.isc.org/isc/bind10/</a>.
  191. Periodic development snapshots may also be available.
  192. </p></div><div class="section" title="Retrieve from Subversion"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328403"></a>Retrieve from Subversion</h3></div></div></div><p>
  193. Downloading this "bleeding edge" code is recommended only for
  194. developers or advanced users. Using development code in a production
  195. environment is not recommended.
  196. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  197. When using source code retrieved via Subversion additional
  198. software will be required: automake (v1.11 or newer),
  199. libtoolize, and autoconf (2.59 or newer).
  200. These may need to be installed.
  201. </p></div><p>
  202. The latest development code, including temporary experiments
  203. and un-reviewed code, is available via the BIND 10 code revision
  204. control system. This is powered by Subversion and all the BIND 10
  205. development is public.
  206. The leading development is done in the <span class="quote">&#8220;<span class="quote">trunk</span>&#8221;</span>.
  207. </p><p>
  208. The code can be checked out from <code class="filename">svn://bind10.isc.org/svn/bind10</code>; for example to check out the trunk:
  209. </p><pre class="screen">$ <strong class="userinput"><code>svn co svn://bind10.isc.org/svn/bind10/trunk</code></strong></pre><p>
  210. </p><p>
  211. When checking out the code from
  212. the code version control system, it doesn't include the
  213. generated configure script, Makefile.in files, nor the
  214. related configure files.
  215. They can be created by running <span class="command"><strong>autoreconf</strong></span>
  216. with the <code class="option">--install</code> switch.
  217. This will run <span class="command"><strong>autoconf</strong></span>,
  218. <span class="command"><strong>aclocal</strong></span>,
  219. <span class="command"><strong>libtoolize</strong></span>,
  220. <span class="command"><strong>autoheader</strong></span>,
  221. <span class="command"><strong>automake</strong></span>,
  222. and related commands.
  223. </p></div><div class="section" title="Configure before the build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328464"></a>Configure before the build</h3></div></div></div><p>
  224. BIND 10 uses the GNU Build System to discover build environment
  225. details.
  226. To generate the makefiles using the defaults, simply run:
  227. </p><pre class="screen">$ <strong class="userinput"><code>./configure</code></strong></pre><p>
  228. </p><p>
  229. Run <span class="command"><strong>./configure</strong></span> with the <code class="option">--help</code>
  230. switch to view the different options. The commonly-used options are:
  231. </p><div class="variablelist"><dl><dt><span class="term">--prefix</span></dt><dd>Define the the installation location (the
  232. default is <code class="filename">/usr/local/</code>).
  233. </dd><dt><span class="term">--with-boost-include</span></dt><dd>Define the path to find the Boost headers.
  234. </dd><dt><span class="term">--with-boost-lib</span></dt><dd>Define the path to find the Boost library.
  235. </dd><dt><span class="term">--with-boost-python</span></dt><dd>Define to use the Boost Python library.
  236. </dd><dt><span class="term">--with-boost-system</span></dt><dd>Define to use the Boost System library.
  237. </dd><dt><span class="term">--with-pythonpath</span></dt><dd>Define the path to Python 3.1 if it is not in the
  238. standard execution path.
  239. </dd><dt><span class="term">--with-gtest</span></dt><dd>Enable building the C++ Unit Tests using the
  240. Google Tests framework. Optionally this can define the
  241. path to the gtest header files and library.
  242. </dd></dl></div><p>
  243. </p><p>
  244. For example, the following configures it to build
  245. with BOOST ASIO support, find the Boost headers, find the
  246. Python interpreter, and sets the installation location:
  247. </p><pre class="screen">$ <strong class="userinput"><code>./configure --with-boost-lib=/usr/pkg/lib \
  248. --with-boost-include=/usr/pkg/include \
  249. --with-boost-python \
  250. --with-boost-system \
  251. --with-pythonpath=/usr/pkg/bin/python3.1 \
  252. --prefix=/opt/bind10</code></strong></pre><p>
  253. </p><p>
  254. If the configure fails, it may be due to missing or old
  255. dependencies.
  256. </p></div><div class="section" title="Build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328600"></a>Build</h3></div></div></div><p>
  257. After the configure step is complete, to build the executables
  258. from the C++ code and prepare the Python scripts, run:
  259. </p><pre class="screen">$ <strong class="userinput"><code>make</code></strong></pre><p>
  260. </p></div><div class="section" title="Install"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328615"></a>Install</h3></div></div></div><p>
  261. To install the BIND 10 executables, support files,
  262. and documentation, run:
  263. </p><pre class="screen">$ <strong class="userinput"><code>make install</code></strong></pre><p>
  264. </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 class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  265. Depending on your system and the location of your Boost
  266. Python and Python shared libraries, you may need to
  267. configure your run-time linker to find them (such as
  268. setting LD_LIBRARY_PATH).
  269. </p></div></div><div class="section" title="Install Hierarchy"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328645"></a>Install Hierarchy</h3></div></div></div><p>
  270. The following is the layout of the complete BIND 10 installation:
  271. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
  272. <code class="filename">bin/</code> &#8212;
  273. general tools and diagnostic clients.
  274. </li><li class="listitem">
  275. <code class="filename">etc/bind10-devel/</code> &#8212;
  276. configuration files.
  277. </li><li class="listitem">
  278. <code class="filename">lib/</code> &#8212;
  279. libraries and python modules.
  280. </li><li class="listitem">
  281. <code class="filename">libexec/bind10-devel/</code> &#8212;
  282. executables that a user wouldn't normally run directly and
  283. are not run independently.
  284. These are the BIND 10 modules which are daemons started by
  285. the <span class="command"><strong>bind10</strong></span> tool.
  286. </li><li class="listitem">
  287. <code class="filename">sbin/</code> &#8212;
  288. commands used by the system administrator.
  289. </li><li class="listitem">
  290. <code class="filename">share/bind10-devel/</code> &#8212;
  291. configuration specifications.
  292. </li><li class="listitem">
  293. <code class="filename">share/man/</code> &#8212;
  294. manual pages (online documentation).
  295. </li><li class="listitem">
  296. <code class="filename">var/bind10-devel/</code> &#8212;
  297. data source and configuration databases.
  298. </li></ul></div><p>
  299. </p></div></div></div><div class="chapter" title="Chapter 3. Starting BIND10 with bind10"><div class="titlepage"><div><div><h2 class="title"><a name="bind10"></a>Chapter 3. Starting BIND10 with <span class="command"><strong>bind10</strong></span></h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#start">Starting BIND 10</a></span></dt></dl></div><p>
  300. BIND 10 provides the <span class="command"><strong>bind10</strong></span> command which
  301. starts up the required processes.
  302. <span class="command"><strong>bind10</strong></span>
  303. will also restart processes that exit unexpectedly.
  304. This is the only command needed to start the BIND 10 system.
  305. </p><p>
  306. After starting the <span class="command"><strong>b10-msgq</strong></span> communications channel,
  307. <span class="command"><strong>bind10</strong></span> connects to it,
  308. runs the configuration manager, and reads its own configuration.
  309. Then it starts the other modules.
  310. </p><p>
  311. The <span class="command"><strong>b10-msgq</strong></span> and <span class="command"><strong>b10-cfgmgr</strong></span>
  312. services make up the core. The <span class="command"><strong>b10-msgq</strong></span> daemon
  313. provides the communication channel between every part of the system.
  314. The <span class="command"><strong>b10-cfgmgr</strong></span> daemon is always needed by every
  315. module, if only to send information about themselves somewhere,
  316. but more importantly to ask about their own settings, and
  317. about other modules.
  318. The <span class="command"><strong>bind10</strong></span> master process will also start up
  319. <span class="command"><strong>b10-cmdctl</strong></span> for admins to communicate with the
  320. system, <span class="command"><strong>b10-auth</strong></span> for Authoritative DNS service,
  321. <span class="command"><strong>b10-xfrin</strong></span> for inbound DNS zone transfers.
  322. and <span class="command"><strong>b10-xfrout</strong></span> for outbound DNS zone transfers.
  323. </p><div class="section" title="Starting BIND 10"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="start"></a>Starting BIND 10</h2></div></div></div><p>
  324. To start the BIND 10 service, simply run <span class="command"><strong>bind10</strong></span>.
  325. Run it with the <code class="option">--verbose</code> switch to
  326. get additional debugging or diagnostic output.
  327. </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>
  328. The BIND 10 components use the <span class="command"><strong>b10-msgq</strong></span>
  329. message routing daemon to communicate with other BIND 10 components.
  330. The <span class="command"><strong>b10-msgq</strong></span> implements what is called the
  331. <span class="quote">&#8220;<span class="quote">Command Channel</span>&#8221;</span>.
  332. Processes intercommunicate by sending messages on the command
  333. channel.
  334. Example messages include shutdown, get configurations, and set
  335. configurations.
  336. This Command Channel is not used for DNS message passing.
  337. It is used only to control and monitor the BIND 10 system.
  338. </p><p>
  339. Administrators do not communicate directly with the
  340. <span class="command"><strong>b10-msgq</strong></span> daemon.
  341. By default, BIND 10 uses port 9912 for the
  342. <span class="command"><strong>b10-msgq</strong></span> service.
  343. It listens on 127.0.0.1.
  344. </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>
  345. The configuration manager, <span class="command"><strong>b10-cfgmgr</strong></span>,
  346. handles all BIND 10 system configuration. It provides
  347. persistent storage for configuration, and notifies running
  348. modules of configuration changes.
  349. </p><p>
  350. The <span class="command"><strong>b10-auth</strong></span> and <span class="command"><strong>b10-xfrin</strong></span>
  351. daemons and other components receive their configurations
  352. from the configuration manager over the <span class="command"><strong>b10-msgq</strong></span>
  353. command channel.
  354. </p><p>The administrator doesn't connect to it directly, but
  355. uses a user interface to communicate with the configuration
  356. manager via <span class="command"><strong>b10-cmdctl</strong></span>'s REST-ful interface.
  357. <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>.
  358. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  359. The development prototype release only provides the
  360. <span class="command"><strong>bindctl</strong></span> as a user interface to
  361. <span class="command"><strong>b10-cmdctl</strong></span>.
  362. Upcoming releases will provide another interactive command-line
  363. interface and a web-based interface.
  364. </p></div><p>
  365. The <span class="command"><strong>b10-cfgmgr</strong></span> daemon can send all
  366. specifications and all current settings to the
  367. <span class="command"><strong>bindctl</strong></span> client (via
  368. <span class="command"><strong>b10-cmdctl</strong></span>).
  369. </p><p>
  370. <span class="command"><strong>b10-cfgmgr</strong></span> relays configurations received
  371. from <span class="command"><strong>b10-cmdctl</strong></span> to the appropriate modules.
  372. </p><p>
  373. The stored configuration file is at
  374. <code class="filename">/usr/local/var/bind10-devel/b10-config.db</code>.
  375. (The full path is what was defined at build configure time for
  376. <code class="option">--localstatedir</code>.
  377. The default is <code class="filename">/usr/local/var/</code>.)
  378. The format is loosely based on JSON and is directly parseable
  379. python, but this may change in a future version.
  380. This configuration data file is not manually edited by the
  381. administrator.
  382. </p><p>
  383. The configuration manager does not have any command line arguments.
  384. Normally it is not started manually, but is automatically
  385. started using the <span class="command"><strong>bind10</strong></span> master process
  386. (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>).
  387. </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">Configuration specification for b10-cmdctl</a></span></dt></dl></div><p>
  388. <span class="command"><strong>b10-cmdctl</strong></span> is the gateway between
  389. administrators and the BIND 10 system.
  390. It is a HTTPS server that uses standard HTTP Digest
  391. Authentication for username and password validation.
  392. It provides a REST-ful interface for accessing and controlling
  393. BIND 10.
  394. </p><p>
  395. When <span class="command"><strong>b10-cmdctl</strong></span> starts, it firsts
  396. asks <span class="command"><strong>b10-cfgmgr</strong></span> about what modules are
  397. running and what their configuration is (over the
  398. <span class="command"><strong>b10-msgq</strong></span> channel). Then it will start listening
  399. on HTTPS for clients &#8212; the user interface &#8212; such
  400. as <span class="command"><strong>bindctl</strong></span>.
  401. </p><p>
  402. <span class="command"><strong>b10-cmdctl</strong></span> directly sends commands
  403. (received from the user interface) to the specified component.
  404. Configuration changes are actually commands to
  405. <span class="command"><strong>b10-cfgmgr</strong></span> so are sent there.
  406. </p><p>The HTTPS server requires a private key,
  407. such as a RSA PRIVATE KEY.
  408. The default location is at
  409. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-keyfile.pem</code>.
  410. (A sample key is at
  411. <code class="filename">/usr/local/share/bind10-devel/cmdctl-keyfile.pem</code>.)
  412. It also uses a certificate located at
  413. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-certfile.pem</code>.
  414. (A sample certificate is at
  415. <code class="filename">/usr/local/share/bind10-devel/cmdctl-certfile.pem</code>.)
  416. This may be a self-signed certificate or purchased from a
  417. certification authority.
  418. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  419. The HTTPS server doesn't support a certificate request from a
  420. client (at this time).
  421. The <span class="command"><strong>b10-cmdctl</strong></span> daemon does not provide a
  422. public service. If any client wants to control BIND 10, then
  423. a certificate needs to be first received from the BIND 10
  424. administrator.
  425. The BIND 10 installation provides a sample PEM bundle that matches
  426. the sample key and certificate.
  427. </p></div><p>
  428. The <span class="command"><strong>b10-cmdctl</strong></span> daemon also requires
  429. the user account file located at
  430. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-accounts.csv</code>.
  431. This comma-delimited file lists the accounts with a user name,
  432. hashed password, and salt.
  433. (A sample file is at
  434. <code class="filename">/usr/local/share/bind10-devel/cmdctl-accounts.csv</code>.
  435. It contains the user named <span class="quote">&#8220;<span class="quote">root</span>&#8221;</span> with the password
  436. <span class="quote">&#8220;<span class="quote">bind10</span>&#8221;</span>.)
  437. </p><p>
  438. The administrator may create a user account with the
  439. <span class="command"><strong>b10-cmdctl-usermgr</strong></span> tool.
  440. </p><p>
  441. By default the HTTPS server listens on the localhost port 8080.
  442. The port can be set by using the <code class="option">--port</code> command line option.
  443. The address to listen on can be set using the <code class="option">--address</code> command
  444. line argument.
  445. Each HTTPS connection is stateless and timesout in 1200 seconds
  446. by default. This can be
  447. redefined by using the <code class="option">--idle-timeout</code> command line argument.
  448. </p><div class="section" title="Configuration specification for b10-cmdctl"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cmdctl.spec"></a>Configuration specification for b10-cmdctl</h2></div></div></div><p>
  449. The configuration items for <span class="command"><strong>b10-cmdctl</strong></span> are:
  450. key_file
  451. cert_file
  452. accounts_file
  453. </p><p>
  454. The control commands are:
  455. print_settings
  456. shutdown
  457. </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>
  458. For this development prototype release, <span class="command"><strong>bindctl</strong></span>
  459. is the only user interface. It is expected that upcoming
  460. releases will provide another interactive command-line
  461. interface and a web-based interface for controlling and
  462. configuring BIND 10.
  463. </p></div><p>
  464. The <span class="command"><strong>bindctl</strong></span> tool provides an interactive
  465. prompt for configuring, controlling, and querying the BIND 10
  466. components.
  467. It communicates directly with a REST-ful interface over HTTPS
  468. provided by <span class="command"><strong>b10-cmdctl</strong></span>. It doesn't
  469. communicate to any other components directly.
  470. </p><p>
  471. Configuration changes are actually commands to
  472. <span class="command"><strong>b10-cfgmgr</strong></span>. So when <span class="command"><strong>bindctl</strong></span>
  473. sends a configuration, it is sent to <span class="command"><strong>b10-cmdctl</strong></span>
  474. (over a HTTPS connection); then <span class="command"><strong>b10-cmdctl</strong></span>
  475. sends the command (over a <span class="command"><strong>b10-msgq</strong></span> command
  476. channel) to <span class="command"><strong>b10-cfgmgr</strong></span> which then stores
  477. the details and relays (over a <span class="command"><strong>b10-msgq</strong></span> command
  478. channel) the configuration on to the specified module.
  479. </p><p>
  480. </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="#id1168230329212">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329277">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329307">Loading Master Zones Files</a></span></dt></dl></div><p>
  481. The <span class="command"><strong>b10-auth</strong></span> is the authoritative DNS server.
  482. It supports EDNS0 and DNSSEC. It supports IPv6.
  483. Normally it is started by the <span class="command"><strong>bind10</strong></span> master
  484. process.
  485. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  486. This development prototype release listens on all interfaces
  487. and the non-standard port 5300.
  488. </p></div><div class="section" title="Server Configurations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329212"></a>Server Configurations</h2></div></div></div><p>
  489. <span class="command"><strong>b10-auth</strong></span> is configured via the
  490. <span class="command"><strong>b10-cfgmgr</strong></span> configuration manager.
  491. The module name is <span class="quote">&#8220;<span class="quote">Auth</span>&#8221;</span>.
  492. The configuration data item is:
  493. </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
  494. the SQLite3 database file.
  495. Note: Later the DNS server will use various data source backends.
  496. This may be a temporary setting until then.
  497. </dd></dl></div><p>
  498. </p><p>
  499. The configuration command is:
  500. </p><div class="variablelist"><dl><dt><span class="term">shutdown</span></dt><dd>Stop the authoritative DNS server.
  501. </dd></dl></div><p>
  502. </p></div><div class="section" title="Data Source Backends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329277"></a>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>
  503. For the development prototype release, <span class="command"><strong>b10-auth</strong></span>
  504. only supports the SQLite3 data source backend.
  505. Upcoming versions will be able to use multiple different
  506. data sources, such as MySQL, Berkeley DB, or in-memory DB.
  507. </p></div><p>
  508. By default, the SQLite3 backend uses the data file located at
  509. <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>.
  510. (The full path is what was defined at build configure time for
  511. <code class="option">--localstatedir</code>.
  512. The default is <code class="filename">/usr/local/var/</code>.)
  513. This data file location may be changed by defining the
  514. <span class="quote">&#8220;<span class="quote">database_file</span>&#8221;</span> configuration.
  515. </p></div><div class="section" title="Loading Master Zones Files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329307"></a>Loading Master Zones Files</h2></div></div></div><p>
  516. RFC 1035 style DNS master zone files may imported
  517. into a BIND 10 data source by using the
  518. <span class="command"><strong>b10-loadzone</strong></span> utility.
  519. </p><p>
  520. <span class="command"><strong>b10-loadzone</strong></span> supports the following
  521. special directives (control entries):
  522. </p><div class="variablelist"><dl><dt><span class="term">$INCLUDE</span></dt><dd>Loads an additional zone file. This may be recursive.
  523. </dd><dt><span class="term">$ORIGIN</span></dt><dd>Defines the relative domain name.
  524. </dd><dt><span class="term">$TTL</span></dt><dd>Defines the time-to-live value used for following
  525. records that don't include a TTL.
  526. </dd></dl></div><p>
  527. </p><p>
  528. The <code class="option">-o</code> argument may be used to define the
  529. default origin for loaded zone file records.
  530. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  531. In the development prototype release, only the SQLite3 back
  532. end is used.
  533. By default, it stores the zone data in
  534. <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>
  535. unless the <code class="option">-d</code> switch is used to set the
  536. database filename.
  537. Multiple zones are stored in a single SQLite3 zone database.
  538. </p></div><p>
  539. If you reload a zone already existing in the database,
  540. all records from that prior zone disappear and a whole new set
  541. appears.
  542. </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><p>
  543. The <span class="command"><strong>b10-xfrin</strong></span> process is started by
  544. <span class="command"><strong>bind10</strong></span>.
  545. It can be manually triggered to request an AXFR zone
  546. transfer. When received, it is stored in the BIND 10
  547. data store, and its records can be served by
  548. <span class="command"><strong>b10-auth</strong></span>.
  549. This allows the BIND 10 server to provide
  550. <span class="quote">&#8220;<span class="quote">secondary</span>&#8221;</span> service.
  551. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  552. The current development release of BIND 10 only supports
  553. AXFR. (IXFR is not supported.)
  554. It also does not yet support automated SOA checks.
  555. </p></div><p>
  556. To manually trigger a zone transfer to retrieve a remote zone,
  557. you may use the <span class="command"><strong>bindctl</strong></span> utility.
  558. For example, at the <span class="command"><strong>bindctl</strong></span> prompt run:
  559. </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>
  560. </p></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>
  561. The <span class="command"><strong>b10-xfrout</strong></span> process is started by
  562. <span class="command"><strong>bind10</strong></span>.
  563. When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
  564. receives an AXFR request, <span class="command"><strong>b10-xfrout</strong></span>
  565. sends the zone.
  566. This is used to provide master DNS service to share zones
  567. to secondary name servers.
  568. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  569. The current development release of BIND 10 only supports
  570. AXFR. (IXFR is not supported.)
  571. It also does not yet support NOTIFY.
  572. Access control is not yet provided.
  573. </p></div></div></div></body></html>