bind10-guide.html 46 KB

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