bind10-guide.xml 38 KB

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