bind10-guide.xml 48 KB

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