bind10-guide.xml 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279
  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. <?xml-stylesheet href="bind10-guide.css" type="text/css"?>
  8. <bookinfo>
  9. <title>BIND 10 Guide</title>
  10. <subtitle>Administrator Reference for BIND 10</subtitle>
  11. <copyright>
  12. <year>2010</year><holder>Internet Systems Consortium, Inc.</holder>
  13. </copyright>
  14. <abstract>
  15. <para>This is the reference guide for BIND 10.</para>
  16. <para>
  17. The most up-to-date version of this document, along with other documents
  18. for BIND 10, can be found at
  19. <ulink url="http://bind10.isc.org/docs"/>.
  20. </para>
  21. </abstract>
  22. </bookinfo>
  23. <chapter id="intro">
  24. <title>Introduction</title>
  25. <para>
  26. BIND is the popular implementation of a DNS server, developer
  27. interfaces, and DNS tools.
  28. BIND 10 is a rewrite of BIND 9. BIND 10 is written in C++ and Python
  29. and provides a modular environment for serving and maintaining DNS.
  30. </para>
  31. <note>
  32. <para>
  33. This guide covers the experimental prototype version of
  34. BIND 10.
  35. </para>
  36. </note>
  37. <note>
  38. <para>
  39. BIND 10, at this time, does not provide an recursive
  40. DNS server. It does provide a EDNS0- and DNSSEC-capable
  41. authoritative DNS server.
  42. </para>
  43. </note>
  44. <section>
  45. <title>Supported Platforms</title>
  46. <para>
  47. BIND 10 builds have been tested on Debian GNU/Linux 5,
  48. Ubuntu 9.10, NetBSD 5, Solaris 10, FreeBSD 7, and CentOS
  49. Linux 5.3.
  50. It has been tested on Sparc, i386, and amd64 hardware
  51. platforms.
  52. It is planned for BIND 10 to build, install and run on
  53. Windows and standard Unix-type platforms.
  54. </para>
  55. </section>
  56. <section>
  57. <title>Required Software</title>
  58. <para>
  59. BIND 10 requires Python 3.1. Later versions may work, but Python
  60. 3.1 is the minimum version which will work.
  61. </para>
  62. <note><para>
  63. For this development prototype release, the only supported
  64. data source backend is SQLite3. The authoritative server
  65. requires SQLite 3.3.9 or newer.
  66. The <command>b10-xfrin</command> and <command>b10-xfrout</command>
  67. modules require the libboost library,
  68. Boost Python library, libpython3 library,
  69. and the Python _sqlite3.so module.
  70. </para></note>
  71. <!-- TODO: this will change ... -->
  72. <!-- TODO: list where to get these from -->
  73. <note>
  74. <para>
  75. Some operating systems do not provide these dependencies
  76. in their default installation nor standard packages
  77. collections.
  78. You may need to install them separately.
  79. </para>
  80. </note>
  81. </section>
  82. <section id="starting_stopping">
  83. <title>Starting and Stopping the Server</title>
  84. <para>
  85. BIND 10 is modular. Part of this modularity is
  86. accomplished using multiple cooperating processes which, together,
  87. provide the server functionality. This is a change from
  88. the previous generation of BIND software, which used a
  89. single process.
  90. </para>
  91. <para>
  92. At first, running many different processes may seem confusing.
  93. However, these processes are started, stopped, and maintained
  94. by a single command, <command>bind10</command>.
  95. This command starts a master process which will start other
  96. processes as needed.
  97. The processes started by the <command>bind10</command>
  98. command have names starting with "b10-", including:
  99. </para>
  100. <para>
  101. <itemizedlist>
  102. <listitem>
  103. <simpara>
  104. <command>b10-msgq</command> &mdash;
  105. Message bus daemon.
  106. This process coordinates communication between all of the other
  107. BIND 10 processes.
  108. </simpara>
  109. </listitem>
  110. <listitem>
  111. <simpara>
  112. <command>b10-auth</command> &mdash;
  113. Authoritative DNS server.
  114. This process serves DNS requests.
  115. </simpara>
  116. </listitem>
  117. <listitem>
  118. <simpara>
  119. <command>b10-cfgmgr</command> &mdash;
  120. Configuration manager.
  121. This process maintains all of the configuration for BIND 10.
  122. </simpara>
  123. </listitem>
  124. <listitem>
  125. <simpara>
  126. <command>b10-cmdctl</command> &mdash;
  127. Command and control service.
  128. This process allows external control of the BIND 10 system.
  129. </simpara>
  130. </listitem>
  131. <listitem>
  132. <simpara>
  133. <command>b10-xfrin</command> &mdash;
  134. Incoming zone transfer service.
  135. This process is used to transfer a new copy
  136. of a zone into BIND 10, when acting as a secondary server.
  137. </simpara>
  138. </listitem>
  139. <listitem>
  140. <simpara>
  141. <command>b10-xfrout</command> &mdash;
  142. Outgoing zone transfer service.
  143. This process is used to handle transfer requests to
  144. send a local zone to a remote secondary server,
  145. when acting as a master server.
  146. </simpara>
  147. </listitem>
  148. </itemizedlist>
  149. </para>
  150. <para>
  151. These are ran automatically by <command>bind10</command>
  152. and do not need to be run manually.
  153. </para>
  154. </section>
  155. <section id="managing_once_running">
  156. <title>Managing BIND 10</title>
  157. <para>
  158. Once BIND 10 is running, a few commands are used to interact
  159. directly with the system:
  160. <itemizedlist>
  161. <listitem>
  162. <simpara>
  163. <command>bindctl</command> &mdash;
  164. interactive administration interface.
  165. This is a command-line tool which allows an administrator
  166. to control BIND 10.
  167. </simpara>
  168. </listitem>
  169. <listitem>
  170. <simpara>
  171. <command>b10-loadzone</command> &mdash;
  172. zone file loader.
  173. This tool will load standard masterfile-format zone files into
  174. BIND 10.
  175. </simpara>
  176. </listitem>
  177. <listitem>
  178. <simpara>
  179. <command>b10-cmdctl-usermgr</command> &mdash;
  180. user access control.
  181. This tool allows an administrator to authorize additional users
  182. to manage BIND 10.
  183. </simpara>
  184. </listitem>
  185. <!-- TODO usermgr -->
  186. </itemizedlist>
  187. </para>
  188. </section>
  189. <para>
  190. The tools and modules are covered in full detail in this guide.
  191. <!-- TODO point to these -->
  192. In addition, manual pages are also provided in the default installation.
  193. </para>
  194. <!--
  195. bin/
  196. bindctl*
  197. host*
  198. lib/
  199. libauth
  200. libdns
  201. libexceptions
  202. python3.1/site-packages/isc/{cc,config}
  203. sbin/
  204. bind10
  205. share/
  206. share/bind10/
  207. auth.spec
  208. b10-cmdctl.pem
  209. bob.spec
  210. passwd.csv
  211. man/
  212. var/
  213. bind10/b10-config.db
  214. -->
  215. <para>
  216. BIND 10 also provides libraries and programmer interfaces
  217. for C++ and Python for the message bus, configuration backend,
  218. and, of course, DNS. These include detailed developer
  219. documentation and code examples.
  220. <!-- TODO point to this -->
  221. </para>
  222. </chapter>
  223. <chapter id="installation">
  224. <title>Installation</title>
  225. <section>
  226. <title>Building Requirements</title>
  227. <note>
  228. <simpara>
  229. Some operating systems have split their distribution packages into
  230. a run-time and a development package. You will need to install
  231. the development package versions, which include header files and
  232. libraries, to build BIND 10 from source code.
  233. </simpara>
  234. </note>
  235. <para>
  236. Building from source code requires the Boost
  237. build-time headers. At least Boost version 1.34 is required.
  238. <!-- TODO: we don't check for this version -->
  239. <!-- NOTE: jreed has tested with 1.34, 1.38, and 1.41. -->
  240. </para>
  241. <para>
  242. The Boost Library, Boost Python Library, Python Library,
  243. and Python _sqlite3 module are required to enable the
  244. Xfrout and Xfrin support.
  245. </para>
  246. <note><simpara>
  247. The Python related libraries and modules need to be built
  248. for Python 3.1.
  249. </simpara></note>
  250. <para>
  251. Building BIND 10 also requires a C++ compiler and
  252. standard development headers.
  253. BIND 10 builds have been tested with GCC g++ 3.4.3, 4.1.2,
  254. 4.1.3, 4.2.1, 4.3.2, and 4.4.1.
  255. </para>
  256. </section>
  257. <section id="quickstart">
  258. <title>Quick start</title>
  259. <note>
  260. <simpara>
  261. This quickly covers the standard steps for installing
  262. and deploying BIND 10 as an authoritative name server using
  263. its defaults. For troubleshooting, full customizations and further
  264. details, see the respective chapters in the BIND 10 guide.
  265. </simpara>
  266. </note>
  267. <note>
  268. <simpara>
  269. The development prototype of the b10-auth server listens on
  270. 0.0.0.0 (all interfaces) port 5300. (This is not the standard
  271. domain service port.)
  272. </simpara>
  273. </note>
  274. <para>
  275. To quickly get started with BIND 10, follow these steps.
  276. </para>
  277. <orderedlist>
  278. <listitem>
  279. <simpara>
  280. Install required build dependencies.
  281. </simpara>
  282. </listitem>
  283. <listitem>
  284. <simpara>
  285. Download the BIND 10 source tar file from
  286. <ulink url="ftp://ftp.isc.org/isc/bind10/"/>.
  287. </simpara>
  288. </listitem>
  289. <listitem>
  290. <para>Extract the tar file:
  291. <screen>$ <userinput>gzcat bind10-<replaceable>VERSION</replaceable>.tar.gz | tar -xvf -</userinput></screen>
  292. </para>
  293. </listitem>
  294. <listitem>
  295. <para>Go into the source and run configure:
  296. <screen>$ <userinput>cd bind10-<replaceable>VERSION</replaceable></userinput>
  297. $ <userinput>./configure</userinput></screen>
  298. </para>
  299. </listitem>
  300. <listitem>
  301. <para>Build it:
  302. <screen>$ <userinput>make</userinput></screen>
  303. </para>
  304. </listitem>
  305. <listitem>
  306. <para>Install it (to default /usr/local):
  307. <screen>$ <userinput>make install</userinput></screen>
  308. </para>
  309. </listitem>
  310. <listitem>
  311. <para>Start the server:
  312. <screen>$ <userinput>/usr/local/sbin/bind10</userinput></screen>
  313. </para>
  314. </listitem>
  315. <listitem>
  316. <para>Test it; for example:
  317. <screen>$ <userinput>dig @127.0.0.1 -p 5300 -c CH -t TXT authors.bind</userinput></screen>
  318. </para>
  319. </listitem>
  320. <listitem>
  321. <para>Load desired zone file(s), for example:
  322. <screen>$ <userinput>b10-loadzone <replaceable>your.zone.example.org</replaceable></userinput></screen>
  323. </para>
  324. </listitem>
  325. <listitem>
  326. <simpara>
  327. Test the new zone.
  328. </simpara>
  329. </listitem>
  330. </orderedlist>
  331. </section>
  332. <section id="install">
  333. <title>Installation from source</title>
  334. <para>
  335. BIND 10 is open source software written in C++ and Python.
  336. It is freely available in source code form from ISC via
  337. the Subversion code revision control system or as a downloadable
  338. tar file. It may also be available in pre-compiled ready-to-use
  339. packages from operating system vendors.
  340. </para>
  341. <section>
  342. <title>Download Tar File</title>
  343. <para>
  344. Downloading a release tar file is the recommended method to
  345. obtain the source code.
  346. </para>
  347. <para>
  348. The BIND 10 releases are available as tar file downloads from
  349. <ulink url="ftp://ftp.isc.org/isc/bind10/"/>.
  350. Periodic development snapshots may also be available.
  351. </para>
  352. <!-- TODO -->
  353. </section>
  354. <section>
  355. <title>Retrieve from Subversion</title>
  356. <para>
  357. Downloading this "bleeding edge" code is recommended only for
  358. developers or advanced users. Using development code in a production
  359. environment is not recommended.
  360. </para>
  361. <note>
  362. <para>
  363. When using source code retrieved via Subversion additional
  364. software will be required: automake (v1.11 or newer),
  365. libtoolize, and autoconf (2.59 or newer).
  366. These may need to be installed.
  367. </para>
  368. </note>
  369. <para>
  370. The latest development code, including temporary experiments
  371. and un-reviewed code, is available via the BIND 10 code revision
  372. control system. This is powered by Subversion and all the BIND 10
  373. development is public.
  374. The leading development is done in the <quote>trunk</quote>.
  375. </para>
  376. <para>
  377. The code can be checked out from <filename>svn://bind10.isc.org/svn/bind10</filename>; for example to check out the trunk:
  378. <screen>$ <userinput>svn co svn://bind10.isc.org/svn/bind10/trunk</userinput></screen>
  379. </para>
  380. <para>
  381. When checking out the code from
  382. the code version control system, it doesn't include the
  383. generated configure script, Makefile.in files, nor the
  384. related configure files.
  385. They can be created by running <command>autoreconf</command>
  386. with the <option>--install</option> switch.
  387. This will run <command>autoconf</command>,
  388. <command>aclocal</command>,
  389. <command>libtoolize</command>,
  390. <command>autoheader</command>,
  391. <command>automake</command>,
  392. and related commands.
  393. </para>
  394. </section>
  395. <section>
  396. <title>Configure before the build</title>
  397. <para>
  398. BIND 10 uses the GNU Build System to discover build environment
  399. details.
  400. To generate the makefiles using the defaults, simply run:
  401. <screen>$ <userinput>./configure</userinput></screen>
  402. </para>
  403. <para>
  404. Run <command>./configure</command> with the <option>--help</option>
  405. switch to view the different options. The commonly-used options are:
  406. <variablelist>
  407. <varlistentry>
  408. <term>--prefix</term>
  409. <listitem>
  410. <simpara>Define the the installation location (the
  411. default is <filename>/usr/local/</filename>).
  412. </simpara>
  413. </listitem>
  414. </varlistentry>
  415. <varlistentry>
  416. <term>--with-boost-include</term>
  417. <listitem>
  418. <simpara>Define the path to find the Boost headers.
  419. </simpara>
  420. </listitem>
  421. </varlistentry>
  422. <varlistentry>
  423. <term>--with-boost-lib</term>
  424. <listitem>
  425. <simpara>Define the path to find the Boost library.
  426. </simpara>
  427. </listitem>
  428. </varlistentry>
  429. <varlistentry>
  430. <term>--with-boost-python</term>
  431. <listitem>
  432. <simpara>Define to use the Boost Python library.
  433. </simpara>
  434. </listitem>
  435. </varlistentry>
  436. <varlistentry>
  437. <term>--with-pythonpath</term>
  438. <listitem>
  439. <simpara>Define the path to Python 3.1 if it is not in the
  440. standard execution path.
  441. </simpara>
  442. </listitem>
  443. </varlistentry>
  444. <varlistentry>
  445. <term>--with-gtest</term>
  446. <listitem>
  447. <simpara>Enable building the C++ Unit Tests using the
  448. Google Tests framework. Optionally this can define the
  449. path to the gtest header files and library.
  450. </simpara>
  451. </listitem>
  452. </varlistentry>
  453. </variablelist>
  454. </para>
  455. <!-- TODO: lcov -->
  456. <para>
  457. For example, the following configures it
  458. build with Boost Python support (for Python DNS library),
  459. find the Boost headers and library, find the
  460. Python interpreter, and sets the installation location:
  461. <screen>$ <userinput>./configure --with-boost-lib=/usr/pkg/lib \
  462. --with-boost-include=/usr/pkg/include \
  463. --with-boost-python \
  464. --with-pythonpath=/usr/pkg/bin/python3.1 \
  465. --prefix=/opt/bind10</userinput></screen>
  466. </para>
  467. <para>
  468. If the configure fails, it may be due to missing or old
  469. dependencies.
  470. </para>
  471. </section>
  472. <section>
  473. <title>Build</title>
  474. <para>
  475. After the configure step is complete, to build the executables
  476. from the C++ code and prepare the Python scripts, run:
  477. <screen>$ <userinput>make</userinput></screen>
  478. </para>
  479. </section>
  480. <section>
  481. <title>Install</title>
  482. <para>
  483. To install the BIND 10 executables, support files,
  484. and documentation, run:
  485. <screen>$ <userinput>make install</userinput></screen>
  486. </para>
  487. <note>
  488. <para>The install step may require superuser privileges.</para>
  489. </note>
  490. <!-- Trac #148 -->
  491. <note><simpara>
  492. Depending on your system and the location of your Boost
  493. Python and Python shared libraries, you may need to
  494. configure your run-time linker to find them (such as
  495. setting LD_LIBRARY_PATH).
  496. </simpara></note>
  497. </section>
  498. <!-- TODO: tests -->
  499. <section>
  500. <title>Install Hierarchy</title>
  501. <para>
  502. The following is the layout of the complete BIND 10 installation:
  503. <itemizedlist>
  504. <listitem>
  505. <simpara>
  506. <filename>bin/</filename> &mdash;
  507. general tools and diagnostic clients.
  508. </simpara>
  509. </listitem>
  510. <listitem>
  511. <simpara>
  512. <filename>etc/bind10-devel/</filename> &mdash;
  513. configuration files.
  514. </simpara>
  515. </listitem>
  516. <listitem>
  517. <simpara>
  518. <filename>lib/</filename> &mdash;
  519. libraries and python modules.
  520. </simpara>
  521. </listitem>
  522. <listitem>
  523. <simpara>
  524. <filename>libexec/bind10-devel/</filename> &mdash;
  525. executables that a user wouldn't normally run directly and
  526. are not run independently.
  527. These are the BIND 10 modules which are daemons started by
  528. the <command>bind10</command> tool.
  529. </simpara>
  530. </listitem>
  531. <listitem>
  532. <simpara>
  533. <filename>sbin/</filename> &mdash;
  534. commands used by the system administrator.
  535. </simpara>
  536. </listitem>
  537. <listitem>
  538. <simpara>
  539. <filename>share/bind10-devel/</filename> &mdash;
  540. configuration specifications.
  541. </simpara>
  542. </listitem>
  543. <listitem>
  544. <simpara>
  545. <filename>share/man/</filename> &mdash;
  546. manual pages (online documentation).
  547. </simpara>
  548. </listitem>
  549. <listitem>
  550. <simpara>
  551. <filename>var/bind10-devel/</filename> &mdash;
  552. data source and configuration databases.
  553. </simpara>
  554. </listitem>
  555. </itemizedlist>
  556. </para>
  557. </section>
  558. </section>
  559. <!--
  560. <section id="install.troubleshooting">
  561. <title>Troubleshooting</title>
  562. <para>
  563. </para>
  564. </section>
  565. -->
  566. </chapter>
  567. <chapter id="bind10">
  568. <title>Starting BIND10 with <command>bind10</command></title>
  569. <para>
  570. BIND 10 provides the <command>bind10</command> command which
  571. starts up the required processes.
  572. <command>bind10</command>
  573. will also restart processes that exit unexpectedly.
  574. This is the only command needed to start the BIND 10 system.
  575. </para>
  576. <para>
  577. After starting the <command>b10-msgq</command> communications channel,
  578. <command>bind10</command> connects to it,
  579. runs the configuration manager, and reads its own configuration.
  580. Then it starts the other modules.
  581. </para>
  582. <para>
  583. The <command>b10-msgq</command> and <command>b10-cfgmgr</command>
  584. services make up the core. The <command>b10-msgq</command> daemon
  585. provides the communication channel between every part of the system.
  586. The <command>b10-cfgmgr</command> daemon is always needed by every
  587. module, if only to send information about themselves somewhere,
  588. but more importantly to ask about their own settings, and
  589. about other modules.
  590. The <command>bind10</command> master process will also start up
  591. <command>b10-cmdctl</command> for admins to communicate with the
  592. system, <command>b10-auth</command> for Authoritative DNS service,
  593. <command>b10-xfrin</command> for inbound DNS zone transfers.
  594. and <command>b10-xfrout</command> for outbound DNS zone transfers.
  595. </para>
  596. <section id="start">
  597. <title>Starting BIND 10</title>
  598. <para>
  599. To start the BIND 10 service, simply run <command>bind10</command>.
  600. Run it with the <option>--verbose</option> switch to
  601. get additional debugging or diagnostic output.
  602. </para>
  603. <!-- TODO: note it doesn't go into background -->
  604. </section>
  605. </chapter>
  606. <chapter id="msgq">
  607. <title>Command channel</title>
  608. <para>
  609. The BIND 10 components use the <command>b10-msgq</command>
  610. message routing daemon to communicate with other BIND 10 components.
  611. The <command>b10-msgq</command> implements what is called the
  612. <quote>Command Channel</quote>.
  613. Processes intercommunicate by sending messages on the command
  614. channel.
  615. Example messages include shutdown, get configurations, and set
  616. configurations.
  617. This Command Channel is not used for DNS message passing.
  618. It is used only to control and monitor the BIND 10 system.
  619. </para>
  620. <para>
  621. Administrators do not communicate directly with the
  622. <command>b10-msgq</command> daemon.
  623. By default, BIND 10 uses port 9912 for the
  624. <command>b10-msgq</command> service.
  625. It listens on 127.0.0.1.
  626. </para>
  627. <!-- TODO: this is broken, see Trac #111
  628. <para>
  629. To select an alternate port for the <command>b10-msgq</command> to
  630. use, run <command>bind10</command> specifying the option:
  631. <screen> $ <userinput>bind10 -TODO-msgq-port 9912</userinput></screen>
  632. </para>
  633. -->
  634. <!-- TODO: upcoming plans:
  635. Unix domain sockets
  636. -->
  637. </chapter>
  638. <chapter id="cfgmgr">
  639. <title>Configuration manager</title>
  640. <para>
  641. The configuration manager, <command>b10-cfgmgr</command>,
  642. handles all BIND 10 system configuration. It provides
  643. persistent storage for configuration, and notifies running
  644. modules of configuration changes.
  645. </para>
  646. <para>
  647. The <command>b10-auth</command> and <command>b10-xfrin</command>
  648. daemons and other components receive their configurations
  649. from the configuration manager over the <command>b10-msgq</command>
  650. command channel.
  651. </para>
  652. <para>The administrator doesn't connect to it directly, but
  653. uses a user interface to communicate with the configuration
  654. manager via <command>b10-cmdctl</command>'s REST-ful interface.
  655. <command>b10-cmdctl</command> is covered in <xref linkend="cmdctl"/>.
  656. </para>
  657. <!-- TODO -->
  658. <note>
  659. <para>
  660. The development prototype release only provides the
  661. <command>bindctl</command> as a user interface to
  662. <command>b10-cmdctl</command>.
  663. Upcoming releases will provide another interactive command-line
  664. interface and a web-based interface.
  665. </para>
  666. </note>
  667. <para>
  668. The <command>b10-cfgmgr</command> daemon can send all
  669. specifications and all current settings to the
  670. <command>bindctl</command> client (via
  671. <command>b10-cmdctl</command>).
  672. </para>
  673. <para>
  674. <command>b10-cfgmgr</command> relays configurations received
  675. from <command>b10-cmdctl</command> to the appropriate modules.
  676. </para>
  677. <!-- TODO:
  678. Configuration settings for itself are defined as ConfigManager.
  679. TODO: show examples
  680. -->
  681. <!-- TODO:
  682. config changes are actually commands to cfgmgr
  683. -->
  684. <!-- TODO: what about run time config to change this? -->
  685. <!-- jelte: > config set cfgmgr/config_database <file> -->
  686. <!-- TODO: what about command line switch to change this? -->
  687. <para>
  688. The stored configuration file is at
  689. <filename>/usr/local/var/bind10-devel/b10-config.db</filename>.
  690. (The full path is what was defined at build configure time for
  691. <option>--localstatedir</option>.
  692. The default is <filename>/usr/local/var/</filename>.)
  693. The format is loosely based on JSON and is directly parseable
  694. python, but this may change in a future version.
  695. This configuration data file is not manually edited by the
  696. administrator.
  697. </para>
  698. <!--
  699. Well the specfiles have a more fixed format (they must contain specific
  700. stuff), but those are also directly parseable python structures (and
  701. 'coincidentally', our data::element string representation is the same)
  702. loosely based on json, tweaked to be directly parseable in python, but a
  703. subset of that.
  704. wiki page is http://bind10.isc.org/wiki/DataElementDesign
  705. nope, spec files are written by module developers, and db should be done
  706. through bindctl and friends
  707. -->
  708. <para>
  709. The configuration manager does not have any command line arguments.
  710. Normally it is not started manually, but is automatically
  711. started using the <command>bind10</command> master process
  712. (as covered in <xref linkend="bind10"/>).
  713. </para>
  714. <!-- TODO: upcoming plans:
  715. configuration for configuration manager itself. And perhaps we might
  716. change the messaging protocol, but an admin should never see any of that
  717. -->
  718. <!-- TODO: show examples, test this -->
  719. <!--
  720. , so an admin can simply run bindctl,
  721. do config show, and it shows all modules; config show >module> shows all
  722. options for that module
  723. -->
  724. </chapter>
  725. <chapter id="cmdctl">
  726. <title>Remote control daemon</title>
  727. <para>
  728. <command>b10-cmdctl</command> is the gateway between
  729. administrators and the BIND 10 system.
  730. It is a HTTPS server that uses standard HTTP Digest
  731. Authentication for username and password validation.
  732. It provides a REST-ful interface for accessing and controlling
  733. BIND 10.
  734. </para>
  735. <!-- TODO: copy examples from wiki, try with wget -->
  736. <para>
  737. When <command>b10-cmdctl</command> starts, it firsts
  738. asks <command>b10-cfgmgr</command> about what modules are
  739. running and what their configuration is (over the
  740. <command>b10-msgq</command> channel). Then it will start listening
  741. on HTTPS for clients &mdash; the user interface &mdash; such
  742. as <command>bindctl</command>.
  743. </para>
  744. <para>
  745. <command>b10-cmdctl</command> directly sends commands
  746. (received from the user interface) to the specified component.
  747. Configuration changes are actually commands to
  748. <command>b10-cfgmgr</command> so are sent there.
  749. </para>
  750. <!--
  751. TODO:
  752. "For bindctl to list a module's available configurations and
  753. available commands, it communicates over the cmdctl REST interface.
  754. cmdctl then asks cfgmgr over the msgq command channel. Then cfgmgr
  755. asks the module for its specification and also cfgmgr looks in its
  756. own configuration database for current values."
  757. (05:32:03) jelte: i think cmdctl doesn't request it upon a incoming
  758. GET, but rather requests it once and then listens in for updates,
  759. but you might wanna check with likun
  760. -->
  761. <!-- TODO: replace /usr/local -->
  762. <!-- TODO: permissions -->
  763. <para>The HTTPS server requires a private key,
  764. such as a RSA PRIVATE KEY.
  765. The default location is at
  766. <filename>/usr/local/etc/bind10-devel/cmdctl-keyfile.pem</filename>.
  767. (A sample key is at
  768. <filename>/usr/local/share/bind10-devel/cmdctl-keyfile.pem</filename>.)
  769. It also uses a certificate located at
  770. <filename>/usr/local/etc/bind10-devel/cmdctl-certfile.pem</filename>.
  771. (A sample certificate is at
  772. <filename>/usr/local/share/bind10-devel/cmdctl-certfile.pem</filename>.)
  773. This may be a self-signed certificate or purchased from a
  774. certification authority.
  775. </para>
  776. <note><para>
  777. The HTTPS server doesn't support a certificate request from a
  778. client (at this time).
  779. <!-- TODO: maybe allow request from server side -->
  780. The <command>b10-cmdctl</command> daemon does not provide a
  781. public service. If any client wants to control BIND 10, then
  782. a certificate needs to be first received from the BIND 10
  783. administrator.
  784. The BIND 10 installation provides a sample PEM bundle that matches
  785. the sample key and certificate.
  786. </para></note>
  787. <!-- TODO: cross-ref -->
  788. <!-- TODO
  789. openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
  790. but that is a single file, maybethis should go back to that format?
  791. -->
  792. <!--
  793. <para>
  794. (08:20:56) shane: It is in theory possible to run without cmdctl.
  795. (08:21:02) shane: I think we discussed this.
  796. </para>
  797. -->
  798. <!-- TODO: Please check https://bind10.isc.org/wiki/cmd-ctrld -->
  799. <para>
  800. The <command>b10-cmdctl</command> daemon also requires
  801. the user account file located at
  802. <filename>/usr/local/etc/bind10-devel/cmdctl-accounts.csv</filename>.
  803. This comma-delimited file lists the accounts with a user name,
  804. hashed password, and salt.
  805. (A sample file is at
  806. <filename>/usr/local/share/bind10-devel/cmdctl-accounts.csv</filename>.
  807. It contains the user named <quote>root</quote> with the password
  808. <quote>bind10</quote>.)
  809. </para>
  810. <para>
  811. The administrator may create a user account with the
  812. <command>b10-cmdctl-usermgr</command> tool.
  813. </para>
  814. <!-- TODO: show example -->
  815. <!-- TODO: does cmdctl need to be restarted to change cert or key
  816. or accounts database -->
  817. <para>
  818. By default the HTTPS server listens on the localhost port 8080.
  819. The port can be set by using the <option>--port</option> command line option.
  820. The address to listen on can be set using the <option>--address</option> command
  821. line argument.
  822. Each HTTPS connection is stateless and timesout in 1200 seconds
  823. by default. This can be
  824. redefined by using the <option>--idle-timeout</option> command line argument.
  825. </para>
  826. <section id="cmdctl.spec">
  827. <title>Configuration specification for b10-cmdctl</title>
  828. <para>
  829. The configuration items for <command>b10-cmdctl</command> are:
  830. key_file
  831. cert_file
  832. accounts_file
  833. </para>
  834. <!-- TODO -->
  835. <para>
  836. The control commands are:
  837. print_settings
  838. shutdown
  839. </para>
  840. <!-- TODO -->
  841. </section>
  842. <!--
  843. TODO
  844. (12:21:30) jinmei: I'd like to have sample session using a command line www client such as wget
  845. (12:21:33) jinmei: btw
  846. -->
  847. </chapter>
  848. <chapter id="bindctl">
  849. <title>Control and configure user interface</title>
  850. <note><para>
  851. For this development prototype release, <command>bindctl</command>
  852. is the only user interface. It is expected that upcoming
  853. releases will provide another interactive command-line
  854. interface and a web-based interface for controlling and
  855. configuring BIND 10.
  856. </para></note>
  857. <para>
  858. The <command>bindctl</command> tool provides an interactive
  859. prompt for configuring, controlling, and querying the BIND 10
  860. components.
  861. It communicates directly with a REST-ful interface over HTTPS
  862. provided by <command>b10-cmdctl</command>. It doesn't
  863. communicate to any other components directly.
  864. </para>
  865. <!-- TODO: explain and show interface -->
  866. <para>
  867. Configuration changes are actually commands to
  868. <command>b10-cfgmgr</command>. So when <command>bindctl</command>
  869. sends a configuration, it is sent to <command>b10-cmdctl</command>
  870. (over a HTTPS connection); then <command>b10-cmdctl</command>
  871. sends the command (over a <command>b10-msgq</command> command
  872. channel) to <command>b10-cfgmgr</command> which then stores
  873. the details and relays (over a <command>b10-msgq</command> command
  874. channel) the configuration on to the specified module.
  875. </para>
  876. <para>
  877. </para>
  878. </chapter>
  879. <chapter id="authserver">
  880. <title>Authoritative Server</title>
  881. <para>
  882. The <command>b10-auth</command> is the authoritative DNS server.
  883. It supports EDNS0 and DNSSEC. It supports IPv6.
  884. Normally it is started by the <command>bind10</command> master
  885. process.
  886. </para>
  887. <note><simpara>
  888. This development prototype release listens on all interfaces
  889. and the non-standard port 5300.
  890. </simpara></note>
  891. <section>
  892. <title>Server Configurations</title>
  893. <!-- TODO: offers command line options but not used
  894. since we used bind10 -->
  895. <para>
  896. <command>b10-auth</command> is configured via the
  897. <command>b10-cfgmgr</command> configuration manager.
  898. The module name is <quote>Auth</quote>.
  899. The configuration data item is:
  900. <variablelist>
  901. <varlistentry>
  902. <term>database_file</term>
  903. <listitem>
  904. <simpara>This is an optional string to define the path to find
  905. the SQLite3 database file.
  906. <!-- TODO: -->
  907. Note: Later the DNS server will use various data source backends.
  908. This may be a temporary setting until then.
  909. </simpara>
  910. </listitem>
  911. </varlistentry>
  912. </variablelist>
  913. </para>
  914. <para>
  915. The configuration command is:
  916. <variablelist>
  917. <varlistentry>
  918. <term>shutdown</term>
  919. <listitem>
  920. <simpara>Stop the authoritative DNS server.
  921. </simpara>
  922. <!-- TODO: what happens when this is sent, will bind10 restart? -->
  923. </listitem>
  924. </varlistentry>
  925. </variablelist>
  926. </para>
  927. <!-- TODO: examples of setting or running above? -->
  928. </section>
  929. <section>
  930. <title>Data Source Backends</title>
  931. <note><para>
  932. For the development prototype release, <command>b10-auth</command>
  933. only supports the SQLite3 data source backend.
  934. Upcoming versions will be able to use multiple different
  935. data sources, such as MySQL, Berkeley DB, or in-memory DB.
  936. </para></note>
  937. <para>
  938. By default, the SQLite3 backend uses the data file located at
  939. <filename>/usr/local/var/bind10-devel/zone.sqlite3</filename>.
  940. (The full path is what was defined at build configure time for
  941. <option>--localstatedir</option>.
  942. The default is <filename>/usr/local/var/</filename>.)
  943. This data file location may be changed by defining the
  944. <quote>database_file</quote> configuration.
  945. </para>
  946. </section>
  947. <section>
  948. <title>Loading Master Zones Files</title>
  949. <para>
  950. RFC 1035 style DNS master zone files may imported
  951. into a BIND 10 data source by using the
  952. <command>b10-loadzone</command> utility.
  953. </para>
  954. <para>
  955. <command>b10-loadzone</command> supports the following
  956. special directives (control entries):
  957. <variablelist>
  958. <varlistentry>
  959. <term>$INCLUDE</term>
  960. <listitem>
  961. <simpara>Loads an additional zone file. This may be recursive.
  962. </simpara>
  963. </listitem>
  964. </varlistentry>
  965. <varlistentry>
  966. <term>$ORIGIN</term>
  967. <listitem>
  968. <simpara>Defines the relative domain name.
  969. </simpara>
  970. </listitem>
  971. </varlistentry>
  972. <varlistentry>
  973. <term>$TTL</term>
  974. <listitem>
  975. <simpara>Defines the time-to-live value used for following
  976. records that don't include a TTL.
  977. </simpara>
  978. </listitem>
  979. </varlistentry>
  980. </variablelist>
  981. </para>
  982. <para>
  983. The <option>-o</option> argument may be used to define the
  984. default origin for loaded zone file records.
  985. </para>
  986. <note>
  987. <para>
  988. In the development prototype release, only the SQLite3 back
  989. end is used.
  990. By default, it stores the zone data in
  991. <filename>/usr/local/var/bind10-devel/zone.sqlite3</filename>
  992. unless the <option>-d</option> switch is used to set the
  993. database filename.
  994. Multiple zones are stored in a single SQLite3 zone database.
  995. </para>
  996. </note>
  997. <para>
  998. If you reload a zone already existing in the database,
  999. all records from that prior zone disappear and a whole new set
  1000. appears.
  1001. </para>
  1002. <!--TODO: permissions for xfrin or loadzone to create the file -->
  1003. </section>
  1004. <!--
  1005. TODO
  1006. <section>
  1007. <title>Troubleshooting</title>
  1008. <para>
  1009. </para>
  1010. </section>
  1011. -->
  1012. </chapter>
  1013. <chapter id="xfrin">
  1014. <title>Incoming Zone Transfers</title>
  1015. <para>
  1016. The <command>b10-xfrin</command> process is started by
  1017. <command>bind10</command>.
  1018. It can be manually triggered to request an AXFR zone
  1019. transfer. When received, it is stored in the BIND 10
  1020. data store, and its records can be served by
  1021. <command>b10-auth</command>.
  1022. This allows the BIND 10 server to provide
  1023. <quote>secondary</quote> service.
  1024. </para>
  1025. <note><simpara>
  1026. The current development release of BIND 10 only supports
  1027. AXFR. (IXFR is not supported.)
  1028. It also does not yet support automated SOA checks.
  1029. </simpara></note>
  1030. <para>
  1031. To manually trigger a zone transfer to retrieve a remote zone,
  1032. you may use the <command>bindctl</command> utility.
  1033. For example, at the <command>bindctl</command> prompt run:
  1034. <screen>&gt; <userinput>Xfrin retransfer zone_name="<option>foo.example.org</option>" master=<option>192.0.2.99</option></userinput></screen>
  1035. </para>
  1036. </chapter>
  1037. <chapter id="xfrout">
  1038. <title>Outbound Zone Transfers</title>
  1039. <para>
  1040. The <command>b10-xfrout</command> process is started by
  1041. <command>bind10</command>.
  1042. When the <command>b10-auth</command> authoritative DNS server
  1043. receives an AXFR request, <command>b10-xfrout</command>
  1044. sends the zone.
  1045. This is used to provide master DNS service to share zones
  1046. to secondary name servers.
  1047. </para>
  1048. <note><simpara>
  1049. The current development release of BIND 10 only supports
  1050. AXFR. (IXFR is not supported.)
  1051. It also does not yet support NOTIFY.
  1052. Access control is not yet provided.
  1053. </simpara></note>
  1054. <!--
  1055. TODO:
  1056. xfrout section:
  1057. auth servers checks for AXFR query
  1058. sends the XFR query to the xfrout module
  1059. uses /tmp/auth_xfrout_conn which is a socket
  1060. what is XfroutClient xfr_client??
  1061. /tmp/auth_xfrout_conn is not removed
  1062. -->
  1063. </chapter>
  1064. <!-- TODO: how to help: run unit tests, join lists, review trac tickets -->
  1065. <!-- <index> <title>Index</title> </index> -->
  1066. </book>
  1067. <!--
  1068. TODO:
  1069. Overview
  1070. Getting BIND 10 Installed
  1071. Basics
  1072. Dependencies
  1073. Optional
  1074. Advanced
  1075. How Does Everything Work Together?
  1076. Need Help?
  1077. -->