bind10-guide.xml 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329
  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 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. <note>
  644. <para>
  645. If the setproctitle Python module is detected at start up,
  646. the process names for the Python-based daemons will be renamed
  647. to better identify them instead of just <quote>python</quote>.
  648. This is not needed on some operating systems.
  649. </para>
  650. </note>
  651. </section>
  652. </chapter>
  653. <chapter id="msgq">
  654. <title>Command channel</title>
  655. <para>
  656. The BIND 10 components use the <command>b10-msgq</command>
  657. message routing daemon to communicate with other BIND 10 components.
  658. The <command>b10-msgq</command> implements what is called the
  659. <quote>Command Channel</quote>.
  660. Processes intercommunicate by sending messages on the command
  661. channel.
  662. Example messages include shutdown, get configurations, and set
  663. configurations.
  664. This Command Channel is not used for DNS message passing.
  665. It is used only to control and monitor the BIND 10 system.
  666. </para>
  667. <para>
  668. Administrators do not communicate directly with the
  669. <command>b10-msgq</command> daemon.
  670. By default, BIND 10 uses port 9912 for the
  671. <command>b10-msgq</command> service.
  672. It listens on 127.0.0.1.
  673. </para>
  674. <!-- TODO: this is broken, see Trac #111
  675. <para>
  676. To select an alternate port for the <command>b10-msgq</command> to
  677. use, run <command>bind10</command> specifying the option:
  678. <screen> $ <userinput>bind10 -TODO-msgq-port 9912</userinput></screen>
  679. </para>
  680. -->
  681. <!-- TODO: upcoming plans:
  682. Unix domain sockets
  683. -->
  684. </chapter>
  685. <chapter id="cfgmgr">
  686. <title>Configuration manager</title>
  687. <para>
  688. The configuration manager, <command>b10-cfgmgr</command>,
  689. handles all BIND 10 system configuration. It provides
  690. persistent storage for configuration, and notifies running
  691. modules of configuration changes.
  692. </para>
  693. <para>
  694. The <command>b10-auth</command> and <command>b10-xfrin</command>
  695. daemons and other components receive their configurations
  696. from the configuration manager over the <command>b10-msgq</command>
  697. command channel.
  698. </para>
  699. <para>The administrator doesn't connect to it directly, but
  700. uses a user interface to communicate with the configuration
  701. manager via <command>b10-cmdctl</command>'s REST-ful interface.
  702. <command>b10-cmdctl</command> is covered in <xref linkend="cmdctl"/>.
  703. </para>
  704. <!-- TODO -->
  705. <note>
  706. <para>
  707. The development prototype release only provides the
  708. <command>bindctl</command> as a user interface to
  709. <command>b10-cmdctl</command>.
  710. Upcoming releases will provide another interactive command-line
  711. interface and a web-based interface.
  712. </para>
  713. </note>
  714. <para>
  715. The <command>b10-cfgmgr</command> daemon can send all
  716. specifications and all current settings to the
  717. <command>bindctl</command> client (via
  718. <command>b10-cmdctl</command>).
  719. </para>
  720. <para>
  721. <command>b10-cfgmgr</command> relays configurations received
  722. from <command>b10-cmdctl</command> to the appropriate modules.
  723. </para>
  724. <!-- TODO:
  725. Configuration settings for itself are defined as ConfigManager.
  726. TODO: show examples
  727. -->
  728. <!-- TODO:
  729. config changes are actually commands to cfgmgr
  730. -->
  731. <!-- TODO: what about run time config to change this? -->
  732. <!-- jelte: > config set cfgmgr/config_database <file> -->
  733. <!-- TODO: what about command line switch to change this? -->
  734. <para>
  735. The stored configuration file is at
  736. <filename>/usr/local/var/bind10-devel/b10-config.db</filename>.
  737. (The full path is what was defined at build configure time for
  738. <option>--localstatedir</option>.
  739. The default is <filename>/usr/local/var/</filename>.)
  740. The format is loosely based on JSON and is directly parseable
  741. python, but this may change in a future version.
  742. This configuration data file is not manually edited by the
  743. administrator.
  744. </para>
  745. <!--
  746. Well the specfiles have a more fixed format (they must contain specific
  747. stuff), but those are also directly parseable python structures (and
  748. 'coincidentally', our data::element string representation is the same)
  749. loosely based on json, tweaked to be directly parseable in python, but a
  750. subset of that.
  751. wiki page is http://bind10.isc.org/wiki/DataElementDesign
  752. nope, spec files are written by module developers, and db should be done
  753. through bindctl and friends
  754. -->
  755. <para>
  756. The configuration manager does not have any command line arguments.
  757. Normally it is not started manually, but is automatically
  758. started using the <command>bind10</command> master process
  759. (as covered in <xref linkend="bind10"/>).
  760. </para>
  761. <!-- TODO: upcoming plans:
  762. configuration for configuration manager itself. And perhaps we might
  763. change the messaging protocol, but an admin should never see any of that
  764. -->
  765. <!-- TODO: show examples, test this -->
  766. <!--
  767. , so an admin can simply run bindctl,
  768. do config show, and it shows all modules; config show >module> shows all
  769. options for that module
  770. -->
  771. </chapter>
  772. <chapter id="cmdctl">
  773. <title>Remote control daemon</title>
  774. <para>
  775. <command>b10-cmdctl</command> is the gateway between
  776. administrators and the BIND 10 system.
  777. It is a HTTPS server that uses standard HTTP Digest
  778. Authentication for username and password validation.
  779. It provides a REST-ful interface for accessing and controlling
  780. BIND 10.
  781. </para>
  782. <!-- TODO: copy examples from wiki, try with wget -->
  783. <para>
  784. When <command>b10-cmdctl</command> starts, it firsts
  785. asks <command>b10-cfgmgr</command> about what modules are
  786. running and what their configuration is (over the
  787. <command>b10-msgq</command> channel). Then it will start listening
  788. on HTTPS for clients &mdash; the user interface &mdash; such
  789. as <command>bindctl</command>.
  790. </para>
  791. <para>
  792. <command>b10-cmdctl</command> directly sends commands
  793. (received from the user interface) to the specified component.
  794. Configuration changes are actually commands to
  795. <command>b10-cfgmgr</command> so are sent there.
  796. </para>
  797. <!--
  798. TODO:
  799. "For bindctl to list a module's available configurations and
  800. available commands, it communicates over the cmdctl REST interface.
  801. cmdctl then asks cfgmgr over the msgq command channel. Then cfgmgr
  802. asks the module for its specification and also cfgmgr looks in its
  803. own configuration database for current values."
  804. (05:32:03) jelte: i think cmdctl doesn't request it upon a incoming
  805. GET, but rather requests it once and then listens in for updates,
  806. but you might wanna check with likun
  807. -->
  808. <!-- TODO: replace /usr/local -->
  809. <!-- TODO: permissions -->
  810. <para>The HTTPS server requires a private key,
  811. such as a RSA PRIVATE KEY.
  812. The default location is at
  813. <filename>/usr/local/etc/bind10-devel/cmdctl-keyfile.pem</filename>.
  814. (A sample key is at
  815. <filename>/usr/local/share/bind10-devel/cmdctl-keyfile.pem</filename>.)
  816. It also uses a certificate located at
  817. <filename>/usr/local/etc/bind10-devel/cmdctl-certfile.pem</filename>.
  818. (A sample certificate is at
  819. <filename>/usr/local/share/bind10-devel/cmdctl-certfile.pem</filename>.)
  820. This may be a self-signed certificate or purchased from a
  821. certification authority.
  822. </para>
  823. <note><para>
  824. The HTTPS server doesn't support a certificate request from a
  825. client (at this time).
  826. <!-- TODO: maybe allow request from server side -->
  827. The <command>b10-cmdctl</command> daemon does not provide a
  828. public service. If any client wants to control BIND 10, then
  829. a certificate needs to be first received from the BIND 10
  830. administrator.
  831. The BIND 10 installation provides a sample PEM bundle that matches
  832. the sample key and certificate.
  833. </para></note>
  834. <!-- TODO: cross-ref -->
  835. <!-- TODO
  836. openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
  837. but that is a single file, maybethis should go back to that format?
  838. -->
  839. <!--
  840. <para>
  841. (08:20:56) shane: It is in theory possible to run without cmdctl.
  842. (08:21:02) shane: I think we discussed this.
  843. </para>
  844. -->
  845. <!-- TODO: Please check https://bind10.isc.org/wiki/cmd-ctrld -->
  846. <para>
  847. The <command>b10-cmdctl</command> daemon also requires
  848. the user account file located at
  849. <filename>/usr/local/etc/bind10-devel/cmdctl-accounts.csv</filename>.
  850. This comma-delimited file lists the accounts with a user name,
  851. hashed password, and salt.
  852. (A sample file is at
  853. <filename>/usr/local/share/bind10-devel/cmdctl-accounts.csv</filename>.
  854. It contains the user named <quote>root</quote> with the password
  855. <quote>bind10</quote>.)
  856. </para>
  857. <para>
  858. The administrator may create a user account with the
  859. <command>b10-cmdctl-usermgr</command> tool.
  860. </para>
  861. <!-- TODO: show example -->
  862. <!-- TODO: does cmdctl need to be restarted to change cert or key
  863. or accounts database -->
  864. <para>
  865. By default the HTTPS server listens on the localhost port 8080.
  866. The port can be set by using the <option>--port</option> command line option.
  867. The address to listen on can be set using the <option>--address</option> command
  868. line argument.
  869. Each HTTPS connection is stateless and timesout in 1200 seconds
  870. by default. This can be
  871. redefined by using the <option>--idle-timeout</option> command line argument.
  872. </para>
  873. <section id="cmdctl.spec">
  874. <title>Configuration specification for b10-cmdctl</title>
  875. <para>
  876. The configuration items for <command>b10-cmdctl</command> are:
  877. key_file
  878. cert_file
  879. accounts_file
  880. </para>
  881. <!-- TODO -->
  882. <para>
  883. The control commands are:
  884. print_settings
  885. <!-- TODO: remove that -->
  886. shutdown
  887. </para>
  888. <!-- TODO -->
  889. </section>
  890. <!--
  891. TODO
  892. (12:21:30) jinmei: I'd like to have sample session using a command line www client such as wget
  893. (12:21:33) jinmei: btw
  894. -->
  895. </chapter>
  896. <chapter id="bindctl">
  897. <title>Control and configure user interface</title>
  898. <note><para>
  899. For this development prototype release, <command>bindctl</command>
  900. is the only user interface. It is expected that upcoming
  901. releases will provide another interactive command-line
  902. interface and a web-based interface for controlling and
  903. configuring BIND 10.
  904. </para></note>
  905. <para>
  906. The <command>bindctl</command> tool provides an interactive
  907. prompt for configuring, controlling, and querying the BIND 10
  908. components.
  909. It communicates directly with a REST-ful interface over HTTPS
  910. provided by <command>b10-cmdctl</command>. It doesn't
  911. communicate to any other components directly.
  912. </para>
  913. <!-- TODO: explain and show interface -->
  914. <para>
  915. Configuration changes are actually commands to
  916. <command>b10-cfgmgr</command>. So when <command>bindctl</command>
  917. sends a configuration, it is sent to <command>b10-cmdctl</command>
  918. (over a HTTPS connection); then <command>b10-cmdctl</command>
  919. sends the command (over a <command>b10-msgq</command> command
  920. channel) to <command>b10-cfgmgr</command> which then stores
  921. the details and relays (over a <command>b10-msgq</command> command
  922. channel) the configuration on to the specified module.
  923. </para>
  924. <para>
  925. </para>
  926. </chapter>
  927. <chapter id="authserver">
  928. <title>Authoritative Server</title>
  929. <para>
  930. The <command>b10-auth</command> is the authoritative DNS server.
  931. It supports EDNS0 and DNSSEC. It supports IPv6.
  932. Normally it is started by the <command>bind10</command> master
  933. process.
  934. </para>
  935. <section>
  936. <title>Server Configurations</title>
  937. <!-- TODO: offers command line options but not used
  938. since we used bind10 -->
  939. <para>
  940. <command>b10-auth</command> is configured via the
  941. <command>b10-cfgmgr</command> configuration manager.
  942. The module name is <quote>Auth</quote>.
  943. The configuration data item is:
  944. <variablelist>
  945. <varlistentry>
  946. <term>database_file</term>
  947. <listitem>
  948. <simpara>This is an optional string to define the path to find
  949. the SQLite3 database file.
  950. <!-- TODO: -->
  951. Note: Later the DNS server will use various data source backends.
  952. This may be a temporary setting until then.
  953. </simpara>
  954. </listitem>
  955. </varlistentry>
  956. </variablelist>
  957. </para>
  958. <para>
  959. The configuration command is:
  960. <variablelist>
  961. <varlistentry>
  962. <term>shutdown</term>
  963. <listitem>
  964. <simpara>Stop the authoritative DNS server.
  965. </simpara>
  966. <!-- TODO: what happens when this is sent, will bind10 restart? -->
  967. </listitem>
  968. </varlistentry>
  969. </variablelist>
  970. </para>
  971. <!-- TODO: examples of setting or running above? -->
  972. </section>
  973. <section>
  974. <title>Data Source Backends</title>
  975. <note><para>
  976. For the development prototype release, <command>b10-auth</command>
  977. supports a SQLite3 data source backend and in-memory data source
  978. backend.
  979. Upcoming versions will be able to use multiple different
  980. data sources, such as MySQL and Berkeley DB.
  981. </para></note>
  982. <para>
  983. By default, the SQLite3 backend uses the data file located at
  984. <filename>/usr/local/var/bind10-devel/zone.sqlite3</filename>.
  985. (The full path is what was defined at build configure time for
  986. <option>--localstatedir</option>.
  987. The default is <filename>/usr/local/var/</filename>.)
  988. This data file location may be changed by defining the
  989. <quote>database_file</quote> configuration.
  990. </para>
  991. </section>
  992. <section>
  993. <title>Loading Master Zones Files</title>
  994. <para>
  995. RFC 1035 style DNS master zone files may imported
  996. into a BIND 10 data source by using the
  997. <command>b10-loadzone</command> utility.
  998. </para>
  999. <para>
  1000. <command>b10-loadzone</command> supports the following
  1001. special directives (control entries):
  1002. <variablelist>
  1003. <varlistentry>
  1004. <term>$INCLUDE</term>
  1005. <listitem>
  1006. <simpara>Loads an additional zone file. This may be recursive.
  1007. </simpara>
  1008. </listitem>
  1009. </varlistentry>
  1010. <varlistentry>
  1011. <term>$ORIGIN</term>
  1012. <listitem>
  1013. <simpara>Defines the relative domain name.
  1014. </simpara>
  1015. </listitem>
  1016. </varlistentry>
  1017. <varlistentry>
  1018. <term>$TTL</term>
  1019. <listitem>
  1020. <simpara>Defines the time-to-live value used for following
  1021. records that don't include a TTL.
  1022. </simpara>
  1023. </listitem>
  1024. </varlistentry>
  1025. </variablelist>
  1026. </para>
  1027. <para>
  1028. The <option>-o</option> argument may be used to define the
  1029. default origin for loaded zone file records.
  1030. </para>
  1031. <note>
  1032. <para>
  1033. In the development prototype release, only the SQLite3 back
  1034. end is used.
  1035. By default, it stores the zone data in
  1036. <filename>/usr/local/var/bind10-devel/zone.sqlite3</filename>
  1037. unless the <option>-d</option> switch is used to set the
  1038. database filename.
  1039. Multiple zones are stored in a single SQLite3 zone database.
  1040. </para>
  1041. </note>
  1042. <para>
  1043. If you reload a zone already existing in the database,
  1044. all records from that prior zone disappear and a whole new set
  1045. appears.
  1046. </para>
  1047. <!--TODO: permissions for xfrin or loadzone to create the file -->
  1048. </section>
  1049. <!--
  1050. TODO
  1051. <section>
  1052. <title>Troubleshooting</title>
  1053. <para>
  1054. </para>
  1055. </section>
  1056. -->
  1057. </chapter>
  1058. <chapter id="xfrin">
  1059. <title>Incoming Zone Transfers</title>
  1060. <para>
  1061. Incoming zones are transferred using the <command>b10-xfrin</command>
  1062. process which is started by <command>bind10</command>.
  1063. When received, the zone is stored in the corresponding BIND 10
  1064. data source, and its records can be served by
  1065. <command>b10-auth</command>.
  1066. In combination with <command>b10-zonemgr</command> (for
  1067. automated SOA checks), this allows the BIND 10 server to
  1068. provide <quote>secondary</quote> service.
  1069. </para>
  1070. <para>
  1071. The <command>b10-xfrin</command> process supports both AXFR and
  1072. IXFR. Due to some implementation limitations of the current
  1073. development release, however, it only tries AXFR by default,
  1074. and care should be taken to enable IXFR.
  1075. </para>
  1076. <para>
  1077. To enable IXFR, you need to
  1078. configure <command>b10-xfrin</command> with an explicit zone
  1079. configuration for the zone.
  1080. For example, to enable IXFR for a zone named "example.com"
  1081. (whose master address is assumed to be 2001:db8::53 here),
  1082. run the following at the <command>bindctl</command> prompt:
  1083. <screen>&gt; <userinput>config add Xfrin/zones</userinput>
  1084. &gt; <userinput>config set Xfrin/zones[0]/name "<option>example.com</option>"</userinput>
  1085. &gt; <userinput>config set Xfrin/zones[0]/master_addr "<option>2001:db8::53</option>"</userinput>
  1086. &gt; <userinput>config commit</userinput></screen>
  1087. (We assume there has been no zone configuration before).
  1088. Note that you do NOT have to explicitly enable IXFR in the zone
  1089. configuration; once it's defined, IXFR is enabled by default.
  1090. This also means if you specify a zone configuration for some
  1091. other reason but don't want to use IXFR for that zone, you need
  1092. to disable it explicitly:
  1093. <screen>&gt; <userinput>config set Xfrin/zones[0]/ixfr_disabled true</userinput></screen>
  1094. </para>
  1095. <para>
  1096. One reason why IXFR is disabled by default in the current
  1097. release is because it does not support automatic fallback from IXFR to
  1098. AXFR when it encounters a primary server that doesn't support
  1099. outbound IXFR (and, not many existing implementations support
  1100. it). Another, related reason is that it does not use AXFR even
  1101. if it has no knowledge about the zone (like at the very first
  1102. time the secondary server is set up). IXFR requires the
  1103. "current version" of the zone, so obviously it doesn't work
  1104. in this situation and AXFR is the only workable choice.
  1105. The current release of <command>b10-xfrin</command> does not
  1106. make this selection automatically.
  1107. These features will be implemented in a near future
  1108. version, at which point we will enable IXFR by default.
  1109. </para>
  1110. <note><simpara>
  1111. In the current development release of BIND 10, incoming zone
  1112. transfers are only available for SQLite3-based data sources,
  1113. that is, they don't work for an in-memory data source.
  1114. </simpara></note>
  1115. <!-- TODO:
  1116. how to tell bind10 you are a secondary?
  1117. when will it first attempt to check for new zone? (using REFRESH?)
  1118. what if zonemgr is not running?
  1119. what if a NOTIFY is sent?
  1120. -->
  1121. <para>
  1122. To manually trigger a zone transfer to retrieve a remote zone,
  1123. you may use the <command>bindctl</command> utility.
  1124. For example, at the <command>bindctl</command> prompt run:
  1125. <screen>&gt; <userinput>Xfrin retransfer zone_name="<option>foo.example.org</option>" master=<option>192.0.2.99</option></userinput></screen>
  1126. </para>
  1127. <!-- TODO: can that retransfer be used to identify a new zone? -->
  1128. <!-- TODO: what if doesn't exist at that master IP? -->
  1129. </chapter>
  1130. <chapter id="xfrout">
  1131. <title>Outbound Zone Transfers</title>
  1132. <para>
  1133. The <command>b10-xfrout</command> process is started by
  1134. <command>bind10</command>.
  1135. When the <command>b10-auth</command> authoritative DNS server
  1136. receives an AXFR request, <command>b10-xfrout</command>
  1137. sends the zone.
  1138. This is used to provide master DNS service to share zones
  1139. to secondary name servers.
  1140. The <command>b10-xfrout</command> is also used to send
  1141. NOTIFY messages to slaves.
  1142. </para>
  1143. <note><simpara>
  1144. The current development release of BIND 10 only supports
  1145. AXFR. (IXFR is not supported.)
  1146. Access control is not yet provided.
  1147. </simpara></note>
  1148. <!--
  1149. TODO:
  1150. xfrout section:
  1151. auth servers checks for AXFR query
  1152. sends the XFR query to the xfrout module
  1153. uses /tmp/auth_xfrout_conn which is a socket
  1154. what is XfroutClient xfr_client??
  1155. /tmp/auth_xfrout_conn is not removed
  1156. -->
  1157. </chapter>
  1158. <chapter id="zonemgr">
  1159. <title>Secondary Manager</title>
  1160. <para>
  1161. The <command>b10-zonemgr</command> process is started by
  1162. <command>bind10</command>.
  1163. It keeps track of SOA refresh, retry, and expire timers
  1164. and other details for BIND 10 to perform as a slave.
  1165. When the <command>b10-auth</command> authoritative DNS server
  1166. receives a NOTIFY message, <command>b10-zonemgr</command>
  1167. may tell <command>b10-xfrin</command> to do a refresh
  1168. to start an inbound zone transfer.
  1169. The secondary manager resets its counters when a new zone is
  1170. transferred in.
  1171. </para>
  1172. <note><simpara>
  1173. Access control (such as allowing notifies) is not yet provided.
  1174. The primary/secondary service is not yet complete.
  1175. </simpara></note>
  1176. <!-- TODO: lots to describe for zonemgr -->
  1177. </chapter>
  1178. <chapter id="resolverserver">
  1179. <title>Recursive Name Server</title>
  1180. <para>
  1181. The <command>b10-resolver</command> process is started by
  1182. <command>bind10</command>.
  1183. <!-- TODO
  1184. It provides a resolver so DNS clients can ask it to do recursion
  1185. and it will return answers.
  1186. -->
  1187. </para>
  1188. <para>
  1189. The main <command>bind10</command> process can be configured
  1190. to select to run either the authoritative or resolver or both.
  1191. By default, it starts the authoritative service.
  1192. <!-- TODO: later both -->
  1193. You may change this using <command>bindctl</command>, for example:
  1194. <screen>
  1195. &gt; <userinput>config set Boss/start_auth false</userinput>
  1196. &gt; <userinput>config set Boss/start_resolver true</userinput>
  1197. &gt; <userinput>config commit</userinput>
  1198. </screen>
  1199. </para>
  1200. <para>
  1201. The master <command>bind10</command> will stop and start
  1202. the desired services.
  1203. </para>
  1204. <para>
  1205. By default, the resolver listens on port 53 for 127.0.0.1 and ::1.
  1206. The following example shows how it can be configured to
  1207. listen on an additional address (and port):
  1208. <screen>
  1209. &gt; <userinput>config add Resolver/listen_on</userinput>
  1210. &gt; <userinput>config set Resolver/listen_on[<replaceable>2</replaceable>]/address "192.168.1.1"</userinput>
  1211. &gt; <userinput>config set Resolver/listen_on[<replaceable>2</replaceable>]/port 53</userinput>
  1212. &gt; <userinput>config commit</userinput>
  1213. </screen>
  1214. </para>
  1215. <simpara>(Replace the <quote><replaceable>2</replaceable></quote>
  1216. as needed; run <quote><userinput>config show
  1217. Resolver/listen_on</userinput></quote> if needed.)</simpara>
  1218. <!-- TODO: this example should not include the port, ticket #1185 -->
  1219. <section>
  1220. <title>Access Control</title>
  1221. <para>
  1222. By default, the <command>b10-resolver</command> daemon only accepts
  1223. DNS queries from the localhost (127.0.0.1 and ::1).
  1224. The <option>Resolver/query_acl</option> configuration may
  1225. be used to reject, drop, or allow specific IPs or networks.
  1226. This configuration list is first match.
  1227. </para>
  1228. <para>
  1229. The configuration's <option>action</option> item may be
  1230. set to <quote>ACCEPT</quote> to allow the incoming query,
  1231. <quote>REJECT</quote> to respond with a DNS REFUSED return
  1232. code, or <quote>DROP</quote> to ignore the query without
  1233. any response (such as a blackhole). For more information,
  1234. see the respective debugging messages: <ulink
  1235. url="bind10-messages.html#RESOLVER_QUERY_ACCEPTED">RESOLVER_QUERY_ACCEPTED</ulink>,
  1236. <ulink
  1237. url="bind10-messages.html#RESOLVER_QUERY_REJECTED">RESOLVER_QUERY_REJECTED</ulink>,
  1238. and <ulink
  1239. url="bind10-messages.html#RESOLVER_QUERY_DROPPED">RESOLVER_QUERY_DROPPED</ulink>.
  1240. </para>
  1241. <para>
  1242. The required configuration's <option>from</option> item is set
  1243. to an IPv4 or IPv6 address, addresses with an network mask, or to
  1244. the special lowercase keywords <quote>any6</quote> (for
  1245. any IPv6 address) or <quote>any4</quote> (for any IPv4
  1246. address).
  1247. </para>
  1248. <!-- TODO:
  1249. /0 is for any address in that address family
  1250. does that need any address too?
  1251. TODO: tsig
  1252. -->
  1253. <para>
  1254. For example to allow the <replaceable>192.168.1.0/24</replaceable>
  1255. network to use your recursive name server, at the
  1256. <command>bindctl</command> prompt run:
  1257. </para>
  1258. <screen>
  1259. &gt; <userinput>config add Resolver/query_acl</userinput>
  1260. &gt; <userinput>config set Resolver/query_acl[<replaceable>2</replaceable>]/action "ACCEPT"</userinput>
  1261. &gt; <userinput>config set Resolver/query_acl[<replaceable>2</replaceable>]/from "<replaceable>192.168.1.0/24</replaceable>"</userinput>
  1262. &gt; <userinput>config commit</userinput>
  1263. </screen>
  1264. <simpara>(Replace the <quote><replaceable>2</replaceable></quote>
  1265. as needed; run <quote><userinput>config show
  1266. Resolver/query_acl</userinput></quote> if needed.)</simpara>
  1267. <!-- TODO: check this -->
  1268. <note><simpara>This prototype access control configuration
  1269. syntax may be changed.</simpara></note>
  1270. </section>
  1271. <section>
  1272. <title>Forwarding</title>
  1273. <para>
  1274. To enable forwarding, the upstream address and port must be
  1275. configured to forward queries to, such as:
  1276. <screen>
  1277. &gt; <userinput>config set Resolver/forward_addresses [{ "address": "<replaceable>192.168.1.1</replaceable>", "port": 53 }]</userinput>
  1278. &gt; <userinput>config commit</userinput>
  1279. </screen>
  1280. (Replace <replaceable>192.168.1.1</replaceable> to point to your
  1281. full resolver.)
  1282. </para>
  1283. <para>
  1284. Normal iterative name service can be re-enabled by clearing the
  1285. forwarding address(es); for example:
  1286. <screen>
  1287. &gt; <userinput>config set Resolver/forward_addresses []</userinput>
  1288. &gt; <userinput>config commit</userinput>
  1289. </screen>
  1290. </para>
  1291. </section>
  1292. <!-- TODO: later try this
  1293. > config set Resolver/forward_addresses[0]/address "192.168.8.8"
  1294. > config set Resolver/forward_addresses[0]/port 53
  1295. then change those defaults with config set Resolver/forward_addresses[0]/address "1.2.3.4"
  1296. > config set Resolver/forward_addresses[0]/address "1.2.3.4"
  1297. -->
  1298. </chapter>
  1299. <chapter id="statistics">
  1300. <title>Statistics</title>
  1301. <para>
  1302. The <command>b10-stats</command> process is started by
  1303. <command>bind10</command>.
  1304. It periodically collects statistics data from various modules
  1305. and aggregates it.
  1306. <!-- TODO -->
  1307. </para>
  1308. <para>
  1309. This stats daemon provides commands to identify if it is
  1310. running, show specified or all statistics data, show specified
  1311. or all statistics data schema, and set specified statistics
  1312. data.
  1313. For example, using <command>bindctl</command>:
  1314. <screen>
  1315. &gt; <userinput>Stats show</userinput>
  1316. {
  1317. "Auth": {
  1318. "queries.tcp": 1749,
  1319. "queries.udp": 867868
  1320. },
  1321. "Boss": {
  1322. "boot_time": "2011-01-20T16:59:03Z"
  1323. },
  1324. "Stats": {
  1325. "boot_time": "2011-01-20T16:59:05Z",
  1326. "last_update_time": "2011-01-20T17:04:05Z",
  1327. "lname": "4d3869d9_a@jreed.example.net",
  1328. "report_time": "2011-01-20T17:04:06Z",
  1329. "timestamp": 1295543046.823504
  1330. }
  1331. }
  1332. </screen>
  1333. </para>
  1334. </chapter>
  1335. <chapter id="logging">
  1336. <title>Logging</title>
  1337. <section>
  1338. <title>Logging configuration</title>
  1339. <para>
  1340. The logging system in BIND 10 is configured through the
  1341. Logging module. All BIND 10 modules will look at the
  1342. configuration in Logging to see what should be logged and
  1343. to where.
  1344. <!-- TODO: what is context of Logging module for readers of this guide? -->
  1345. </para>
  1346. <section>
  1347. <title>Loggers</title>
  1348. <para>
  1349. Within BIND 10, a message is logged through a component
  1350. called a "logger". Different parts of BIND 10 log messages
  1351. through different loggers, and each logger can be configured
  1352. independently of one another.
  1353. </para>
  1354. <para>
  1355. In the Logging module, you can specify the configuration
  1356. for zero or more loggers; any that are not specified will
  1357. take appropriate default values..
  1358. </para>
  1359. <para>
  1360. The three most important elements of a logger configuration
  1361. are the <option>name</option> (the component that is
  1362. generating the messages), the <option>severity</option>
  1363. (what to log), and the <option>output_options</option>
  1364. (where to log).
  1365. </para>
  1366. <section>
  1367. <title>name (string)</title>
  1368. <para>
  1369. Each logger in the system has a name, the name being that
  1370. of the component using it to log messages. For instance,
  1371. if you want to configure logging for the resolver module,
  1372. you add an entry for a logger named <quote>Resolver</quote>. This
  1373. configuration will then be used by the loggers in the
  1374. Resolver module, and all the libraries used by it.
  1375. </para>
  1376. <!-- TODO: later we will have a way to know names of all modules
  1377. Right now you can only see what their names are if they are running
  1378. (a simple 'help' without anything else in bindctl for instance).
  1379. -->
  1380. <para>
  1381. If you want to specify logging for one specific library
  1382. within the module, you set the name to
  1383. <replaceable>module.library</replaceable>. For example, the
  1384. logger used by the nameserver address store component
  1385. has the full name of <quote>Resolver.nsas</quote>. If
  1386. there is no entry in Logging for a particular library,
  1387. it will use the configuration given for the module.
  1388. <!-- TODO: how to know these specific names?
  1389. We will either have to document them or tell the administrator to
  1390. specify module-wide logging and see what appears...
  1391. -->
  1392. </para>
  1393. <para>
  1394. <!-- TODO: severity has not been covered yet -->
  1395. To illustrate this, suppose you want the cache library
  1396. to log messages of severity DEBUG, and the rest of the
  1397. resolver code to log messages of severity INFO. To achieve
  1398. this you specify two loggers, one with the name
  1399. <quote>Resolver</quote> and severity INFO, and one with
  1400. the name <quote>Resolver.cache</quote> with severity
  1401. DEBUG. As there are no entries for other libraries (e.g.
  1402. the nsas), they will use the configuration for the module
  1403. (<quote>Resolver</quote>), so giving the desired behavior.
  1404. </para>
  1405. <para>
  1406. One special case is that of a module name of <quote>*</quote>
  1407. (asterisks), which is interpreted as <emphasis>any</emphasis>
  1408. module. You can set global logging options by using this,
  1409. including setting the logging configuration for a library
  1410. that is used by multiple modules (e.g. <quote>*.config</quote>
  1411. specifies the configuration library code in whatever
  1412. module is using it).
  1413. </para>
  1414. <para>
  1415. If there are multiple logger specifications in the
  1416. configuration that might match a particular logger, the
  1417. specification with the more specific logger name takes
  1418. precedence. For example, if there are entries for for
  1419. both <quote>*</quote> and <quote>Resolver</quote>, the
  1420. resolver module &mdash; and all libraries it uses &mdash;
  1421. will log messages according to the configuration in the
  1422. second entry (<quote>Resolver</quote>). All other modules
  1423. will use the configuration of the first entry
  1424. (<quote>*</quote>). If there was also a configuration
  1425. entry for <quote>Resolver.cache</quote>, the cache library
  1426. within the resolver would use that in preference to the
  1427. entry for <quote>Resolver</quote>.
  1428. </para>
  1429. <para>
  1430. One final note about the naming. When specifying the
  1431. module name within a logger, use the name of the module
  1432. as specified in <command>bindctl</command>, e.g.
  1433. <quote>Resolver</quote> for the resolver module,
  1434. <quote>Xfrout</quote> for the xfrout module, etc. When
  1435. the message is logged, the message will include the name
  1436. of the logger generating the message, but with the module
  1437. name replaced by the name of the process implementing
  1438. the module (so for example, a message generated by the
  1439. <quote>Auth.cache</quote> logger will appear in the output
  1440. with a logger name of <quote>b10-auth.cache</quote>).
  1441. </para>
  1442. </section>
  1443. <section>
  1444. <title>severity (string)</title>
  1445. <para>
  1446. This specifies the category of messages logged.
  1447. Each message is logged with an associated severity which
  1448. may be one of the following (in descending order of
  1449. severity):
  1450. </para>
  1451. <itemizedlist>
  1452. <listitem>
  1453. <simpara> FATAL </simpara>
  1454. </listitem>
  1455. <listitem>
  1456. <simpara> ERROR </simpara>
  1457. </listitem>
  1458. <listitem>
  1459. <simpara> WARN </simpara>
  1460. </listitem>
  1461. <listitem>
  1462. <simpara> INFO </simpara>
  1463. </listitem>
  1464. <listitem>
  1465. <simpara> DEBUG </simpara>
  1466. </listitem>
  1467. </itemizedlist>
  1468. <para>
  1469. When the severity of a logger is set to one of these
  1470. values, it will only log messages of that severity, and
  1471. the severities above it. The severity may also be set to
  1472. NONE, in which case all messages from that logger are
  1473. inhibited.
  1474. <!-- TODO: worded wrong? If I set to INFO, why would it show DEBUG which is literally below in that list? -->
  1475. </para>
  1476. </section>
  1477. <section>
  1478. <title>output_options (list)</title>
  1479. <para>
  1480. Each logger can have zero or more
  1481. <option>output_options</option>. These specify where log
  1482. messages are sent to. These are explained in detail below.
  1483. </para>
  1484. <para>
  1485. The other options for a logger are:
  1486. </para>
  1487. </section>
  1488. <section>
  1489. <title>debuglevel (integer)</title>
  1490. <para>
  1491. When a logger's severity is set to DEBUG, this value
  1492. specifies what debug messages should be printed. It ranges
  1493. from 0 (least verbose) to 99 (most verbose).
  1494. </para>
  1495. <!-- TODO: complete this sentence:
  1496. The general classification of debug message types is
  1497. TODO; there's a ticket to determine these levels, see #1074
  1498. -->
  1499. <para>
  1500. If severity for the logger is not DEBUG, this value is ignored.
  1501. </para>
  1502. </section>
  1503. <section>
  1504. <title>additive (true or false)</title>
  1505. <para>
  1506. If this is true, the <option>output_options</option> from
  1507. the parent will be used. For example, if there are two
  1508. loggers configured; <quote>Resolver</quote> and
  1509. <quote>Resolver.cache</quote>, and <option>additive</option>
  1510. is true in the second, it will write the log messages
  1511. not only to the destinations specified for
  1512. <quote>Resolver.cache</quote>, but also to the destinations
  1513. as specified in the <option>output_options</option> in
  1514. the logger named <quote>Resolver</quote>.
  1515. <!-- TODO: check this -->
  1516. </para>
  1517. </section>
  1518. </section>
  1519. <section>
  1520. <title>Output Options</title>
  1521. <para>
  1522. The main settings for an output option are the
  1523. <option>destination</option> and a value called
  1524. <option>output</option>, the meaning of which depends on
  1525. the destination that is set.
  1526. </para>
  1527. <section>
  1528. <title>destination (string)</title>
  1529. <para>
  1530. The destination is the type of output. It can be one of:
  1531. </para>
  1532. <itemizedlist>
  1533. <listitem>
  1534. <simpara> console </simpara>
  1535. </listitem>
  1536. <listitem>
  1537. <simpara> file </simpara>
  1538. </listitem>
  1539. <listitem>
  1540. <simpara> syslog </simpara>
  1541. </listitem>
  1542. </itemizedlist>
  1543. </section>
  1544. <section>
  1545. <title>output (string)</title>
  1546. <para>
  1547. Depending on what is set as the output destination, this
  1548. value is interpreted as follows:
  1549. </para>
  1550. <variablelist>
  1551. <varlistentry>
  1552. <term><option>destination</option> is <quote>console</quote></term>
  1553. <listitem>
  1554. <simpara>
  1555. The value of output must be one of <quote>stdout</quote>
  1556. (messages printed to standard output) or
  1557. <quote>stderr</quote> (messages printed to standard
  1558. error).
  1559. </simpara>
  1560. </listitem>
  1561. </varlistentry>
  1562. <varlistentry>
  1563. <term><option>destination</option> is <quote>file</quote></term>
  1564. <listitem>
  1565. <simpara>
  1566. The value of output is interpreted as a file name;
  1567. log messages will be appended to this file.
  1568. </simpara>
  1569. </listitem>
  1570. </varlistentry>
  1571. <varlistentry>
  1572. <term><option>destination</option> is <quote>syslog</quote></term>
  1573. <listitem>
  1574. <simpara>
  1575. The value of output is interpreted as the
  1576. <command>syslog</command> facility (e.g.
  1577. <emphasis>local0</emphasis>) that should be used
  1578. for log messages.
  1579. </simpara>
  1580. </listitem>
  1581. </varlistentry>
  1582. </variablelist>
  1583. <para>
  1584. The other options for <option>output_options</option> are:
  1585. </para>
  1586. <section>
  1587. <title>flush (true of false)</title>
  1588. <para>
  1589. Flush buffers after each log message. Doing this will
  1590. reduce performance but will ensure that if the program
  1591. terminates abnormally, all messages up to the point of
  1592. termination are output.
  1593. </para>
  1594. </section>
  1595. <section>
  1596. <title>maxsize (integer)</title>
  1597. <para>
  1598. Only relevant when destination is file, this is maximum
  1599. file size of output files in bytes. When the maximum
  1600. size is reached, the file is renamed and a new file opened.
  1601. (For example, a ".1" is appended to the name &mdash;
  1602. if a ".1" file exists, it is renamed ".2",
  1603. etc.)
  1604. </para>
  1605. <para>
  1606. If this is 0, no maximum file size is used.
  1607. </para>
  1608. </section>
  1609. <section>
  1610. <title>maxver (integer)</title>
  1611. <para>
  1612. Maximum number of old log files to keep around when
  1613. rolling the output file. Only relevant when
  1614. <option>destination</option> is <quote>file</quote>.
  1615. </para>
  1616. </section>
  1617. </section>
  1618. </section>
  1619. <section>
  1620. <title>Example session</title>
  1621. <para>
  1622. In this example we want to set the global logging to
  1623. write to the file <filename>/var/log/my_bind10.log</filename>,
  1624. at severity WARN. We want the authoritative server to
  1625. log at DEBUG with debuglevel 40, to a different file
  1626. (<filename>/tmp/debug_messages</filename>).
  1627. </para>
  1628. <para>
  1629. Start <command>bindctl</command>.
  1630. </para>
  1631. <para>
  1632. <screen>["login success "]
  1633. &gt; <userinput>config show Logging</userinput>
  1634. Logging/loggers [] list
  1635. </screen>
  1636. </para>
  1637. <para>
  1638. By default, no specific loggers are configured, in which
  1639. case the severity defaults to INFO and the output is
  1640. written to stderr.
  1641. </para>
  1642. <para>
  1643. Let's first add a default logger:
  1644. </para>
  1645. <!-- TODO: adding the empty loggers makes no sense -->
  1646. <para>
  1647. <screen><userinput>&gt; config add Logging/loggers</userinput>
  1648. &gt; <userinput>config show Logging</userinput>
  1649. Logging/loggers/ list (modified)
  1650. </screen>
  1651. </para>
  1652. <para>
  1653. The loggers value line changed to indicate that it is no
  1654. longer an empty list:
  1655. </para>
  1656. <para>
  1657. <screen>&gt; <userinput>config show Logging/loggers</userinput>
  1658. Logging/loggers[0]/name "" string (default)
  1659. Logging/loggers[0]/severity "INFO" string (default)
  1660. Logging/loggers[0]/debuglevel 0 integer (default)
  1661. Logging/loggers[0]/additive false boolean (default)
  1662. Logging/loggers[0]/output_options [] list (default)
  1663. </screen>
  1664. </para>
  1665. <para>
  1666. The name is mandatory, so we must set it. We will also
  1667. change the severity as well. Let's start with the global
  1668. logger.
  1669. </para>
  1670. <para>
  1671. <screen>&gt; <userinput>config set Logging/loggers[0]/name *</userinput>
  1672. &gt; <userinput>config set Logging/loggers[0]/severity WARN</userinput>
  1673. &gt; <userinput>config show Logging/loggers</userinput>
  1674. Logging/loggers[0]/name "*" string (modified)
  1675. Logging/loggers[0]/severity "WARN" string (modified)
  1676. Logging/loggers[0]/debuglevel 0 integer (default)
  1677. Logging/loggers[0]/additive false boolean (default)
  1678. Logging/loggers[0]/output_options [] list (default)
  1679. </screen>
  1680. </para>
  1681. <para>
  1682. Of course, we need to specify where we want the log
  1683. messages to go, so we add an entry for an output option.
  1684. </para>
  1685. <para>
  1686. <screen>&gt; <userinput> config add Logging/loggers[0]/output_options</userinput>
  1687. &gt; <userinput> config show Logging/loggers[0]/output_options</userinput>
  1688. Logging/loggers[0]/output_options[0]/destination "console" string (default)
  1689. Logging/loggers[0]/output_options[0]/output "stdout" string (default)
  1690. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  1691. Logging/loggers[0]/output_options[0]/maxsize 0 integer (default)
  1692. Logging/loggers[0]/output_options[0]/maxver 0 integer (default)
  1693. </screen>
  1694. </para>
  1695. <para>
  1696. These aren't the values we are looking for.
  1697. </para>
  1698. <para>
  1699. <screen>&gt; <userinput> config set Logging/loggers[0]/output_options[0]/destination file</userinput>
  1700. &gt; <userinput> config set Logging/loggers[0]/output_options[0]/output /var/log/bind10.log</userinput>
  1701. &gt; <userinput> config set Logging/loggers[0]/output_options[0]/maxsize 30000</userinput>
  1702. &gt; <userinput> config set Logging/loggers[0]/output_options[0]/maxver 8</userinput>
  1703. </screen>
  1704. </para>
  1705. <para>
  1706. Which would make the entire configuration for this logger
  1707. look like:
  1708. </para>
  1709. <para>
  1710. <screen>&gt; <userinput> config show all Logging/loggers</userinput>
  1711. Logging/loggers[0]/name "*" string (modified)
  1712. Logging/loggers[0]/severity "WARN" string (modified)
  1713. Logging/loggers[0]/debuglevel 0 integer (default)
  1714. Logging/loggers[0]/additive false boolean (default)
  1715. Logging/loggers[0]/output_options[0]/destination "file" string (modified)
  1716. Logging/loggers[0]/output_options[0]/output "/var/log/bind10.log" string (modified)
  1717. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  1718. Logging/loggers[0]/output_options[0]/maxsize 30000 integer (modified)
  1719. Logging/loggers[0]/output_options[0]/maxver 8 integer (modified)
  1720. </screen>
  1721. </para>
  1722. <para>
  1723. That looks OK, so let's commit it before we add the
  1724. configuration for the authoritative server's logger.
  1725. </para>
  1726. <para>
  1727. <screen>&gt; <userinput> config commit</userinput></screen>
  1728. </para>
  1729. <para>
  1730. Now that we have set it, and checked each value along
  1731. the way, adding a second entry is quite similar.
  1732. </para>
  1733. <para>
  1734. <screen>&gt; <userinput> config add Logging/loggers</userinput>
  1735. &gt; <userinput> config set Logging/loggers[1]/name Auth</userinput>
  1736. &gt; <userinput> config set Logging/loggers[1]/severity DEBUG</userinput>
  1737. &gt; <userinput> config set Logging/loggers[1]/debuglevel 40</userinput>
  1738. &gt; <userinput> config add Logging/loggers[1]/output_options</userinput>
  1739. &gt; <userinput> config set Logging/loggers[1]/output_options[0]/destination file</userinput>
  1740. &gt; <userinput> config set Logging/loggers[1]/output_options[0]/output /tmp/auth_debug.log</userinput>
  1741. &gt; <userinput> config commit</userinput>
  1742. </screen>
  1743. </para>
  1744. <para>
  1745. And that's it. Once we have found whatever it was we
  1746. needed the debug messages for, we can simply remove the
  1747. second logger to let the authoritative server use the
  1748. same settings as the rest.
  1749. </para>
  1750. <para>
  1751. <screen>&gt; <userinput> config remove Logging/loggers[1]</userinput>
  1752. &gt; <userinput> config commit</userinput>
  1753. </screen>
  1754. </para>
  1755. <para>
  1756. And every module will now be using the values from the
  1757. logger named <quote>*</quote>.
  1758. </para>
  1759. </section>
  1760. </section>
  1761. <section>
  1762. <title>Logging Message Format</title>
  1763. <para>
  1764. Each message written by BIND 10 to the configured logging
  1765. destinations comprises a number of components that identify
  1766. the origin of the message and, if the message indicates
  1767. a problem, information about the problem that may be
  1768. useful in fixing it.
  1769. </para>
  1770. <para>
  1771. Consider the message below logged to a file:
  1772. <screen>2011-06-15 13:48:22.034 ERROR [b10-resolver.asiolink]
  1773. ASIODNS_OPENSOCK error 111 opening TCP socket to 127.0.0.1(53)</screen>
  1774. </para>
  1775. <para>
  1776. Note: the layout of messages written to the system logging
  1777. file (syslog) may be slightly different. This message has
  1778. been split across two lines here for display reasons; in the
  1779. logging file, it will appear on one line.)
  1780. </para>
  1781. <para>
  1782. The log message comprises a number of components:
  1783. <variablelist>
  1784. <varlistentry>
  1785. <term>2011-06-15 13:48:22.034</term>
  1786. <!-- TODO: timestamp repeated even if using syslog? -->
  1787. <listitem><para>
  1788. The date and time at which the message was generated.
  1789. </para></listitem>
  1790. </varlistentry>
  1791. <varlistentry>
  1792. <term>ERROR</term>
  1793. <listitem><para>
  1794. The severity of the message.
  1795. </para></listitem>
  1796. </varlistentry>
  1797. <varlistentry>
  1798. <term>[b10-resolver.asiolink]</term>
  1799. <listitem><para>
  1800. The source of the message. This comprises two components:
  1801. the BIND 10 process generating the message (in this
  1802. case, <command>b10-resolver</command>) and the module
  1803. within the program from which the message originated
  1804. (which in the example is the asynchronous I/O link
  1805. module, asiolink).
  1806. </para></listitem>
  1807. </varlistentry>
  1808. <varlistentry>
  1809. <term>ASIODNS_OPENSOCK</term>
  1810. <listitem><para>
  1811. The message identification. Every message in BIND 10
  1812. has a unique identification, which can be used as an
  1813. index into the <ulink
  1814. url="bind10-messages.html"><citetitle>BIND 10 Messages
  1815. Manual</citetitle></ulink> (<ulink
  1816. url="http://bind10.isc.org/docs/bind10-messages.html"
  1817. />) from which more information can be obtained.
  1818. </para></listitem>
  1819. </varlistentry>
  1820. <varlistentry>
  1821. <term>error 111 opening TCP socket to 127.0.0.1(53)</term>
  1822. <listitem><para>
  1823. A brief description of the cause of the problem.
  1824. Within this text, information relating to the condition
  1825. that caused the message to be logged will be included.
  1826. In this example, error number 111 (an operating
  1827. system-specific error number) was encountered when
  1828. trying to open a TCP connection to port 53 on the
  1829. local system (address 127.0.0.1). The next step
  1830. would be to find out the reason for the failure by
  1831. consulting your system's documentation to identify
  1832. what error number 111 means.
  1833. </para></listitem>
  1834. </varlistentry>
  1835. </variablelist>
  1836. </para>
  1837. </section>
  1838. </chapter>
  1839. <!-- TODO: how to help: run unit tests, join lists, review trac tickets -->
  1840. <!-- <index> <title>Index</title> </index> -->
  1841. </book>
  1842. <!--
  1843. TODO:
  1844. Overview
  1845. Getting BIND 10 Installed
  1846. Basics
  1847. Dependencies
  1848. Optional
  1849. Advanced
  1850. How Does Everything Work Together?
  1851. Need Help?
  1852. -->