bind10-guide.html 42 KB

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