bind10-guide.html 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  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="#id1168230328425">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230328485">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328596">Build</a></span></dt><dt><span class="section"><a href="#id1168230328611">Install</a></span></dt><dt><span class="section"><a href="#id1168230328642">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="#id1168230329208">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329273">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329303">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. 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="#id1168230328425">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230328485">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328596">Build</a></span></dt><dt><span class="section"><a href="#id1168230328611">Install</a></span></dt><dt><span class="section"><a href="#id1168230328642">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, 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, make, and pkg-config.
  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="id1168230328425"></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="id1168230328485"></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-pythonpath</span></dt><dd>Define the path to Python 3.1 if it is not in the
  225. standard execution path.
  226. </dd><dt><span class="term">--with-gtest</span></dt><dd>Enable building the C++ Unit Tests using the
  227. Google Tests framework. Optionally this can define the
  228. path to the gtest header files and library.
  229. </dd></dl></div><p>
  230. </p><p>
  231. For example, the following configures it to
  232. find the Boost headers and library, find the
  233. Python interpreter, and sets the installation location:
  234. </p><pre class="screen">$ <strong class="userinput"><code>./configure --with-boost-lib=/usr/pkg/lib \
  235. --with-boost-include=/usr/pkg/include \
  236. --with-pythonpath=/usr/pkg/bin/python3.1 \
  237. --prefix=/opt/bind10</code></strong></pre><p>
  238. </p><p>
  239. If the configure fails, it may be due to missing or old
  240. dependencies.
  241. </p></div><div class="section" title="Build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328596"></a>Build</h3></div></div></div><p>
  242. After the configure step is complete, to build the executables
  243. from the C++ code and prepare the Python scripts, run:
  244. </p><pre class="screen">$ <strong class="userinput"><code>make</code></strong></pre><p>
  245. </p></div><div class="section" title="Install"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328611"></a>Install</h3></div></div></div><p>
  246. To install the BIND 10 executables, support files,
  247. and documentation, run:
  248. </p><pre class="screen">$ <strong class="userinput"><code>make install</code></strong></pre><p>
  249. </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>
  250. Depending on your system and the location of your Boost
  251. Python and Python shared libraries, you may need to
  252. configure your run-time linker to find them (such as
  253. setting LD_LIBRARY_PATH).
  254. </p></div></div><div class="section" title="Install Hierarchy"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328642"></a>Install Hierarchy</h3></div></div></div><p>
  255. The following is the layout of the complete BIND 10 installation:
  256. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
  257. <code class="filename">bin/</code> &#8212;
  258. general tools and diagnostic clients.
  259. </li><li class="listitem">
  260. <code class="filename">etc/bind10-devel/</code> &#8212;
  261. configuration files.
  262. </li><li class="listitem">
  263. <code class="filename">lib/</code> &#8212;
  264. libraries and python modules.
  265. </li><li class="listitem">
  266. <code class="filename">libexec/bind10-devel/</code> &#8212;
  267. executables that a user wouldn't normally run directly and
  268. are not run independently.
  269. These are the BIND 10 modules which are daemons started by
  270. the <span class="command"><strong>bind10</strong></span> tool.
  271. </li><li class="listitem">
  272. <code class="filename">sbin/</code> &#8212;
  273. commands used by the system administrator.
  274. </li><li class="listitem">
  275. <code class="filename">share/bind10-devel/</code> &#8212;
  276. configuration specifications.
  277. </li><li class="listitem">
  278. <code class="filename">share/man/</code> &#8212;
  279. manual pages (online documentation).
  280. </li><li class="listitem">
  281. <code class="filename">var/bind10-devel/</code> &#8212;
  282. data source and configuration databases.
  283. </li></ul></div><p>
  284. </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>
  285. BIND 10 provides the <span class="command"><strong>bind10</strong></span> command which
  286. starts up the required processes.
  287. <span class="command"><strong>bind10</strong></span>
  288. will also restart processes that exit unexpectedly.
  289. This is the only command needed to start the BIND 10 system.
  290. </p><p>
  291. After starting the <span class="command"><strong>b10-msgq</strong></span> communications channel,
  292. <span class="command"><strong>bind10</strong></span> connects to it,
  293. runs the configuration manager, and reads its own configuration.
  294. Then it starts the other modules.
  295. </p><p>
  296. The <span class="command"><strong>b10-msgq</strong></span> and <span class="command"><strong>b10-cfgmgr</strong></span>
  297. services make up the core. The <span class="command"><strong>b10-msgq</strong></span> daemon
  298. provides the communication channel between every part of the system.
  299. The <span class="command"><strong>b10-cfgmgr</strong></span> daemon is always needed by every
  300. module, if only to send information about themselves somewhere,
  301. but more importantly to ask about their own settings, and
  302. about other modules.
  303. The <span class="command"><strong>bind10</strong></span> master process will also start up
  304. <span class="command"><strong>b10-cmdctl</strong></span> for admins to communicate with the
  305. system, <span class="command"><strong>b10-auth</strong></span> for Authoritative DNS service,
  306. <span class="command"><strong>b10-xfrin</strong></span> for inbound DNS zone transfers.
  307. and <span class="command"><strong>b10-xfrout</strong></span> for outbound DNS zone transfers.
  308. </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>
  309. To start the BIND 10 service, simply run <span class="command"><strong>bind10</strong></span>.
  310. Run it with the <code class="option">--verbose</code> switch to
  311. get additional debugging or diagnostic output.
  312. </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>
  313. The BIND 10 components use the <span class="command"><strong>b10-msgq</strong></span>
  314. message routing daemon to communicate with other BIND 10 components.
  315. The <span class="command"><strong>b10-msgq</strong></span> implements what is called the
  316. <span class="quote">&#8220;<span class="quote">Command Channel</span>&#8221;</span>.
  317. Processes intercommunicate by sending messages on the command
  318. channel.
  319. Example messages include shutdown, get configurations, and set
  320. configurations.
  321. This Command Channel is not used for DNS message passing.
  322. It is used only to control and monitor the BIND 10 system.
  323. </p><p>
  324. Administrators do not communicate directly with the
  325. <span class="command"><strong>b10-msgq</strong></span> daemon.
  326. By default, BIND 10 uses port 9912 for the
  327. <span class="command"><strong>b10-msgq</strong></span> service.
  328. It listens on 127.0.0.1.
  329. </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>
  330. The configuration manager, <span class="command"><strong>b10-cfgmgr</strong></span>,
  331. handles all BIND 10 system configuration. It provides
  332. persistent storage for configuration, and notifies running
  333. modules of configuration changes.
  334. </p><p>
  335. The <span class="command"><strong>b10-auth</strong></span> and <span class="command"><strong>b10-xfrin</strong></span>
  336. daemons and other components receive their configurations
  337. from the configuration manager over the <span class="command"><strong>b10-msgq</strong></span>
  338. command channel.
  339. </p><p>The administrator doesn't connect to it directly, but
  340. uses a user interface to communicate with the configuration
  341. manager via <span class="command"><strong>b10-cmdctl</strong></span>'s REST-ful interface.
  342. <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>.
  343. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  344. The development prototype release only provides the
  345. <span class="command"><strong>bindctl</strong></span> as a user interface to
  346. <span class="command"><strong>b10-cmdctl</strong></span>.
  347. Upcoming releases will provide another interactive command-line
  348. interface and a web-based interface.
  349. </p></div><p>
  350. The <span class="command"><strong>b10-cfgmgr</strong></span> daemon can send all
  351. specifications and all current settings to the
  352. <span class="command"><strong>bindctl</strong></span> client (via
  353. <span class="command"><strong>b10-cmdctl</strong></span>).
  354. </p><p>
  355. <span class="command"><strong>b10-cfgmgr</strong></span> relays configurations received
  356. from <span class="command"><strong>b10-cmdctl</strong></span> to the appropriate modules.
  357. </p><p>
  358. The stored configuration file is at
  359. <code class="filename">/usr/local/var/bind10-devel/b10-config.db</code>.
  360. (The full path is what was defined at build configure time for
  361. <code class="option">--localstatedir</code>.
  362. The default is <code class="filename">/usr/local/var/</code>.)
  363. The format is loosely based on JSON and is directly parseable
  364. python, but this may change in a future version.
  365. This configuration data file is not manually edited by the
  366. administrator.
  367. </p><p>
  368. The configuration manager does not have any command line arguments.
  369. Normally it is not started manually, but is automatically
  370. started using the <span class="command"><strong>bind10</strong></span> master process
  371. (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>).
  372. </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>
  373. <span class="command"><strong>b10-cmdctl</strong></span> is the gateway between
  374. administrators and the BIND 10 system.
  375. It is a HTTPS server that uses standard HTTP Digest
  376. Authentication for username and password validation.
  377. It provides a REST-ful interface for accessing and controlling
  378. BIND 10.
  379. </p><p>
  380. When <span class="command"><strong>b10-cmdctl</strong></span> starts, it firsts
  381. asks <span class="command"><strong>b10-cfgmgr</strong></span> about what modules are
  382. running and what their configuration is (over the
  383. <span class="command"><strong>b10-msgq</strong></span> channel). Then it will start listening
  384. on HTTPS for clients &#8212; the user interface &#8212; such
  385. as <span class="command"><strong>bindctl</strong></span>.
  386. </p><p>
  387. <span class="command"><strong>b10-cmdctl</strong></span> directly sends commands
  388. (received from the user interface) to the specified component.
  389. Configuration changes are actually commands to
  390. <span class="command"><strong>b10-cfgmgr</strong></span> so are sent there.
  391. </p><p>The HTTPS server requires a private key,
  392. such as a RSA PRIVATE KEY.
  393. The default location is at
  394. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-keyfile.pem</code>.
  395. (A sample key is at
  396. <code class="filename">/usr/local/share/bind10-devel/cmdctl-keyfile.pem</code>.)
  397. It also uses a certificate located at
  398. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-certfile.pem</code>.
  399. (A sample certificate is at
  400. <code class="filename">/usr/local/share/bind10-devel/cmdctl-certfile.pem</code>.)
  401. This may be a self-signed certificate or purchased from a
  402. certification authority.
  403. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  404. The HTTPS server doesn't support a certificate request from a
  405. client (at this time).
  406. The <span class="command"><strong>b10-cmdctl</strong></span> daemon does not provide a
  407. public service. If any client wants to control BIND 10, then
  408. a certificate needs to be first received from the BIND 10
  409. administrator.
  410. The BIND 10 installation provides a sample PEM bundle that matches
  411. the sample key and certificate.
  412. </p></div><p>
  413. The <span class="command"><strong>b10-cmdctl</strong></span> daemon also requires
  414. the user account file located at
  415. <code class="filename">/usr/local/etc/bind10-devel/cmdctl-accounts.csv</code>.
  416. This comma-delimited file lists the accounts with a user name,
  417. hashed password, and salt.
  418. (A sample file is at
  419. <code class="filename">/usr/local/share/bind10-devel/cmdctl-accounts.csv</code>.
  420. It contains the user named <span class="quote">&#8220;<span class="quote">root</span>&#8221;</span> with the password
  421. <span class="quote">&#8220;<span class="quote">bind10</span>&#8221;</span>.)
  422. </p><p>
  423. The administrator may create a user account with the
  424. <span class="command"><strong>b10-cmdctl-usermgr</strong></span> tool.
  425. </p><p>
  426. By default the HTTPS server listens on the localhost port 8080.
  427. The port can be set by using the <code class="option">--port</code> command line option.
  428. The address to listen on can be set using the <code class="option">--address</code> command
  429. line argument.
  430. Each HTTPS connection is stateless and timesout in 1200 seconds
  431. by default. This can be
  432. redefined by using the <code class="option">--idle-timeout</code> command line argument.
  433. </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>
  434. The configuration items for <span class="command"><strong>b10-cmdctl</strong></span> are:
  435. key_file
  436. cert_file
  437. accounts_file
  438. </p><p>
  439. The control commands are:
  440. print_settings
  441. shutdown
  442. </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>
  443. For this development prototype release, <span class="command"><strong>bindctl</strong></span>
  444. is the only user interface. It is expected that upcoming
  445. releases will provide another interactive command-line
  446. interface and a web-based interface for controlling and
  447. configuring BIND 10.
  448. </p></div><p>
  449. The <span class="command"><strong>bindctl</strong></span> tool provides an interactive
  450. prompt for configuring, controlling, and querying the BIND 10
  451. components.
  452. It communicates directly with a REST-ful interface over HTTPS
  453. provided by <span class="command"><strong>b10-cmdctl</strong></span>. It doesn't
  454. communicate to any other components directly.
  455. </p><p>
  456. Configuration changes are actually commands to
  457. <span class="command"><strong>b10-cfgmgr</strong></span>. So when <span class="command"><strong>bindctl</strong></span>
  458. sends a configuration, it is sent to <span class="command"><strong>b10-cmdctl</strong></span>
  459. (over a HTTPS connection); then <span class="command"><strong>b10-cmdctl</strong></span>
  460. sends the command (over a <span class="command"><strong>b10-msgq</strong></span> command
  461. channel) to <span class="command"><strong>b10-cfgmgr</strong></span> which then stores
  462. the details and relays (over a <span class="command"><strong>b10-msgq</strong></span> command
  463. channel) the configuration on to the specified module.
  464. </p><p>
  465. </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="#id1168230329208">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329273">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329303">Loading Master Zones Files</a></span></dt></dl></div><p>
  466. The <span class="command"><strong>b10-auth</strong></span> is the authoritative DNS server.
  467. It supports EDNS0 and DNSSEC. It supports IPv6.
  468. Normally it is started by the <span class="command"><strong>bind10</strong></span> master
  469. process.
  470. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  471. This development prototype release listens on all interfaces
  472. and the non-standard port 5300.
  473. </p></div><div class="section" title="Server Configurations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329208"></a>Server Configurations</h2></div></div></div><p>
  474. <span class="command"><strong>b10-auth</strong></span> is configured via the
  475. <span class="command"><strong>b10-cfgmgr</strong></span> configuration manager.
  476. The module name is <span class="quote">&#8220;<span class="quote">Auth</span>&#8221;</span>.
  477. The configuration data item is:
  478. </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
  479. the SQLite3 database file.
  480. Note: Later the DNS server will use various data source backends.
  481. This may be a temporary setting until then.
  482. </dd></dl></div><p>
  483. </p><p>
  484. The configuration command is:
  485. </p><div class="variablelist"><dl><dt><span class="term">shutdown</span></dt><dd>Stop the authoritative DNS server.
  486. </dd></dl></div><p>
  487. </p></div><div class="section" title="Data Source Backends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329273"></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>
  488. For the development prototype release, <span class="command"><strong>b10-auth</strong></span>
  489. only supports the SQLite3 data source backend.
  490. Upcoming versions will be able to use multiple different
  491. data sources, such as MySQL, Berkeley DB, or in-memory DB.
  492. </p></div><p>
  493. By default, the SQLite3 backend uses the data file located at
  494. <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>.
  495. (The full path is what was defined at build configure time for
  496. <code class="option">--localstatedir</code>.
  497. The default is <code class="filename">/usr/local/var/</code>.)
  498. This data file location may be changed by defining the
  499. <span class="quote">&#8220;<span class="quote">database_file</span>&#8221;</span> configuration.
  500. </p></div><div class="section" title="Loading Master Zones Files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329303"></a>Loading Master Zones Files</h2></div></div></div><p>
  501. RFC 1035 style DNS master zone files may imported
  502. into a BIND 10 data source by using the
  503. <span class="command"><strong>b10-loadzone</strong></span> utility.
  504. </p><p>
  505. <span class="command"><strong>b10-loadzone</strong></span> supports the following
  506. special directives (control entries):
  507. </p><div class="variablelist"><dl><dt><span class="term">$INCLUDE</span></dt><dd>Loads an additional zone file. This may be recursive.
  508. </dd><dt><span class="term">$ORIGIN</span></dt><dd>Defines the relative domain name.
  509. </dd><dt><span class="term">$TTL</span></dt><dd>Defines the time-to-live value used for following
  510. records that don't include a TTL.
  511. </dd></dl></div><p>
  512. </p><p>
  513. The <code class="option">-o</code> argument may be used to define the
  514. default origin for loaded zone file records.
  515. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  516. In the development prototype release, only the SQLite3 back
  517. end is used.
  518. By default, it stores the zone data in
  519. <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>
  520. unless the <code class="option">-d</code> switch is used to set the
  521. database filename.
  522. Multiple zones are stored in a single SQLite3 zone database.
  523. </p></div><p>
  524. If you reload a zone already existing in the database,
  525. all records from that prior zone disappear and a whole new set
  526. appears.
  527. </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>
  528. The <span class="command"><strong>b10-xfrin</strong></span> process is started by
  529. <span class="command"><strong>bind10</strong></span>.
  530. It can be manually triggered to request an AXFR zone
  531. transfer. When received, it is stored in the BIND 10
  532. data store, and its records can be served by
  533. <span class="command"><strong>b10-auth</strong></span>.
  534. This allows the BIND 10 server to provide
  535. <span class="quote">&#8220;<span class="quote">secondary</span>&#8221;</span> service.
  536. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  537. The current development release of BIND 10 only supports
  538. AXFR. (IXFR is not supported.)
  539. It also does not yet support automated SOA checks.
  540. </p></div><p>
  541. To manually trigger a zone transfer to retrieve a remote zone,
  542. you may use the <span class="command"><strong>bindctl</strong></span> utility.
  543. For example, at the <span class="command"><strong>bindctl</strong></span> prompt run:
  544. </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>
  545. </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>
  546. The <span class="command"><strong>b10-xfrout</strong></span> process is started by
  547. <span class="command"><strong>bind10</strong></span>.
  548. When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
  549. receives an AXFR request, <span class="command"><strong>b10-xfrout</strong></span>
  550. sends the zone.
  551. This is used to provide master DNS service to share zones
  552. to secondary name servers.
  553. </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  554. The current development release of BIND 10 only supports
  555. AXFR. (IXFR is not supported.)
  556. It also does not yet support NOTIFY.
  557. Access control is not yet provided.
  558. </p></div></div></div></body></html>