userguide.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY mdash "&#x2014;" >
  5. ]>
  6. <book>
  7. <bookinfo>
  8. <title>BIND 10 User Guide</title>
  9. <subtitle>Administrator Reference for BIND 10</subtitle>
  10. <copyright>
  11. <year>2010</year><holder>Internet Systems Consortium, Inc.</holder>
  12. </copyright>
  13. <!-- <abstract><para>This is the definitive reference and user's guide for BIND 10</para></abstract> -->
  14. </bookinfo>
  15. <chapter id="intro">
  16. <title>Introduction</title>
  17. <para>
  18. BIND is the popular implementation of a DNS server, developer
  19. interfaces, and DNS tools.
  20. BIND 10 is a rewrite, using C++ and Python, to provide
  21. modular components for serving and maintaining DNS.
  22. </para>
  23. <note><para>BIND 10, at this time, does not provide an recursive
  24. DNS server. It does provide a EDNS0- and DNSSEC-capable
  25. authoritative DNS server.</para></note>
  26. <note><para>This guide covers the experimental prototype version
  27. of BIND 10.</para></note>
  28. <para>
  29. BIND 10 provides separate executables for different tasks.
  30. The standard components include:
  31. <itemizedlist>
  32. <listitem>
  33. <simpara><command>msgq</command> &mdash; message bus daemon</simpara>
  34. </listitem>
  35. <listitem>
  36. <simpara><command>b10-auth</command> &mdash; authoritative DNS server</simpara>
  37. </listitem>
  38. <listitem>
  39. <simpara><command>b10-cfgmgr</command> &mdash; configuration manager</simpara>
  40. </listitem>
  41. <listitem>
  42. <simpara><command>b10-cmdctl</command> REST-ful communication service</simpara>
  43. </listitem>
  44. <listitem>
  45. <simpara><command>b10-xfrin</command> Incoming zone transfer service</simpara>
  46. </listitem>
  47. <listitem>
  48. <simpara><command>bind10</command> &mdash; master process for BIND 10</simpara>
  49. </listitem>
  50. </itemizedlist>
  51. </para>
  52. <para>
  53. The user tools include:
  54. <itemizedlist>
  55. <listitem>
  56. <simpara><command>bindctl</command> &mdash; interactive administration interface</simpara>
  57. </listitem>
  58. <listitem>
  59. <simpara><command>b10-loadzone</command> &mdash; tool to load standard master zone files</simpara>
  60. </listitem>
  61. <!-- TODO usermgr -->
  62. </itemizedlist>
  63. </para>
  64. <para>
  65. The tools and modules are covered in full detail in this users guide.
  66. <!-- TODO point to these -->
  67. In addition, manual pages are also provided in the default installation.
  68. </para>
  69. <!--
  70. bin/
  71. bindctl*
  72. host*
  73. lib/
  74. libauth
  75. libdns
  76. libexceptions
  77. python3.1/site-packages/isc/{cc,config}
  78. sbin/
  79. bind10
  80. share/
  81. share/bind10/ <
  82. auth.spec
  83. b10-cmdctl.pem
  84. bob.spec
  85. passwd.csv
  86. man/
  87. var/
  88. bind10/b10-config.db
  89. -->
  90. <para>
  91. BIND 10 also provides libraries and programmer interfaces
  92. for C++ and Python for the message bus, configuration backend,
  93. and, of course, DNS. These include detailed developer
  94. documentation and code examples.
  95. <!-- TODO point to this -->
  96. </para>
  97. </chapter>
  98. <chapter id="quickstart">
  99. <title>Quick start</title>
  100. <para>
  101. This quickly covers the standard steps for installing
  102. and deploying BIND 10 as an authoritative nameserver using
  103. its defaults. For troubleshooting, full customizations and further
  104. details, see the respective chapters in the BIND 10 user guide.
  105. </para>
  106. <itemizedlist>
  107. <listitem>
  108. <simpara>Install required dependencies: Python 3.1, SQLite3
  109. library, and Boost development headers.</simpara>
  110. </listitem>
  111. <listitem>
  112. <simpara>Download the BIND 10 source tarball. <!-- TODO: from -->
  113. </simpara>
  114. </listitem>
  115. <listitem>
  116. <para>Extract the tar file:
  117. <screen>$ <userinput>gzcat bind10-<replaceable>VERSION</replaceable>.tar.gz | tar -xvf -</userinput></screen>
  118. </para>
  119. </listitem>
  120. <listitem>
  121. <para>Go into the source and run configure:
  122. <screen>$ <userinput>cd bind10-<replaceable>VERSION</replaceable></userinput>
  123. $ <userinput>./configure</userinput></screen>
  124. </para>
  125. </listitem>
  126. <listitem>
  127. <para>Build it:
  128. <screen>$ <userinput>make</userinput></screen>
  129. </para>
  130. </listitem>
  131. <listitem>
  132. <para>Install it (to default /usr/local):
  133. <screen>$ <userinput>make install</userinput></screen>
  134. </para>
  135. </listitem>
  136. <listitem>
  137. <para>Start the server:
  138. <screen>$ <userinput>/usr/local/sbin/bind10</userinput></screen>
  139. </para>
  140. </listitem>
  141. <listitem>
  142. <note><simpara>The Y1 prototype of the b10-auth server listens on
  143. 0.0.0.0 (all interfaces) port 5300. (This is not the standard
  144. domain service port.)</simpara></note>
  145. <para>Test it; for example:
  146. <screen>$ <userinput>dig @127.0.0.1 -p 5300 -c CH -t TXT authors.bind</userinput></screen>
  147. </para>
  148. </listitem>
  149. <listitem>
  150. <para>Load desired zone file(s), for example:
  151. <screen>$ <userinput>b10-loadzone <replaceable>your.zone.example.org</replaceable></userinput></screen>
  152. </para>
  153. </listitem>
  154. <listitem>
  155. <simpara>Test the new zone.
  156. </simpara>
  157. </listitem>
  158. </itemizedlist>
  159. </chapter>
  160. <chapter id="install">
  161. <title>Installation</title>
  162. <para>
  163. BIND 10 is open source software written in C++ and Python.
  164. It is freely available in source code form from ISC via
  165. the Subversion code revision control system or as a downloadable
  166. tar file. It may also be available in pre-compiled ready-to-use
  167. packages from operating system vendors.
  168. </para>
  169. <sect1>
  170. <title>Download Tar File</title>
  171. <para>The BIND 10 release and development snapshots
  172. are available as tarball downloads.
  173. </para>
  174. <!-- TODO -->
  175. </sect1>
  176. <sect1>
  177. <title>Retrieve from Subversion</title>
  178. <para>
  179. The latest development code, including temporary experiments
  180. and un-reviewed code, is available via the BIND 10 code revision
  181. control system. This is powered by Subversion and all the BIND 10
  182. development is public.
  183. The leading development is done in the <quote>trunk</quote>
  184. and the first year prototype containing reviewed code is in
  185. <filename>branches/Y1</filename>.
  186. </para>
  187. <para>
  188. The code can be checked out from <filename>svn://bind10.isc.org/svn/bind10</filename>; for example to check out the trunk:
  189. <screen>$ <userinput>svn co svn://bind10.isc.org/svn/bind10/trunk</userinput></screen>
  190. </para>
  191. <sect2>
  192. <title>Generate configuration files</title>
  193. <para>
  194. When checking out the code from
  195. the code version control system, it doesn't include the
  196. generated configure script, Makefile.in files, nor the
  197. related configure files.
  198. They can be created by running <command>autoreconf</command>
  199. with the <command>--install</command> switch.
  200. This will run <command>autoconf</command>, <command>aclocal</command>,
  201. <command>libtoolize</command>, <command>autoheader</command>,
  202. <command>automake</command>, and related commands &mdash;
  203. and provide needed build files.
  204. </para>
  205. <para>
  206. This requires <command>autoconf</command> version 2.59 or newer
  207. and <command>automake</command> version 1.11 or better (for
  208. working Python 3.1 tests).
  209. </para>
  210. <note><para>
  211. Some operating systems do not provide these in their
  212. default installation nor standard packages collections.
  213. You may need to install them separately.
  214. </para></note>
  215. </sect2>
  216. </sect1>
  217. <sect1>
  218. <title>Required Software</title>
  219. <para>
  220. BIND 10 requires Python 3.1, SQLite 3.3.9 or newer,
  221. and the Python _sqlite3.so module.
  222. <!-- TODO: list where to get these from -->
  223. <!-- TODO: this will change ... -->
  224. </para>
  225. <note><para>
  226. Some operating systems do not provide these in their
  227. default installation nor standard packages collections.
  228. You may need to install them separately.
  229. </para></note>
  230. <para>
  231. Building BIND 10 also requires a C++ compiler and
  232. standard development headers.
  233. BIND 10 builds have been tested with GCC g++ 3.4.3, 4.1.2,
  234. 4.2.1, 4.3.2, and 4.4.1.
  235. <!-- TODO: what about boost? ship with it or not? -->
  236. </para>
  237. </sect1>
  238. <sect1>
  239. <title>Supported Platforms</title>
  240. <para>
  241. BIND 10 builds have been tested on Debian GNU/Linux 5,
  242. Ubuntu 9.10, NetBSD 5, Solaris 10, FreeBSD 7, and CentOS
  243. Linux 5.3.
  244. It has been tested on Sparc, i386, and amd64 hardware
  245. platforms.
  246. It is planned for BIND 10 to build, install and run on
  247. Windows and standard Unix-type platforms.
  248. </para>
  249. </sect1>
  250. <sect1>
  251. <title>Build and install</title>
  252. <para>
  253. BIND 10 uses the GNU Build System to discover build environment
  254. details.
  255. To generate the makefiles using the defaults, simply run:
  256. <screen>$ <userinput>./configure</userinput></screen>
  257. </para>
  258. <para>
  259. Run <command>./configure</command> with the <command>--help</command>
  260. switch to view the different options. The commonly-used option
  261. is <command>--prefix</command> to define the installation
  262. location (the default is <filename>/usr/local/</filename>).
  263. <!-- TODO: gtest, lcov -->
  264. </para>
  265. <para>
  266. Then to build the executables from the C++ code, run:
  267. <screen>$ <userinput>make</userinput></screen>
  268. </para>
  269. <para>
  270. To install the BIND 10 executables, support files,
  271. and documentation, run:
  272. <screen>$ <userinput>make install</userinput></screen>
  273. </para>
  274. <note><para>The install step may require superuser
  275. privileges.</para></note>
  276. <!-- TODO: tests -->
  277. </sect1>
  278. <sect1>
  279. <title>Install Hierarchy</title>
  280. <para>
  281. The following is the layout of the complete BIND 10 installation:
  282. <itemizedlist>
  283. <listitem>
  284. <simpara><filename>bin/</filename> &mdash; general tools and
  285. diagnostic clients.</simpara>
  286. </listitem>
  287. <listitem>
  288. <simpara><filename>lib/</filename> &mdash; libraries and
  289. python modules.</simpara>
  290. </listitem>
  291. <listitem>
  292. <simpara><filename>libexec/bind10/</filename> &mdash; executables that
  293. a user wouldn't normally run directly. Nor would they be used
  294. independently. These are the BIND 10 modules which are daemons
  295. started by the <command>bind10</command> tool.
  296. </simpara>
  297. </listitem>
  298. <listitem>
  299. <simpara><filename>sbin/</filename> &mdash; commands used by
  300. the system administrator.
  301. </simpara>
  302. </listitem>
  303. <listitem>
  304. <simpara><filename>share/bind10/</filename> &mdash; configuration
  305. specifications.
  306. </simpara>
  307. </listitem>
  308. <listitem>
  309. <simpara><filename>share/man/</filename> &mdash; manual pages (online
  310. documentation).
  311. </simpara>
  312. </listitem>
  313. <listitem>
  314. <simpara><filename>var/bind10/</filename> &mdash; configuration and
  315. data source databases.
  316. <!-- TODO: move the sqlite3 database there -->
  317. </simpara>
  318. </listitem>
  319. </itemizedlist>
  320. </para>
  321. </sect1>
  322. </chapter>
  323. <chapter id="bind10">
  324. <title>Starting BIND10 with bind10</title>
  325. <para>
  326. BIND 10 provides the <command>bind10</command> command which
  327. starts up the required daemons to provide the message
  328. communication bus, configurations, <!-- TODO: security, -->
  329. and the DNS server(s).
  330. Also known as BoB or the Boss of BIND, <command>bind10</command>
  331. will also restart processes that exit.
  332. </para>
  333. <para>
  334. After starting the <command>msgq</command> communications channel,
  335. <command>bind10</command> connects to it,
  336. runs the configuration manager, and reads its own configuration.
  337. Then it starts the other modules.
  338. </para>
  339. <para>
  340. The <command>msgq</command> and <command>b10-cfgmgr</command>
  341. services make up the core. The <command>msgq</command> daemon
  342. provides the communication channel between every part of the system.
  343. And <command>b10-cfgmgr</command> is always needed by every
  344. module, if only to send information about themselves somewhere,
  345. but more importantly to ask about their own settings, and
  346. about other modules.
  347. </para>
  348. <sect1 id="cmdctl">
  349. <title>Remote control daemon</title>
  350. <para>
  351. <command>b10-cmdctl</command> is the gateway between
  352. administrators and the whole system; when it starts it firsts
  353. asks <command>b10-cfgmgr</command> about what modules are
  354. running and what their configuration is (over the
  355. <command>msgq</command> channel), then it will start listening
  356. on HTTPS for clients (i.e. <command>bindctl</command>).
  357. </para>
  358. <!-- TODO: replace /usr/local -->
  359. <!-- TODO: permissions -->
  360. <para><filename>/usr/local/share/bind10/cmdctl-keyfile.pem</filename>
  361. contains the Private key, such as a RSA PRIVATE KEY.
  362. </para>
  363. <para><filename>/usr/local/share/bind10/cmdctl-certfile.pem</filename>
  364. contains the Certificate.
  365. </para>
  366. <para>
  367. This could be a self-signed certificate or purchased from a
  368. certification authority.
  369. </para>
  370. </sect1>
  371. <!--
  372. <para>
  373. (08:20:56) shane: It is in theory possible to run without cmdctl.
  374. (08:21:02) shane: I think we discussed this.
  375. </para>
  376. -->
  377. <sect1 id="cfgmgr">
  378. <title>Configuration manager</title>
  379. <para>
  380. The configuration manager, <command>b10-cfgmgr</command>
  381. handles all BIND 10 system configuration. It provides
  382. persistent storage for configuration, and notifies running
  383. modules of configuration changes. The administrator
  384. doesn't use it directly, but uses a tool like
  385. <command>bindctl</command> (or other GUI or web interface)
  386. to communicate with the configuration manager.
  387. </para>
  388. <!--
  389. <para>
  390. The stored configuration file is ...
  391. TODO
  392. </para>
  393. -->
  394. </sect1>
  395. <!--
  396. TODO
  397. <para>
  398. bindctl talks to b10-cmdctl
  399. </para>
  400. cfgmanager can send all specifications (and all current settings)
  401. to bindctl (through cmdctl in fact), so an admin can simply run bindctl,
  402. do config show, and it shows all modules; config show >module> shows all
  403. options for that module
  404. (12:21:30) jinmei: I'd like to have sample session using a command line www client such as wget
  405. (12:21:33) jinmei: btw
  406. -->
  407. <para>
  408. To start the BIND 10 service, run <command>bind10</command>.
  409. Run it with the <command>--verbose</command> switch to
  410. get additional debugging or diagnostic output.
  411. </para>
  412. <!-- TODO: note it doesn't go into background -->
  413. </chapter>
  414. <chapter id="authserver">
  415. <title>Authoritative Server</title>
  416. <para>
  417. </para>
  418. <sect1>
  419. <title>Server Configurations</title>
  420. <para>
  421. </para>
  422. </sect1>
  423. <sect1>
  424. <title>Data Source Backends</title>
  425. <para>
  426. </para>
  427. </sect1>
  428. <sect1>
  429. <title>Loading Master Zones Files</title>
  430. <para>
  431. </para>
  432. </sect1>
  433. <sect1>
  434. <title>Troubleshooting</title>
  435. <para>
  436. </para>
  437. </sect1>
  438. </chapter>
  439. <!-- TODO: how to help: run unit tests, join lists, review trac tickets -->
  440. <!-- <index> <title>Index</title> </index> -->
  441. </book>
  442. <!--
  443. TODO:
  444. Overview
  445. Getting BIND 10 Installed
  446. Basics
  447. Dependencies
  448. Optional
  449. Advanced
  450. How Does Everything Work Together?
  451. Need Help?
  452. -->