bind10-guide.xml 40 KB

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