bind10-guide.html 45 KB
Newer Older
Jeremy C. Reed's avatar
Jeremy C. Reed committed
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>
Michael Graff's avatar
Michael Graff committed
2
3
4
        The most up-to-date version of this document, along with other documents
        for BIND 10, can be found at
        <a class="ulink" href="http://bind10.isc.org/docs" target="_top">http://bind10.isc.org/docs</a>.
5
      </p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230342718">Supported Platforms</a></span></dt><dt><span class="section"><a href="#id1168230342746">Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">Managing BIND 10</a></span></dt></dl></dd><dt><span class="chapter"><a href="#installation">2. Installation</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328220">Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">Quick start</a></span></dt><dt><span class="section"><a href="#install">Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328405">Download Tar File</a></span></dt><dt><span class="section"><a href="#id1168230327606">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230327666">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328711">Build</a></span></dt><dt><span class="section"><a href="#id1168230328726">Install</a></span></dt><dt><span class="section"><a href="#id1168230328757">Install Hierarchy</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#bind10">3. Starting BIND10 with <span class="command"><strong>bind10</strong></span></a></span></dt><dd><dl><dt><span class="section"><a href="#start">Starting BIND 10</a></span></dt></dl></dd><dt><span class="chapter"><a href="#msgq">4. Command channel</a></span></dt><dt><span class="chapter"><a href="#cfgmgr">5. Configuration manager</a></span></dt><dt><span class="chapter"><a href="#cmdctl">6. Remote control daemon</a></span></dt><dd><dl><dt><span class="section"><a href="#cmdctl.spec">Configuration specification for b10-cmdctl</a></span></dt></dl></dd><dt><span class="chapter"><a href="#bindctl">7. Control and configure user interface</a></span></dt><dt><span class="chapter"><a href="#authserver">8. Authoritative Server</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230329323">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329388">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329419">Loading Master Zones Files</a></span></dt></dl></dd><dt><span class="chapter"><a href="#xfrin">9. Incoming Zone Transfers</a></span></dt><dt><span class="chapter"><a href="#xfrout">10. Outbound Zone Transfers</a></span></dt></dl></div><div class="chapter" title="Chapter 1. Introduction"><div class="titlepage"><div><div><h2 class="title"><a name="intro"></a>Chapter 1. Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230342718">Supported Platforms</a></span></dt><dt><span class="section"><a href="#id1168230342746">Required Software</a></span></dt><dt><span class="section"><a href="#starting_stopping">Starting and Stopping the Server</a></span></dt><dt><span class="section"><a href="#managing_once_running">Managing BIND 10</a></span></dt></dl></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
6
7
8
9
10
11
12
13
14
15
16
      BIND is the popular implementation of a DNS server, developer
      interfaces, and DNS tools.
      BIND 10 is a rewrite of BIND 9.  BIND 10 is written in C++ and Python
      and provides a modular environment for serving and maintaining DNS.
    </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
        This guide covers the experimental prototype version of
        BIND 10.
      </p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
        BIND 10, at this time, does not provide an recursive
        DNS server. It does provide a EDNS0- and DNSSEC-capable
        authoritative DNS server.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
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>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
18
19
20
21
22
23
24
25
26
  BIND 10 builds have been tested on Debian GNU/Linux 5,
  Ubuntu 9.10, NetBSD 5, Solaris 10, FreeBSD 7, and CentOS
  Linux 5.3.

  It has been tested on Sparc, i386, and amd64 hardware
  platforms.

        It is planned for BIND 10 to build, install and run on
        Windows and standard Unix-type platforms.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
27
      </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>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
28
29
30
        BIND 10 requires Python 3.1.  Later versions may work, but Python
        3.1 is the minimum version which will work.
      </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
31
	For this development prototype release, the only supported
Jeremy C. Reed's avatar
Jeremy C. Reed committed
32
33
34
	data source backend is SQLite3. The authoritative server
	requires SQLite 3.3.9 or newer.
        The <span class="command"><strong>b10-xfrin</strong></span> and <span class="command"><strong>b10-xfrout</strong></span>
35
36
	modules require the libboost library,
        Boost Python library, libpython3 library,
Jeremy C. Reed's avatar
Jeremy C. Reed committed
37
	and the Python _sqlite3.so module.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
38
39
40
41
42
43
44
45
      </p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
          Some operating systems do not provide these dependencies
          in their default installation nor standard packages
          collections.
          You may need to install them separately.
        </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>
        BIND 10 is modular.  Part of this modularity is
        accomplished using multiple cooperating processes which, together,
46
47
48
	provide the server functionality.  This is a change from
	the previous generation of BIND software, which used a
	single process.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
49
      </p><p>
50
51
52
53
54
55
56
	At first, running many different processes may seem confusing.
	However, these processes are started, stopped, and maintained
	by a single command, <span class="command"><strong>bind10</strong></span>.
	This command starts a master process which will start other
	processes as needed.
	The processes started by the <span class="command"><strong>bind10</strong></span>
	command have names starting with "b10-", including:
Jeremy C. Reed's avatar
Jeremy C. Reed committed
57
58
59
      </p><p>

        </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Jeremy C. Reed's avatar
Jeremy C. Reed committed
60
              <span class="command"><strong>b10-msgq</strong></span> &#8212;
61
              Message bus daemon.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
62
63
64
65
              This process coordinates communication between all of the other
              BIND 10 processes.
            </li><li class="listitem">
              <span class="command"><strong>b10-auth</strong></span> &#8212;
66
              Authoritative DNS server.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
67
68
69
              This process serves DNS requests.
            </li><li class="listitem">
              <span class="command"><strong>b10-cfgmgr</strong></span> &#8212;
70
              Configuration manager.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
71
72
73
              This process maintains all of the configuration for BIND 10.
            </li><li class="listitem">
              <span class="command"><strong>b10-cmdctl</strong></span> &#8212;
74
              Command and control service.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
75
76
77
78
              This process allows external control of the BIND 10 system.
            </li><li class="listitem">
              <span class="command"><strong>b10-xfrin</strong></span> &#8212;
              Incoming zone transfer service.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
79
              This process is used to transfer a new copy
Jeremy C. Reed's avatar
Jeremy C. Reed committed
80
              of a zone into BIND 10, when acting as a secondary server.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
81
82
83
84
85
86
            </li><li class="listitem">
              <span class="command"><strong>b10-xfrout</strong></span> &#8212;
              Outgoing zone transfer service.
	      This process is used to handle transfer requests to
	      send a local zone to a remote secondary server,
	      when acting as a master server.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
87
            </li></ul></div><p>
88
89
90
      </p><p>
	These are ran automatically by <span class="command"><strong>bind10</strong></span>
	and do not need to be run manually.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
91
      </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>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
92
93
	Once BIND 10 is running, a few commands are used to interact
	directly with the system:
Jeremy C. Reed's avatar
Jeremy C. Reed committed
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
        </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
              <span class="command"><strong>bindctl</strong></span> &#8212;
              interactive administration interface.
              This is a command-line tool which allows an administrator
              to control BIND 10.
            </li><li class="listitem">
              <span class="command"><strong>b10-loadzone</strong></span> &#8212;
              zone file loader.
              This tool will load standard masterfile-format zone files into
              BIND 10.
            </li><li class="listitem">
              <span class="command"><strong>b10-cmdctl-usermgr</strong></span> &#8212;
              user access control.
              This tool allows an administrator to authorize additional users
              to manage BIND 10.
            </li></ul></div><p>
      </p></div><p>
      The tools and modules are covered in full detail in this guide.

      In addition, manual pages are also provided in the default installation.
    </p><p>
      BIND 10 also provides libraries and programmer interfaces
      for C++ and Python for the message bus, configuration backend,
      and, of course, DNS. These include detailed developer
      documentation and code examples.

120
    </p></div><div class="chapter" title="Chapter 2. Installation"><div class="titlepage"><div><div><h2 class="title"><a name="installation"></a>Chapter 2. Installation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230328220">Building Requirements</a></span></dt><dt><span class="section"><a href="#quickstart">Quick start</a></span></dt><dt><span class="section"><a href="#install">Installation from source</a></span></dt><dd><dl><dt><span class="section"><a href="#id1168230328405">Download Tar File</a></span></dt><dt><span class="section"><a href="#id1168230327606">Retrieve from Subversion</a></span></dt><dt><span class="section"><a href="#id1168230327666">Configure before the build</a></span></dt><dt><span class="section"><a href="#id1168230328711">Build</a></span></dt><dt><span class="section"><a href="#id1168230328726">Install</a></span></dt><dt><span class="section"><a href="#id1168230328757">Install Hierarchy</a></span></dt></dl></dd></dl></div><div class="section" title="Building Requirements"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230328220"></a>Building Requirements</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
121
122
123
124
125
126
127
128
129
130
            Some operating systems have split their distribution packages into
            a run-time and a development package.  You will need to install
            the development package versions, which include header files and
            libraries, to build BIND 10 from source code.
          </p></div><p>
          Building from source code requires the Boost
          build-time headers. At least Boost version 1.34 is required.
  
  
        </p><p>
131
	  The Boost Library, Boost Python Library, Python Library,
Jeremy C. Reed's avatar
Jeremy C. Reed committed
132
133
134
135
136
137
	  and Python _sqlite3 module are required to enable the
	  Xfrout and Xfrin support.
        </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
          The Python related libraries and modules need to be built
          for Python 3.1.
        </p></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
138
139
140
          Building BIND 10 also requires a C++ compiler and
          standard development headers.
          BIND 10 builds have been tested with GCC g++ 3.4.3, 4.1.2,
Jeremy C. Reed's avatar
Jeremy C. Reed committed
141
          4.1.3, 4.2.1, 4.3.2, and 4.4.1.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
142
143
144
145
146
147
        </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>
          This quickly covers the standard steps for installing
          and deploying BIND 10 as an authoritative name server using
          its defaults. For troubleshooting, full customizations and further
          details, see the respective chapters in the BIND 10 guide.
        </p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
148
          The development prototype of the b10-auth server listens on
Jeremy C. Reed's avatar
Jeremy C. Reed committed
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
          0.0.0.0 (all interfaces) port 5300. (This is not the standard
          domain service port.)
        </p></div><p>
        To quickly get started with BIND 10, follow these steps.
      </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
            Install required build dependencies.
          </li><li class="listitem">
            Download the BIND 10 source tar file from
            <a class="ulink" href="ftp://ftp.isc.org/isc/bind10/" target="_top">ftp://ftp.isc.org/isc/bind10/</a>.
          </li><li class="listitem"><p>Extract the tar file:
          </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>
          </p></li><li class="listitem"><p>Go into the source and run configure:
            </p><pre class="screen">$ <strong class="userinput"><code>cd bind10-<em class="replaceable"><code>VERSION</code></em></code></strong>
  $ <strong class="userinput"><code>./configure</code></strong></pre><p>
          </p></li><li class="listitem"><p>Build it:
            </p><pre class="screen">$ <strong class="userinput"><code>make</code></strong></pre><p>
          </p></li><li class="listitem"><p>Install it (to default /usr/local):
            </p><pre class="screen">$ <strong class="userinput"><code>make install</code></strong></pre><p>
          </p></li><li class="listitem"><p>Start the server:
            </p><pre class="screen">$ <strong class="userinput"><code>/usr/local/sbin/bind10</code></strong></pre><p>
          </p></li><li class="listitem"><p>Test it; for example:
            </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>
         </p></li><li class="listitem"><p>Load desired zone file(s), for example:
            </p><pre class="screen">$ <strong class="userinput"><code>b10-loadzone <em class="replaceable"><code>your.zone.example.org</code></em></code></strong></pre><p>
          </p></li><li class="listitem">
            Test the new zone.
          </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>
        BIND 10 is open source software written in C++ and Python.
        It is freely available in source code form from ISC via
        the Subversion code revision control system or as a downloadable
        tar file. It may also be available in pre-compiled ready-to-use
        packages from operating system vendors.
181
      </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>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
182
183
184
185
186
187
          Downloading a release tar file is the recommended method to
          obtain the source code.
        </p><p>
          The BIND 10 releases are available as tar file downloads from
          <a class="ulink" href="ftp://ftp.isc.org/isc/bind10/" target="_top">ftp://ftp.isc.org/isc/bind10/</a>.
          Periodic development snapshots may also be available.
188
        </p></div><div class="section" title="Retrieve from Subversion"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230327606"></a>Retrieve from Subversion</h3></div></div></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
189
190
191
192
193
194
195
196
197
198
199
200
201
          Downloading this "bleeding edge" code is recommended only for
          developers or advanced users.  Using development code in a production
          environment is not recommended.
        </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
            When using source code retrieved via Subversion additional
            software will be required:  automake (v1.11 or newer),
            libtoolize, and autoconf (2.59 or newer).
            These may need to be installed.
          </p></div><p>
          The latest development code, including temporary experiments
          and un-reviewed code, is available via the BIND 10 code revision
          control system. This is powered by Subversion and all the BIND 10
          development is public.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
202
          The leading development is done in the <span class="quote">&#8220;<span class="quote">trunk</span>&#8221;</span>.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
        </p><p>
          The code can be checked out from <code class="filename">svn://bind10.isc.org/svn/bind10</code>; for example to check out the trunk:

        </p><pre class="screen">$ <strong class="userinput"><code>svn co svn://bind10.isc.org/svn/bind10/trunk</code></strong></pre><p>
        </p><p>
          When checking out the code from
          the code version control system, it doesn't include the
          generated configure script, Makefile.in files, nor the
          related configure files.
          They can be created by running <span class="command"><strong>autoreconf</strong></span>
          with the <code class="option">--install</code> switch.
          This will run <span class="command"><strong>autoconf</strong></span>,
          <span class="command"><strong>aclocal</strong></span>,
          <span class="command"><strong>libtoolize</strong></span>,
          <span class="command"><strong>autoheader</strong></span>,
          <span class="command"><strong>automake</strong></span>,
          and related commands.
220
        </p></div><div class="section" title="Configure before the build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230327666"></a>Configure before the build</h3></div></div></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
221
222
223
224
225
226
227
228
          BIND 10 uses the GNU Build System to discover build environment
          details.
          To generate the makefiles using the defaults, simply run:
          </p><pre class="screen">$ <strong class="userinput"><code>./configure</code></strong></pre><p>
        </p><p>
          Run <span class="command"><strong>./configure</strong></span> with the <code class="option">--help</code>
          switch to view the different options. The commonly-used options are:

Jeremy C. Reed's avatar
Jeremy C. Reed committed
229
230
          </p><div class="variablelist"><dl><dt><span class="term">--prefix</span></dt><dd>Define the the installation location (the
                default is <code class="filename">/usr/local/</code>).
Jeremy C. Reed's avatar
Jeremy C. Reed committed
231
              </dd><dt><span class="term">--with-boost-include</span></dt><dd>Define the path to find the Boost headers.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
232
233
234
235
236
237
238
              </dd><dt><span class="term">--with-boost-lib</span></dt><dd>Define the path to find the Boost library.
              </dd><dt><span class="term">--with-boost-python</span></dt><dd>Define to use the Boost Python library.
              </dd><dt><span class="term">--with-pythonpath</span></dt><dd>Define the path to Python 3.1 if it is not in the
                standard execution path.
              </dd><dt><span class="term">--with-gtest</span></dt><dd>Enable building the C++ Unit Tests using the
                Google Tests framework. Optionally this can define the
                path to the gtest header files and library.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
239
240
241
              </dd></dl></div><p>

        </p><p>
242
243
244
          For example, the following configures it
    build with Boost Python support (for Python DNS library),
    find the Boost headers and library, find the
Jeremy C. Reed's avatar
Jeremy C. Reed committed
245
246
    Python interpreter, and sets the installation location:

Jeremy C. Reed's avatar
Jeremy C. Reed committed
247
          </p><pre class="screen">$ <strong class="userinput"><code>./configure --with-boost-lib=/usr/pkg/lib \
Jeremy C. Reed's avatar
Jeremy C. Reed committed
248
      --with-boost-include=/usr/pkg/include \
Jeremy C. Reed's avatar
Jeremy C. Reed committed
249
      --with-boost-python \
Jeremy C. Reed's avatar
Jeremy C. Reed committed
250
251
252
253
254
      --with-pythonpath=/usr/pkg/bin/python3.1 \
      --prefix=/opt/bind10</code></strong></pre><p>
        </p><p>
          If the configure fails, it may be due to missing or old
          dependencies.
255
        </p></div><div class="section" title="Build"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328711"></a>Build</h3></div></div></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
256
257
258
259
    After the configure step is complete, to build the executables
    from the C++ code and prepare the Python scripts, run:

          </p><pre class="screen">$ <strong class="userinput"><code>make</code></strong></pre><p>
260
        </p></div><div class="section" title="Install"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328726"></a>Install</h3></div></div></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
261
262
263
          To install the BIND 10 executables, support files,
          and documentation, run:
          </p><pre class="screen">$ <strong class="userinput"><code>make install</code></strong></pre><p>
264
265
266
267
268
        </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>
	  Depending on your system and the location of your Boost
	  Python and Python shared libraries, you may need to
	  configure your run-time linker to find them (such as
	  setting LD_LIBRARY_PATH).
269
        </p></div></div><div class="section" title="Install Hierarchy"><div class="titlepage"><div><div><h3 class="title"><a name="id1168230328757"></a>Install Hierarchy</h3></div></div></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
          The following is the layout of the complete BIND 10 installation:
          </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
                <code class="filename">bin/</code> &#8212;
                general tools and diagnostic clients.
              </li><li class="listitem">
              <code class="filename">etc/bind10-devel/</code> &#8212;
              configuration files.
            </li><li class="listitem">
                <code class="filename">lib/</code> &#8212;
                libraries and python modules.
              </li><li class="listitem">
                <code class="filename">libexec/bind10-devel/</code> &#8212;
                executables that a user wouldn't normally run directly and
                are not run independently.
                These are the BIND 10 modules which are daemons started by
                the <span class="command"><strong>bind10</strong></span> tool.
              </li><li class="listitem">
                <code class="filename">sbin/</code> &#8212;
                commands used by the system administrator.
              </li><li class="listitem">
                <code class="filename">share/bind10-devel/</code> &#8212;
                configuration specifications.
              </li><li class="listitem">
                <code class="filename">share/man/</code> &#8212;
                manual pages (online documentation).
              </li><li class="listitem">
                <code class="filename">var/bind10-devel/</code> &#8212;
                data source and configuration databases.
              </li></ul></div><p>
        </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>
      BIND 10 provides the <span class="command"><strong>bind10</strong></span> command which 
      starts up the required processes.
      <span class="command"><strong>bind10</strong></span>
      will also restart processes that exit unexpectedly.
      This is the only command needed to start the BIND 10 system.
    </p><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
306
      After starting the <span class="command"><strong>b10-msgq</strong></span> communications channel,
Jeremy C. Reed's avatar
Jeremy C. Reed committed
307
308
309
310
      <span class="command"><strong>bind10</strong></span> connects to it, 
      runs the configuration manager, and reads its own configuration.
      Then it starts the other modules.
    </p><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
311
312
      The <span class="command"><strong>b10-msgq</strong></span> and <span class="command"><strong>b10-cfgmgr</strong></span>
      services make up the core. The <span class="command"><strong>b10-msgq</strong></span> daemon
Jeremy C. Reed's avatar
Jeremy C. Reed committed
313
314
315
316
317
318
319
320
      provides the communication channel between every part of the system.
      The <span class="command"><strong>b10-cfgmgr</strong></span> daemon is always needed by every
      module, if only to send information about themselves somewhere,
      but more importantly to ask about their own settings, and
      about other modules.
      The <span class="command"><strong>bind10</strong></span> master process will also start up
      <span class="command"><strong>b10-cmdctl</strong></span> for admins to communicate with the
      system, <span class="command"><strong>b10-auth</strong></span> for Authoritative DNS service,
Jeremy C. Reed's avatar
Jeremy C. Reed committed
321
322
      <span class="command"><strong>b10-xfrin</strong></span> for inbound DNS zone transfers.
      and <span class="command"><strong>b10-xfrout</strong></span> for outbound DNS zone transfers.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
323
324
325
326
327
    </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>
        To start the BIND 10 service, simply run <span class="command"><strong>bind10</strong></span>.
        Run it with the <code class="option">--verbose</code> switch to
        get additional debugging or diagnostic output.
      </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>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
328
        The BIND 10 components use the <span class="command"><strong>b10-msgq</strong></span>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
329
        message routing daemon to communicate with other BIND 10 components.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
330
        The <span class="command"><strong>b10-msgq</strong></span> implements what is called the
Jeremy C. Reed's avatar
Jeremy C. Reed committed
331
332
333
334
335
336
337
338
339
        <span class="quote">&#8220;<span class="quote">Command Channel</span>&#8221;</span>.
        Processes intercommunicate by sending messages on the command
        channel.
        Example messages include shutdown, get configurations, and set
        configurations.
        This Command Channel is not used for DNS message passing.
        It is used only to control and monitor the BIND 10 system.
      </p><p>
        Administrators do not communicate directly with the
Jeremy C. Reed's avatar
Jeremy C. Reed committed
340
        <span class="command"><strong>b10-msgq</strong></span> daemon.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
341
        By default, BIND 10 uses port 9912 for the
Jeremy C. Reed's avatar
Jeremy C. Reed committed
342
        <span class="command"><strong>b10-msgq</strong></span> service.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
343
344
        It listens on 127.0.0.1.
      </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>
Michael Graff's avatar
Michael Graff committed
345
346
347
348
349
350
351
         The configuration manager, <span class="command"><strong>b10-cfgmgr</strong></span>,
         handles all BIND 10 system configuration.  It provides
         persistent storage for configuration, and notifies running
         modules of configuration changes.
      </p><p>
        The <span class="command"><strong>b10-auth</strong></span> and <span class="command"><strong>b10-xfrin</strong></span>
        daemons and other components receive their configurations
Jeremy C. Reed's avatar
Jeremy C. Reed committed
352
        from the configuration manager over the <span class="command"><strong>b10-msgq</strong></span>
Michael Graff's avatar
Michael Graff committed
353
        command channel.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
354
355
356
357
358
      </p><p>The administrator doesn't connect to it directly, but
        uses a user interface to communicate with the configuration
        manager via <span class="command"><strong>b10-cmdctl</strong></span>'s REST-ful interface.
        <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>.
      </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
359
          The development prototype release only provides the
Michael Graff's avatar
Michael Graff committed
360
361
362
363
364
          <span class="command"><strong>bindctl</strong></span> as a user interface to
          <span class="command"><strong>b10-cmdctl</strong></span>.
          Upcoming releases will provide another interactive command-line
          interface and a web-based interface.
        </p></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
365
366
        The <span class="command"><strong>b10-cfgmgr</strong></span> daemon can send all
        specifications and all current settings to the
Michael Graff's avatar
Michael Graff committed
367
368
        <span class="command"><strong>bindctl</strong></span> client (via
        <span class="command"><strong>b10-cmdctl</strong></span>).
Jeremy C. Reed's avatar
Jeremy C. Reed committed
369
370
371
372
373
374
375
376
377
      </p><p>
        <span class="command"><strong>b10-cfgmgr</strong></span> relays configurations received
        from <span class="command"><strong>b10-cmdctl</strong></span> to the appropriate modules.
      </p><p>
        The stored configuration file is at
        <code class="filename">/usr/local/var/bind10-devel/b10-config.db</code>.
        (The full path is what was defined at build configure time for
        <code class="option">--localstatedir</code>.
        The default is <code class="filename">/usr/local/var/</code>.)
Michael Graff's avatar
Michael Graff committed
378
379
380
381
        The format is loosely based on JSON and is directly parseable
        python, but this may change in a future version.
        This configuration data file is not manually edited by the
        administrator.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
      </p><p>
      The configuration manager does not have any command line arguments.
      Normally it is not started manually, but is automatically
      started using the <span class="command"><strong>bind10</strong></span> master process
      (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>).
    </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>
      <span class="command"><strong>b10-cmdctl</strong></span> is the gateway between
      administrators and the BIND 10 system.
      It is a HTTPS server that uses standard HTTP Digest
      Authentication for username and password validation.
      It provides a REST-ful interface for accessing and controlling
      BIND 10.
    </p><p>
      When <span class="command"><strong>b10-cmdctl</strong></span> starts, it firsts
      asks <span class="command"><strong>b10-cfgmgr</strong></span> about what modules are
      running and what their configuration is (over the
Jeremy C. Reed's avatar
Jeremy C. Reed committed
398
      <span class="command"><strong>b10-msgq</strong></span> channel). Then it will start listening
Jeremy C. Reed's avatar
Jeremy C. Reed committed
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
      on HTTPS for clients &#8212; the user interface &#8212; such
      as <span class="command"><strong>bindctl</strong></span>.
    </p><p>
      <span class="command"><strong>b10-cmdctl</strong></span> directly sends commands
      (received from the user interface) to the specified component.
      Configuration changes are actually commands to
      <span class="command"><strong>b10-cfgmgr</strong></span> so are sent there.
    </p><p>The HTTPS server requires a private key,
      such as a RSA PRIVATE KEY.
      The default location is at
      <code class="filename">/usr/local/etc/bind10-devel/cmdctl-keyfile.pem</code>.
      (A sample key is at
      <code class="filename">/usr/local/share/bind10-devel/cmdctl-keyfile.pem</code>.)
      It also uses a certificate located at
      <code class="filename">/usr/local/etc/bind10-devel/cmdctl-certfile.pem</code>.
      (A sample certificate is at
      <code class="filename">/usr/local/share/bind10-devel/cmdctl-certfile.pem</code>.)
      This may be a self-signed certificate or purchased from a
      certification authority.
    </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
      The HTTPS server doesn't support a certificate request from a
      client (at this time).

      The <span class="command"><strong>b10-cmdctl</strong></span> daemon does not provide a
      public service. If any client wants to control BIND 10, then
Jeremy C. Reed's avatar
Jeremy C. Reed committed
424
      a certificate needs to be first received from the BIND 10
Jeremy C. Reed's avatar
Jeremy C. Reed committed
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
      administrator.
      The BIND 10 installation provides a sample PEM bundle that matches
      the sample key and certificate.
    </p></div><p>
      The <span class="command"><strong>b10-cmdctl</strong></span> daemon also requires
      the user account file located at
      <code class="filename">/usr/local/etc/bind10-devel/cmdctl-accounts.csv</code>.
      This comma-delimited file lists the accounts with a user name,
      hashed password, and salt.
      (A sample file is at
      <code class="filename">/usr/local/share/bind10-devel/cmdctl-accounts.csv</code>.
      It contains the user named <span class="quote">&#8220;<span class="quote">root</span>&#8221;</span> with the password
      <span class="quote">&#8220;<span class="quote">bind10</span>&#8221;</span>.)
    </p><p>
      The administrator may create a user account with the
      <span class="command"><strong>b10-cmdctl-usermgr</strong></span> tool.
    </p><p>
      By default the HTTPS server listens on the localhost port 8080.
      The port can be set by using the <code class="option">--port</code> command line option.
      The address to listen on can be set using the <code class="option">--address</code> command
      line argument.
      Each HTTPS connection is stateless and timesout in 1200 seconds
      by default.  This can be
      redefined by using the <code class="option">--idle-timeout</code> command line argument.
    </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>
        The configuration items for <span class="command"><strong>b10-cmdctl</strong></span> are:
key_file
cert_file
accounts_file
      </p><p>
        The control commands are:
print_settings
shutdown
      </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>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
459
      For this development prototype release, <span class="command"><strong>bindctl</strong></span>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
      is the only user interface. It is expected that upcoming
      releases will provide another interactive command-line
      interface and a web-based interface for controlling and
      configuring BIND 10.
    </p></div><p>
      The <span class="command"><strong>bindctl</strong></span> tool provides an interactive
      prompt for configuring, controlling, and querying the BIND 10
      components.
      It communicates directly with a REST-ful interface over HTTPS
      provided by <span class="command"><strong>b10-cmdctl</strong></span>. It doesn't
      communicate to any other components directly.
    </p><p>
      Configuration changes are actually commands to
      <span class="command"><strong>b10-cfgmgr</strong></span>. So when <span class="command"><strong>bindctl</strong></span>
      sends a configuration, it is sent to <span class="command"><strong>b10-cmdctl</strong></span>
      (over a HTTPS connection); then <span class="command"><strong>b10-cmdctl</strong></span>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
476
      sends the command (over a <span class="command"><strong>b10-msgq</strong></span> command
Jeremy C. Reed's avatar
Jeremy C. Reed committed
477
      channel) to <span class="command"><strong>b10-cfgmgr</strong></span> which then stores
Jeremy C. Reed's avatar
Jeremy C. Reed committed
478
      the details and relays (over a <span class="command"><strong>b10-msgq</strong></span> command
Jeremy C. Reed's avatar
Jeremy C. Reed committed
479
480
      channel) the configuration on to the specified module.
    </p><p>
481
    </p></div><div class="chapter" title="Chapter 8. Authoritative Server"><div class="titlepage"><div><div><h2 class="title"><a name="authserver"></a>Chapter 8. Authoritative Server</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1168230329323">Server Configurations</a></span></dt><dt><span class="section"><a href="#id1168230329388">Data Source Backends</a></span></dt><dt><span class="section"><a href="#id1168230329419">Loading Master Zones Files</a></span></dt></dl></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
482
483
484
485
486
      The <span class="command"><strong>b10-auth</strong></span> is the authoritative DNS server.
      It supports EDNS0 and DNSSEC. It supports IPv6.
      Normally it is started by the <span class="command"><strong>bind10</strong></span> master
      process.
    </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
487
488
      This development prototype release listens on all interfaces
      and the non-standard port 5300.
489
    </p></div><div class="section" title="Server Configurations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329323"></a>Server Configurations</h2></div></div></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
        <span class="command"><strong>b10-auth</strong></span> is configured via the
        <span class="command"><strong>b10-cfgmgr</strong></span> configuration manager.
        The module name is <span class="quote">&#8220;<span class="quote">Auth</span>&#8221;</span>.
        The configuration data item is:

        </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
                 the SQLite3 database file.

Note: Later the DNS server will use various data source backends.
This may be a temporary setting until then.
              </dd></dl></div><p>

      </p><p>

        The configuration command is:

        </p><div class="variablelist"><dl><dt><span class="term">shutdown</span></dt><dd>Stop the authoritative DNS server.
              </dd></dl></div><p>

509
      </p></div><div class="section" title="Data Source Backends"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329388"></a>Data Source Backends</h2></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
510
        For the development prototype release, <span class="command"><strong>b10-auth</strong></span>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
511
512
513
514
515
516
517
518
519
520
521
        only supports the SQLite3 data source backend.
        Upcoming versions will be able to use multiple different
        data sources, such as MySQL, Berkeley DB, or in-memory DB.
      </p></div><p>
        By default, the SQLite3 backend uses the data file located at
        <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>.
        (The full path is what was defined at build configure time for
        <code class="option">--localstatedir</code>.
        The default is <code class="filename">/usr/local/var/</code>.)
  This data file location may be changed by defining the
  <span class="quote">&#8220;<span class="quote">database_file</span>&#8221;</span> configuration.
522
      </p></div><div class="section" title="Loading Master Zones Files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id1168230329419"></a>Loading Master Zones Files</h2></div></div></div><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
        RFC 1035 style DNS master zone files may imported
        into a BIND 10 data source by using the
        <span class="command"><strong>b10-loadzone</strong></span> utility.
      </p><p>
        <span class="command"><strong>b10-loadzone</strong></span> supports the following
        special directives (control entries):

        </p><div class="variablelist"><dl><dt><span class="term">$INCLUDE</span></dt><dd>Loads an additional zone file. This may be recursive.
              </dd><dt><span class="term">$ORIGIN</span></dt><dd>Defines the relative domain name.
              </dd><dt><span class="term">$TTL</span></dt><dd>Defines the time-to-live value used for following
                records that don't include a TTL.
              </dd></dl></div><p>

      </p><p>
        The <code class="option">-o</code> argument may be used to define the
        default origin for loaded zone file records.
      </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Jeremy C. Reed's avatar
Jeremy C. Reed committed
540
541
        In the development prototype release, only the SQLite3 back
        end is used.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
542
543
544
545
546
547
548
        By default, it stores the zone data in
        <code class="filename">/usr/local/var/bind10-devel/zone.sqlite3</code>
        unless the <code class="option">-d</code> switch is used to set the
        database filename.
        Multiple zones are stored in a single SQLite3 zone database.
      </p></div><p>
        If you reload a zone already existing in the database,
Jeremy C. Reed's avatar
Jeremy C. Reed committed
549
        all records from that prior zone disappear and a whole new set
Jeremy C. Reed's avatar
Jeremy C. Reed committed
550
        appears.
Jeremy C. Reed's avatar
Jeremy C. Reed committed
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
      </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>
      The <span class="command"><strong>b10-xfrin</strong></span> process is started by
      <span class="command"><strong>bind10</strong></span>.
      It can be manually triggered to request an AXFR zone
      transfer. When received, it is stored in the BIND 10
      data store, and its records can be served by
      <span class="command"><strong>b10-auth</strong></span>.
      This allows the BIND 10 server to provide
      <span class="quote">&#8220;<span class="quote">secondary</span>&#8221;</span> service.
    </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     The current development release of BIND 10 only supports
     AXFR. (IXFR is not supported.) 
     It also does not yet support automated SOA checks.
    </p></div><p>
       To manually trigger a zone transfer to retrieve a remote zone,
       you may use the <span class="command"><strong>bindctl</strong></span> utility.
       For example, at the <span class="command"><strong>bindctl</strong></span> prompt run:

       </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>
    </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>
      The <span class="command"><strong>b10-xfrout</strong></span> process is started by
      <span class="command"><strong>bind10</strong></span>.
      When the <span class="command"><strong>b10-auth</strong></span> authoritative DNS server
      receives an AXFR request, <span class="command"><strong>b10-xfrout</strong></span>
      sends the zone.
      This is used to provide master DNS service to share zones
      to secondary name servers.
    </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     The current development release of BIND 10 only supports
     AXFR. (IXFR is not supported.) 
     It also does not yet support NOTIFY.
     Access control is not yet provided.
    </p></div></div></div></body></html>