bind10-guide.html 45 KB

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