bind10-guide.html 42 KB

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