bind10-guide.txt 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869
  1. BIND 10 Guide
  2. Administrator Reference for BIND 10
  3. This is the reference guide for BIND 10 version 20120405.
  4. Copyright © 2010-2012 Internet Systems Consortium, Inc.
  5. Abstract
  6. BIND 10 is a framework that features Domain Name System (DNS) suite and
  7. Dynamic Host Configuration Protocol (DHCP) servers managed by Internet
  8. Systems Consortium (ISC). It includes DNS libraries, modular components
  9. for controlling authoritative and recursive DNS servers, and experimental
  10. DHCPv4 and DHCPv6 servers.
  11. This is the reference guide for BIND 10 version 20120405. The most
  12. up-to-date version of this document (in PDF, HTML, and plain text
  13. formats), along with other documents for BIND 10, can be found at
  14. http://bind10.isc.org/docs.
  15. --------------------------------------------------------------------------
  16. Table of Contents
  17. Preface
  18. 1. Acknowledgements
  19. 1. Introduction
  20. 1.1. Supported Platforms
  21. 1.2. Required Software
  22. 1.3. Starting and Stopping the Server
  23. 1.4. Managing BIND 10
  24. 2. Installation
  25. 2.1. Building Requirements
  26. 2.2. Quick start
  27. 2.3. Installation from source
  28. 2.3.1. Download Tar File
  29. 2.3.2. Retrieve from Git
  30. 2.3.3. Configure before the build
  31. 2.3.4. Build
  32. 2.3.5. Install
  33. 2.3.6. Install Hierarchy
  34. 3. Starting BIND10 with bind10
  35. 3.1. Starting BIND 10
  36. 3.2. Configuration of started processes
  37. 4. Command channel
  38. 5. Configuration manager
  39. 6. Remote control daemon
  40. 6.1. Configuration specification for b10-cmdctl
  41. 7. Control and configure user interface
  42. 8. Authoritative Server
  43. 8.1. Server Configurations
  44. 8.2. Data Source Backends
  45. 8.2.1. In-memory Data Source
  46. 8.2.2. In-memory Data Source With SQLite3
  47. Backend
  48. 8.2.3. Reloading an In-memory Data Source
  49. 8.2.4. Disabling In-memory Data Sources
  50. 8.3. Loading Master Zones Files
  51. 9. Incoming Zone Transfers
  52. 9.1. Configuration for Incoming Zone Transfers
  53. 9.2. Enabling IXFR
  54. 9.3. Secondary Manager
  55. 9.4. Trigger an Incoming Zone Transfer Manually
  56. 9.5. Incoming Transfers with In-memory Datasource
  57. 10. Outbound Zone Transfers
  58. 11. Recursive Name Server
  59. 11.1. Access Control
  60. 11.2. Forwarding
  61. 12. DHCPv4 Server
  62. 12.1. DHCPv4 Server Usage
  63. 12.2. DHCPv4 Server Configuration
  64. 12.3. Supported standards
  65. 12.4. DHCPv4 Server Limitations
  66. 13. DHCPv6 Server
  67. 13.1. DHCPv6 Server Usage
  68. 13.2. DHCPv6 Server Configuration
  69. 13.3. Supported DHCPv6 Standards
  70. 13.4. DHCPv6 Server Limitations
  71. 14. libdhcp++ library
  72. 14.1. Interface detection
  73. 14.2. DHCPv4/DHCPv6 packet handling
  74. 15. Statistics
  75. 16. Logging
  76. 16.1. Logging configuration
  77. 16.1.1. Loggers
  78. 16.1.2. Output Options
  79. 16.1.3. Example session
  80. 16.2. Logging Message Format
  81. List of Tables
  82. 3.1.
  83. Preface
  84. Table of Contents
  85. 1. Acknowledgements
  86. 1. Acknowledgements
  87. ISC would like to acknowledge generous support for BIND 10 development of
  88. DHCPv4 and DHCPv6 components provided by Comcast.
  89. Chapter 1. Introduction
  90. Table of Contents
  91. 1.1. Supported Platforms
  92. 1.2. Required Software
  93. 1.3. Starting and Stopping the Server
  94. 1.4. Managing BIND 10
  95. BIND is the popular implementation of a DNS server, developer interfaces,
  96. and DNS tools. BIND 10 is a rewrite of BIND 9. BIND 10 is written in C++
  97. and Python and provides a modular environment for serving and maintaining
  98. DNS. BIND 10 provides a EDNS0- and DNSSEC-capable authoritative DNS server
  99. and a caching recursive name server which also provides forwarding.
  100. This guide covers the experimental prototype of BIND 10 version 20120405.
  101. 1.1. Supported Platforms
  102. BIND 10 builds have been tested on Debian GNU/Linux 5 and unstable, Ubuntu
  103. 9.10, NetBSD 5, Solaris 10, FreeBSD 7 and 8, CentOS Linux 5.3, and MacOS
  104. 10.6. It has been tested on Sparc, i386, and amd64 hardware platforms. It
  105. is planned for BIND 10 to build, install and run on Windows and standard
  106. Unix-type platforms.
  107. 1.2. Required Software
  108. BIND 10 requires at least Python 3.1 (http://www.python.org/). It has also
  109. been tested with Python 3.2.
  110. BIND 10 uses the Botan crypto library for C++
  111. (http://botan.randombit.net/). It requires at least Botan version 1.8.
  112. BIND 10 uses the log4cplus C++ logging library
  113. (http://log4cplus.sourceforge.net/). It requires at least log4cplus
  114. version 1.0.3.
  115. The authoritative DNS server uses SQLite3 (http://www.sqlite.org/). It
  116. needs at least SQLite version 3.3.9.
  117. The b10-xfrin, b10-xfrout, and b10-zonemgr components require the
  118. libpython3 library and the Python _sqlite3.so module (which is included
  119. with Python). The Python module needs to be built for the corresponding
  120. Python 3.
  121. Note
  122. Some operating systems do not provide these dependencies in their default
  123. installation nor standard packages collections. You may need to install
  124. them separately.
  125. 1.3. Starting and Stopping the Server
  126. BIND 10 is modular. Part of this modularity is accomplished using multiple
  127. cooperating processes which, together, provide the server functionality.
  128. This is a change from the previous generation of BIND software, which used
  129. a single process.
  130. At first, running many different processes may seem confusing. However,
  131. these processes are started, stopped, and maintained by a single command,
  132. bind10. This command starts a master process which will start other
  133. processes as needed. The processes started by the bind10 command have
  134. names starting with "b10-", including:
  135. o b10-auth — Authoritative DNS server. This process serves DNS requests.
  136. o b10-cfgmgr — Configuration manager. This process maintains all of the
  137. configuration for BIND 10.
  138. o b10-cmdctl — Command and control service. This process allows external
  139. control of the BIND 10 system.
  140. o b10-msgq — Message bus daemon. This process coordinates communication
  141. between all of the other BIND 10 processes.
  142. o b10-resolver — Recursive name server. This process handles incoming
  143. queries.
  144. o b10-sockcreator — Socket creator daemon. This process creates sockets
  145. used by network-listening BIND 10 processes.
  146. o b10-stats — Statistics collection daemon. This process collects and
  147. reports statistics data.
  148. o b10-stats-httpd — HTTP server for statistics reporting. This process
  149. reports statistics data in XML format over HTTP.
  150. o b10-xfrin — Incoming zone transfer service. This process is used to
  151. transfer a new copy of a zone into BIND 10, when acting as a secondary
  152. server.
  153. o b10-xfrout — Outgoing zone transfer service. This process is used to
  154. handle transfer requests to send a local zone to a remote secondary
  155. server, when acting as a master server.
  156. o b10-zonemgr — Secondary manager. This process keeps track of timers
  157. and other necessary information for BIND 10 to act as a slave server.
  158. These are ran automatically by bind10 and do not need to be run manually.
  159. 1.4. Managing BIND 10
  160. Once BIND 10 is running, a few commands are used to interact directly with
  161. the system:
  162. o bindctl — interactive administration interface. This is a low-level
  163. command-line tool which allows a developer or an experienced
  164. administrator to control BIND 10.
  165. o b10-loadzone — zone file loader. This tool will load standard
  166. masterfile-format zone files into BIND 10.
  167. o b10-cmdctl-usermgr — user access control. This tool allows an
  168. administrator to authorize additional users to manage BIND 10.
  169. The tools and modules are covered in full detail in this guide. In
  170. addition, manual pages are also provided in the default installation.
  171. BIND 10 also provides libraries and programmer interfaces for C++ and
  172. Python for the message bus, configuration backend, and, of course, DNS.
  173. These include detailed developer documentation and code examples.
  174. Chapter 2. Installation
  175. Table of Contents
  176. 2.1. Building Requirements
  177. 2.2. Quick start
  178. 2.3. Installation from source
  179. 2.3.1. Download Tar File
  180. 2.3.2. Retrieve from Git
  181. 2.3.3. Configure before the build
  182. 2.3.4. Build
  183. 2.3.5. Install
  184. 2.3.6. Install Hierarchy
  185. 2.1. Building Requirements
  186. In addition to the run-time requirements, building BIND 10 from source
  187. code requires various development include headers.
  188. Note
  189. Some operating systems have split their distribution packages into a
  190. run-time and a development package. You will need to install the
  191. development package versions, which include header files and libraries, to
  192. build BIND 10 from source code.
  193. Building from source code requires the Boost build-time headers
  194. (http://www.boost.org/). At least Boost version 1.35 is required.
  195. To build BIND 10, also install the Botan (at least version 1.8) and the
  196. log4cplus (at least version 1.0.3) development include headers.
  197. Building BIND 10 also requires a C++ compiler and standard development
  198. headers, make, and pkg-config. BIND 10 builds have been tested with GCC
  199. g++ 3.4.3, 4.1.2, 4.1.3, 4.2.1, 4.3.2, and 4.4.1; Clang++ 2.8; and Sun C++
  200. 5.10.
  201. Visit the wiki at http://bind10.isc.org/wiki/SystemSpecificNotes for
  202. system-specific installation tips.
  203. 2.2. Quick start
  204. Note
  205. This quickly covers the standard steps for installing and deploying BIND
  206. 10 as an authoritative name server using its defaults. For
  207. troubleshooting, full customizations and further details, see the
  208. respective chapters in the BIND 10 guide.
  209. To quickly get started with BIND 10, follow these steps.
  210.  1. Install required run-time and build dependencies.
  211.  2. Download the BIND 10 source tar file from
  212. ftp://ftp.isc.org/isc/bind10/.
  213.  3. Extract the tar file:
  214. $ gzcat bind10-VERSION.tar.gz | tar -xvf -
  215.  4. Go into the source and run configure:
  216. $ cd bind10-VERSION
  217. $ ./configure
  218.  5. Build it:
  219. $ make
  220.  6. Install it (to default /usr/local):
  221. $ make install
  222.  7. Start the server:
  223. $ /usr/local/sbin/bind10
  224.  8. Test it; for example:
  225. $ dig @127.0.0.1 -c CH -t TXT authors.bind
  226.  9. Load desired zone file(s), for example:
  227. $ b10-loadzone your.zone.example.org
  228. 10. Test the new zone.
  229. 2.3. Installation from source
  230. BIND 10 is open source software written in C++ and Python. It is freely
  231. available in source code form from ISC via the Git code revision control
  232. system or as a downloadable tar file. It may also be available in
  233. pre-compiled ready-to-use packages from operating system vendors.
  234. 2.3.1. Download Tar File
  235. Downloading a release tar file is the recommended method to obtain the
  236. source code.
  237. The BIND 10 releases are available as tar file downloads from
  238. ftp://ftp.isc.org/isc/bind10/. Periodic development snapshots may also be
  239. available.
  240. 2.3.2. Retrieve from Git
  241. Downloading this "bleeding edge" code is recommended only for developers
  242. or advanced users. Using development code in a production environment is
  243. not recommended.
  244. Note
  245. When using source code retrieved via Git additional software will be
  246. required: automake (v1.11 or newer), libtoolize, and autoconf (2.59 or
  247. newer). These may need to be installed.
  248. The latest development code, including temporary experiments and
  249. un-reviewed code, is available via the BIND 10 code revision control
  250. system. This is powered by Git and all the BIND 10 development is public.
  251. The leading development is done in the “master”.
  252. The code can be checked out from git://git.bind10.isc.org/bind10; for
  253. example:
  254. $ git clone git://git.bind10.isc.org/bind10
  255. When checking out the code from the code version control system, it
  256. doesn't include the generated configure script, Makefile.in files, nor the
  257. related configure files. They can be created by running autoreconf with
  258. the --install switch. This will run autoconf, aclocal, libtoolize,
  259. autoheader, automake, and related commands.
  260. 2.3.3. Configure before the build
  261. BIND 10 uses the GNU Build System to discover build environment details.
  262. To generate the makefiles using the defaults, simply run:
  263. $ ./configure
  264. Run ./configure with the --help switch to view the different options. The
  265. commonly-used options are:
  266. --prefix
  267. Define the installation location (the default is /usr/local/).
  268. --with-boost-include
  269. Define the path to find the Boost headers.
  270. --with-pythonpath
  271. Define the path to Python 3.1 if it is not in the standard
  272. execution path.
  273. --with-gtest
  274. Enable building the C++ Unit Tests using the Google Tests
  275. framework. Optionally this can define the path to the gtest header
  276. files and library.
  277. For example, the following configures it to find the Boost headers, find
  278. the Python interpreter, and sets the installation location:
  279. $ ./configure \
  280. --with-boost-include=/usr/pkg/include \
  281. --with-pythonpath=/usr/pkg/bin/python3.1 \
  282. --prefix=/opt/bind10
  283. If the configure fails, it may be due to missing or old dependencies.
  284. 2.3.4. Build
  285. After the configure step is complete, to build the executables from the
  286. C++ code and prepare the Python scripts, run:
  287. $ make
  288. 2.3.5. Install
  289. To install the BIND 10 executables, support files, and documentation, run:
  290. $ make install
  291. Note
  292. The install step may require superuser privileges.
  293. 2.3.6. Install Hierarchy
  294. The following is the layout of the complete BIND 10 installation:
  295. o bin/ — general tools and diagnostic clients.
  296. o etc/bind10-devel/ — configuration files.
  297. o lib/ — libraries and python modules.
  298. o libexec/bind10-devel/ — executables that a user wouldn't normally run
  299. directly and are not run independently. These are the BIND 10 modules
  300. which are daemons started by the bind10 tool.
  301. o sbin/ — commands used by the system administrator.
  302. o share/bind10-devel/ — configuration specifications.
  303. o share/man/ — manual pages (online documentation).
  304. o var/bind10-devel/ — data source and configuration databases.
  305. Chapter 3. Starting BIND10 with bind10
  306. Table of Contents
  307. 3.1. Starting BIND 10
  308. 3.2. Configuration of started processes
  309. BIND 10 provides the bind10 command which starts up the required
  310. processes. bind10 will also restart some processes that exit unexpectedly.
  311. This is the only command needed to start the BIND 10 system.
  312. After starting the b10-msgq communications channel, bind10 connects to it,
  313. runs the configuration manager, and reads its own configuration. Then it
  314. starts the other modules.
  315. The b10-sockcreator, b10-msgq and b10-cfgmgr services make up the core.
  316. The b10-msgq daemon provides the communication channel between every part
  317. of the system. The b10-cfgmgr daemon is always needed by every module, if
  318. only to send information about themselves somewhere, but more importantly
  319. to ask about their own settings, and about other modules. The
  320. b10-sockcreator will allocate sockets for the rest of the system.
  321. In its default configuration, the bind10 master process will also start up
  322. b10-cmdctl for administration tools to communicate with the system, and
  323. b10-stats for statistics collection.
  324. 3.1. Starting BIND 10
  325. To start the BIND 10 service, simply run bind10. Run it with the --verbose
  326. switch to get additional debugging or diagnostic output.
  327. Note
  328. If the setproctitle Python module is detected at start up, the process
  329. names for the Python-based daemons will be renamed to better identify them
  330. instead of just “python”. This is not needed on some operating systems.
  331. 3.2. Configuration of started processes
  332. The processes to be started can be configured, with the exception of the
  333. b10-sockcreator, b10-msgq and b10-cfgmgr.
  334. The configuration is in the Boss/components section. Each element
  335. represents one component, which is an abstraction of a process (currently
  336. there's also one component which doesn't represent a process).
  337. To add a process to the set, let's say the resolver (which not started by
  338. default), you would do this:
  339. > config add Boss/components b10-resolver
  340. > config set Boss/components/b10-resolver/special resolver
  341. > config set Boss/components/b10-resolver/kind needed
  342. > config set Boss/components/b10-resolver/priority 10
  343. > config commit
  344. Now, what it means. We add an entry called b10-resolver. It is both a name
  345. used to reference this component in the configuration and the name of the
  346. process to start. Then we set some parameters on how to start it.
  347. The special one is for components that need some kind of special care
  348. during startup or shutdown. Unless specified, the component is started in
  349. usual way. This is the list of components that need to be started in a
  350. special way, with the value of special used for them:
  351. Table 3.1. 
  352. +------------------------------------------------------------------------+
  353. | Component | Special | Description |
  354. |--------------+----------+----------------------------------------------|
  355. | b10-auth | auth | Authoritative server |
  356. |--------------+----------+----------------------------------------------|
  357. | b10-resolver | resolver | The resolver |
  358. |--------------+----------+----------------------------------------------|
  359. | b10-cmdctl | cmdctl | The command control (remote control |
  360. | | | interface) |
  361. +------------------------------------------------------------------------+
  362. The kind specifies how a failure of the component should be handled. If it
  363. is set to “dispensable” (the default unless you set something else), it
  364. will get started again if it fails. If it is set to “needed” and it fails
  365. at startup, the whole bind10 shuts down and exits with error exit code.
  366. But if it fails some time later, it is just started again. If you set it
  367. to “core”, you indicate that the system is not usable without the
  368. component and if such component fails, the system shuts down no matter
  369. when the failure happened. This is the behaviour of the core components
  370. (the ones you can't turn off), but you can declare any other components as
  371. core as well if you wish (but you can turn these off, they just can't
  372. fail).
  373. The priority defines order in which the components should start. The ones
  374. with higher number are started sooner than the ones with lower ones. If
  375. you don't set it, 0 (zero) is used as the priority. Usually, leaving it at
  376. the default is enough.
  377. There are other parameters we didn't use in our example. One of them is
  378. “address”. It is the address used by the component on the b10-msgq message
  379. bus. The special components already know their address, but the usual ones
  380. don't. The address is by convention the thing after b10-, with the first
  381. letter capital (eg. b10-stats would have “Stats” as its address).
  382. The last one is process. It is the name of the process to be started. It
  383. defaults to the name of the component if not set, but you can use this to
  384. override it.
  385. Note
  386. This system allows you to start the same component multiple times (by
  387. including it in the configuration with different names, but the same
  388. process setting). However, the rest of the system doesn't expect such a
  389. situation, so it would probably not do what you want. Such support is yet
  390. to be implemented.
  391. Note
  392. The configuration is quite powerful, but that includes a lot of space for
  393. mistakes. You could turn off the b10-cmdctl, but then you couldn't change
  394. it back the usual way, as it would require it to be running (you would
  395. have to find and edit the configuration directly). Also, some modules
  396. might have dependencies: b10-stats-httpd needs b10-stats, b10-xfrout needs
  397. b10-auth to be running, etc.
  398. In short, you should think twice before disabling something here.
  399. It is possible to start some components multiple times (currently b10-auth
  400. and b10-resolzer). You might want to do that to gain more performance
  401. (each one uses only single core). Just put multiple entries under
  402. different names, like this, with the same config:
  403. > config add Boss/components b10-resolver-2
  404. > config set Boss/components/b10-resolver-2/special resolver
  405. > config set Boss/components/b10-resolver-2/kind needed
  406. > config commit
  407. However, this is work in progress and the support is not yet complete. For
  408. example, each resolver will have its own cache, each authoritative server
  409. will keep its own copy of in-memory data and there could be problems with
  410. locking the sqlite database, if used. The configuration might be changed
  411. to something more convenient in future.
  412. Chapter 4. Command channel
  413. The BIND 10 components use the b10-msgq message routing daemon to
  414. communicate with other BIND 10 components. The b10-msgq implements what is
  415. called the “Command Channel”. Processes intercommunicate by sending
  416. messages on the command channel. Example messages include shutdown, get
  417. configurations, and set configurations. This Command Channel is not used
  418. for DNS message passing. It is used only to control and monitor the BIND
  419. 10 system.
  420. Administrators do not communicate directly with the b10-msgq daemon. By
  421. default, BIND 10 uses port 9912 for the b10-msgq service. It listens on
  422. 127.0.0.1.
  423. Chapter 5. Configuration manager
  424. The configuration manager, b10-cfgmgr, handles all BIND 10 system
  425. configuration. It provides persistent storage for configuration, and
  426. notifies running modules of configuration changes.
  427. The b10-auth and b10-xfrin daemons and other components receive their
  428. configurations from the configuration manager over the b10-msgq command
  429. channel.
  430. The administrator doesn't connect to it directly, but uses a user
  431. interface to communicate with the configuration manager via b10-cmdctl's
  432. REST-ful interface. b10-cmdctl is covered in Chapter 6, Remote control
  433. daemon.
  434. Note
  435. The development prototype release only provides bindctl as a user
  436. interface to b10-cmdctl. Upcoming releases will provide another
  437. interactive command-line interface and a web-based interface.
  438. The b10-cfgmgr daemon can send all specifications and all current settings
  439. to the bindctl client (via b10-cmdctl).
  440. b10-cfgmgr relays configurations received from b10-cmdctl to the
  441. appropriate modules.
  442. The stored configuration file is at
  443. /usr/local/var/bind10-devel/b10-config.db. (The full path is what was
  444. defined at build configure time for --localstatedir. The default is
  445. /usr/local/var/.) The format is loosely based on JSON and is directly
  446. parseable python, but this may change in a future version. This
  447. configuration data file is not manually edited by the administrator.
  448. The configuration manager does not have any command line arguments.
  449. Normally it is not started manually, but is automatically started using
  450. the bind10 master process (as covered in Chapter 3, Starting BIND10 with
  451. bind10).
  452. Chapter 6. Remote control daemon
  453. Table of Contents
  454. 6.1. Configuration specification for b10-cmdctl
  455. b10-cmdctl is the gateway between administrators and the BIND 10 system.
  456. It is a HTTPS server that uses standard HTTP Digest Authentication for
  457. username and password validation. It provides a REST-ful interface for
  458. accessing and controlling BIND 10.
  459. When b10-cmdctl starts, it firsts asks b10-cfgmgr about what modules are
  460. running and what their configuration is (over the b10-msgq channel). Then
  461. it will start listening on HTTPS for clients — the user interface — such
  462. as bindctl.
  463. b10-cmdctl directly sends commands (received from the user interface) to
  464. the specified component. Configuration changes are actually commands to
  465. b10-cfgmgr so are sent there.
  466. The HTTPS server requires a private key, such as a RSA PRIVATE KEY. The
  467. default location is at /usr/local/etc/bind10-devel/cmdctl-keyfile.pem. (A
  468. sample key is at /usr/local/share/bind10-devel/cmdctl-keyfile.pem.) It
  469. also uses a certificate located at
  470. /usr/local/etc/bind10-devel/cmdctl-certfile.pem. (A sample certificate is
  471. at /usr/local/share/bind10-devel/cmdctl-certfile.pem.) This may be a
  472. self-signed certificate or purchased from a certification authority.
  473. Note
  474. The HTTPS server doesn't support a certificate request from a client (at
  475. this time). The b10-cmdctl daemon does not provide a public service. If
  476. any client wants to control BIND 10, then a certificate needs to be first
  477. received from the BIND 10 administrator. The BIND 10 installation provides
  478. a sample PEM bundle that matches the sample key and certificate.
  479. The b10-cmdctl daemon also requires the user account file located at
  480. /usr/local/etc/bind10-devel/cmdctl-accounts.csv. This comma-delimited file
  481. lists the accounts with a user name, hashed password, and salt. (A sample
  482. file is at /usr/local/share/bind10-devel/cmdctl-accounts.csv. It contains
  483. the user named “root” with the password “bind10”.)
  484. The administrator may create a user account with the b10-cmdctl-usermgr
  485. tool.
  486. By default the HTTPS server listens on the localhost port 8080. The port
  487. can be set by using the --port command line option. The address to listen
  488. on can be set using the --address command line argument. Each HTTPS
  489. connection is stateless and times out in 1200 seconds by default. This can
  490. be redefined by using the --idle-timeout command line argument.
  491. 6.1. Configuration specification for b10-cmdctl
  492. The configuration items for b10-cmdctl are: key_file cert_file
  493. accounts_file
  494. The control commands are: print_settings shutdown
  495. Chapter 7. Control and configure user interface
  496. Note
  497. For this development prototype release, bindctl is the only user
  498. interface. It is expected that upcoming releases will provide another
  499. interactive command-line interface and a web-based interface for
  500. controlling and configuring BIND 10.
  501. The bindctl tool provides an interactive prompt for configuring,
  502. controlling, and querying the BIND 10 components. It communicates directly
  503. with a REST-ful interface over HTTPS provided by b10-cmdctl. It doesn't
  504. communicate to any other components directly.
  505. Configuration changes are actually commands to b10-cfgmgr. So when bindctl
  506. sends a configuration, it is sent to b10-cmdctl (over a HTTPS connection);
  507. then b10-cmdctl sends the command (over a b10-msgq command channel) to
  508. b10-cfgmgr which then stores the details and relays (over a b10-msgq
  509. command channel) the configuration on to the specified module.
  510. Chapter 8. Authoritative Server
  511. Table of Contents
  512. 8.1. Server Configurations
  513. 8.2. Data Source Backends
  514. 8.2.1. In-memory Data Source
  515. 8.2.2. In-memory Data Source With SQLite3 Backend
  516. 8.2.3. Reloading an In-memory Data Source
  517. 8.2.4. Disabling In-memory Data Sources
  518. 8.3. Loading Master Zones Files
  519. The b10-auth is the authoritative DNS server. It supports EDNS0 and
  520. DNSSEC. It supports IPv6. Normally it is started by the bind10 master
  521. process.
  522. 8.1. Server Configurations
  523. b10-auth is configured via the b10-cfgmgr configuration manager. The
  524. module name is “Auth”. The configuration data items are:
  525. database_file
  526. This is an optional string to define the path to find the SQLite3
  527. database file. Note: Later the DNS server will use various data
  528. source backends. This may be a temporary setting until then.
  529. datasources
  530. datasources configures data sources. The list items include: type
  531. to define the required data source type (such as “memory”); class
  532. to optionally select the class (it defaults to “IN”); and zones to
  533. define the file path name, the filetype (e.g., sqlite3), and the
  534. origin (default domain). By default, this is empty.
  535. Note
  536. In this development version, currently this is only used for the
  537. memory data source. Only the IN class is supported at this time.
  538. By default, the memory data source is disabled. Also, currently
  539. the zone file must be canonical such as generated by
  540. named-compilezone -D, or must be an SQLite3 database.
  541. listen_on
  542. listen_on is a list of addresses and ports for b10-auth to listen
  543. on. The list items are the address string and port number. By
  544. default, b10-auth listens on port 53 on the IPv6 (::) and IPv4
  545. (0.0.0.0) wildcard addresses.
  546. statistics-interval
  547. statistics-interval is the timer interval in seconds for b10-auth
  548. to share its statistics information to b10-stats(8). Statistics
  549. updates can be disabled by setting this to 0. The default is 60.
  550. The configuration commands are:
  551. loadzone
  552. loadzone tells b10-auth to load or reload a zone file. The
  553. arguments include: class which optionally defines the class (it
  554. defaults to “IN”); origin is the domain name of the zone; and
  555. datasrc optionally defines the type of datasource (it defaults to
  556. “memory”).
  557. Note
  558. In this development version, currently this only supports the IN
  559. class and the memory data source.
  560. sendstats
  561. sendstats tells b10-auth to send its statistics data to
  562. b10-stats(8) immediately.
  563. shutdown
  564. Stop the authoritative DNS server. This has an optional pid
  565. argument to select the process ID to stop. (Note that the BIND 10
  566. boss process may restart this service if configured.)
  567. 8.2. Data Source Backends
  568. Note
  569. For the development prototype release, b10-auth supports a SQLite3 data
  570. source backend and in-memory data source backend. Upcoming versions will
  571. be able to use multiple different data sources, such as MySQL and Berkeley
  572. DB.
  573. By default, the SQLite3 backend uses the data file located at
  574. /usr/local/var/bind10-devel/zone.sqlite3. (The full path is what was
  575. defined at build configure time for --localstatedir. The default is
  576. /usr/local/var/.) This data file location may be changed by defining the
  577. “database_file” configuration.
  578. 8.2.1. In-memory Data Source
  579. The following commands to bindctl provide an example of configuring an
  580. in-memory data source containing the “example.com” zone with the zone file
  581. named “example.com.zone”:
  582. > config add Auth/datasources
  583. > config set Auth/datasources[0]/type "memory"
  584. > config add Auth/datasources[0]/zones
  585. > config set Auth/datasources[0]/zones[0]/origin "example.com"
  586. > config set Auth/datasources[0]/zones[0]/file "example.com.zone"
  587. > config commit
  588. The authoritative server will begin serving it immediately after it is
  589. loaded.
  590. 8.2.2. In-memory Data Source With SQLite3 Backend
  591. The following commands to bindctl provide an example of configuring an
  592. in-memory data source containing the “example.org” zone with a SQLite3
  593. backend file named “example.org.sqlite3”:
  594. > config add Auth/datasources
  595. > config set Auth/datasources[1]/type "memory"
  596. > config add Auth/datasources[1]/zones
  597. > config set Auth/datasources[1]/zones[0]/origin "example.org"
  598. > config set Auth/datasources[1]/zones[0]/file "example.org.sqlite3"
  599. > config set Auth/datasources[1]/zones[0]/filetype "sqlite3"
  600. > config commit
  601. The authoritative server will begin serving it immediately after it is
  602. loaded.
  603. 8.2.3. Reloading an In-memory Data Source
  604. Use the Auth loadzone command in bindctl to reload a changed master file
  605. into memory; for example:
  606. > Auth loadzone origin="example.com"
  607. 8.2.4. Disabling In-memory Data Sources
  608. By default, the memory data source is disabled; it must be configured
  609. explicitly. To disable all the in-memory zones, specify a null list for
  610. Auth/datasources:
  611. > config set Auth/datasources/ []
  612. > config commit
  613. The following example stops serving a specific zone:
  614. > config remove Auth/datasources[0]/zones[0]
  615. > config commit
  616. (Replace the list number(s) in datasources[0] and/or zones[0] for the
  617. relevant zone as needed.)
  618. 8.3. Loading Master Zones Files
  619. RFC 1035 style DNS master zone files may imported into a BIND 10 SQLite3
  620. data source by using the b10-loadzone utility.
  621. b10-loadzone supports the following special directives (control entries):
  622. $INCLUDE
  623. Loads an additional zone file. This may be recursive.
  624. $ORIGIN
  625. Defines the relative domain name.
  626. $TTL
  627. Defines the time-to-live value used for following records that
  628. don't include a TTL.
  629. The -o argument may be used to define the default origin for loaded zone
  630. file records.
  631. Note
  632. In the development prototype release, only the SQLite3 back end is used by
  633. b10-loadzone. By default, it stores the zone data in
  634. /usr/local/var/bind10-devel/zone.sqlite3 unless the -d switch is used to
  635. set the database filename. Multiple zones are stored in a single SQLite3
  636. zone database.
  637. If you reload a zone already existing in the database, all records from
  638. that prior zone disappear and a whole new set appears.
  639. Chapter 9. Incoming Zone Transfers
  640. Table of Contents
  641. 9.1. Configuration for Incoming Zone Transfers
  642. 9.2. Enabling IXFR
  643. 9.3. Secondary Manager
  644. 9.4. Trigger an Incoming Zone Transfer Manually
  645. 9.5. Incoming Transfers with In-memory Datasource
  646. Incoming zones are transferred using the b10-xfrin process which is
  647. started by bind10. When received, the zone is stored in the corresponding
  648. BIND 10 data source, and its records can be served by b10-auth. In
  649. combination with b10-zonemgr (for automated SOA checks), this allows the
  650. BIND 10 server to provide “secondary” service.
  651. The b10-xfrin process supports both AXFR and IXFR. Due to some
  652. implementation limitations of the current development release, however, it
  653. only tries AXFR by default, and care should be taken to enable IXFR.
  654. 9.1. Configuration for Incoming Zone Transfers
  655. In practice, you need to specify a list of secondary zones to enable
  656. incoming zone transfers for these zones (you can still trigger a zone
  657. transfer manually, without a prior configuration (see below)).
  658. For example, to enable zone transfers for a zone named "example.com"
  659. (whose master address is assumed to be 2001:db8::53 here), run the
  660. following at the bindctl prompt:
  661. > config add Xfrin/zones
  662. > config set Xfrin/zones[0]/name "example.com"
  663. > config set Xfrin/zones[0]/master_addr "2001:db8::53"
  664. > config commit
  665. (We assume there has been no zone configuration before).
  666. 9.2. Enabling IXFR
  667. As noted above, b10-xfrin uses AXFR for zone transfers by default. To
  668. enable IXFR for zone transfers for a particular zone, set the use_ixfr
  669. configuration parameter to true. In the above example of configuration
  670. sequence, you'll need to add the following before performing commit:
  671. > config set Xfrin/zones[0]/use_ixfr true
  672. Note
  673. One reason why IXFR is disabled by default in the current release is
  674. because it does not support automatic fallback from IXFR to AXFR when it
  675. encounters a primary server that doesn't support outbound IXFR (and, not
  676. many existing implementations support it). Another, related reason is that
  677. it does not use AXFR even if it has no knowledge about the zone (like at
  678. the very first time the secondary server is set up). IXFR requires the
  679. "current version" of the zone, so obviously it doesn't work in this
  680. situation and AXFR is the only workable choice. The current release of
  681. b10-xfrin does not make this selection automatically. These features will
  682. be implemented in a near future version, at which point we will enable
  683. IXFR by default.
  684. 9.3. Secondary Manager
  685. The b10-zonemgr process is started by bind10. It keeps track of SOA
  686. refresh, retry, and expire timers and other details for BIND 10 to perform
  687. as a slave. When the b10-auth authoritative DNS server receives a NOTIFY
  688. message, b10-zonemgr may tell b10-xfrin to do a refresh to start an
  689. inbound zone transfer. The secondary manager resets its counters when a
  690. new zone is transferred in.
  691. Note
  692. Access control (such as allowing notifies) is not yet provided. The
  693. primary/secondary service is not yet complete.
  694. The following example shows using bindctl to configure the server to be a
  695. secondary for the example zone:
  696. > config add Zonemgr/secondary_zones
  697. > config set Zonemgr/secondary_zones[0]/name "example.com"
  698. > config set Zonemgr/secondary_zones[0]/class "IN"
  699. > config commit
  700. If the zone does not exist in the data source already (i.e. no SOA record
  701. for it), b10-zonemgr will automatically tell b10-xfrin to transfer the
  702. zone in.
  703. 9.4. Trigger an Incoming Zone Transfer Manually
  704. To manually trigger a zone transfer to retrieve a remote zone, you may use
  705. the bindctl utility. For example, at the bindctl prompt run:
  706. > Xfrin retransfer zone_name="foo.example.org" master=192.0.2.99
  707. 9.5. Incoming Transfers with In-memory Datasource
  708. In the case of an incoming zone transfer, the received zone is first
  709. stored in the corresponding BIND 10 datasource. In case the secondary zone
  710. is served by an in-memory datasource with an SQLite3 backend, b10-auth is
  711. automatically sent a loadzone command to reload the corresponding zone
  712. into memory from the backend.
  713. The administrator doesn't have to do anything for b10-auth to serve the
  714. new version of the zone, except for the configuration such as the one
  715. described in Section 8.2.2, “In-memory Data Source With SQLite3 Backend”.
  716. Chapter 10. Outbound Zone Transfers
  717. The b10-xfrout process is started by bind10. When the b10-auth
  718. authoritative DNS server receives an AXFR or IXFR request, b10-auth
  719. internally forwards the request to b10-xfrout, which handles the rest of
  720. request processing. This is used to provide primary DNS service to share
  721. zones to secondary name servers. The b10-xfrout is also used to send
  722. NOTIFY messages to secondary servers.
  723. A global or per zone transfer_acl configuration can be used to control
  724. accessibility of the outbound zone transfer service. By default,
  725. b10-xfrout allows any clients to perform zone transfers for any zones:
  726. > config show Xfrout/transfer_acl
  727. Xfrout/transfer_acl[0] {"action": "ACCEPT"} any (default)
  728. You can change this to, for example, rejecting all transfer requests by
  729. default while allowing requests for the transfer of zone "example.com"
  730. from 192.0.2.1 and 2001:db8::1 as follows:
  731. > config set Xfrout/transfer_acl[0] {"action": "REJECT"}
  732. > config add Xfrout/zone_config
  733. > config set Xfrout/zone_config[0]/origin "example.com"
  734. > config set Xfrout/zone_config[0]/transfer_acl [{"action": "ACCEPT", "from": "192.0.2.1"},
  735. {"action": "ACCEPT", "from": "2001:db8::1"}]
  736. > config commit
  737. Note
  738. In the above example the lines for transfer_acl were divided for
  739. readability. In the actual input it must be in a single line.
  740. If you want to require TSIG in access control, a system wide TSIG "key
  741. ring" must be configured. For example, to change the previous example to
  742. allowing requests from 192.0.2.1 signed by a TSIG with a key name of
  743. "key.example", you'll need to do this:
  744. > config set tsig_keys/keys ["key.example:<base64-key>"]
  745. > config set Xfrout/zone_config[0]/transfer_acl [{"action": "ACCEPT", "from": "192.0.2.1", "key": "key.example"}]
  746. > config commit
  747. Both Xfrout and Auth will use the system wide keyring to check TSIGs in
  748. the incoming messages and to sign responses.
  749. Note
  750. The way to specify zone specific configuration (ACLs, etc) is likely to be
  751. changed.
  752. Chapter 11. Recursive Name Server
  753. Table of Contents
  754. 11.1. Access Control
  755. 11.2. Forwarding
  756. The b10-resolver process is started by bind10.
  757. The main bind10 process can be configured to select to run either the
  758. authoritative or resolver or both. By default, it doesn't start either
  759. one. You may change this using bindctl, for example:
  760. > config add Boss/components b10-resolver
  761. > config set Boss/components/b10-resolver/special resolver
  762. > config set Boss/components/b10-resolver/kind needed
  763. > config set Boss/components/b10-resolver/priority 10
  764. > config commit
  765. The master bind10 will stop and start the desired services.
  766. By default, the resolver listens on port 53 for 127.0.0.1 and ::1. The
  767. following example shows how it can be configured to listen on an
  768. additional address (and port):
  769. > config add Resolver/listen_on
  770. > config set Resolver/listen_on[2]/address "192.168.1.1"
  771. > config set Resolver/listen_on[2]/port 53
  772. > config commit
  773. (Replace the “2” as needed; run “config show Resolver/listen_on” if
  774. needed.)
  775. 11.1. Access Control
  776. By default, the b10-resolver daemon only accepts DNS queries from the
  777. localhost (127.0.0.1 and ::1). The Resolver/query_acl configuration may be
  778. used to reject, drop, or allow specific IPs or networks. This
  779. configuration list is first match.
  780. The configuration's action item may be set to “ACCEPT” to allow the
  781. incoming query, “REJECT” to respond with a DNS REFUSED return code, or
  782. “DROP” to ignore the query without any response (such as a blackhole). For
  783. more information, see the respective debugging messages:
  784. RESOLVER_QUERY_ACCEPTED, RESOLVER_QUERY_REJECTED, and
  785. RESOLVER_QUERY_DROPPED.
  786. The required configuration's from item is set to an IPv4 or IPv6 address,
  787. addresses with an network mask, or to the special lowercase keywords
  788. “any6” (for any IPv6 address) or “any4” (for any IPv4 address).
  789. For example to allow the 192.168.1.0/24 network to use your recursive name
  790. server, at the bindctl prompt run:
  791. > config add Resolver/query_acl
  792. > config set Resolver/query_acl[2]/action "ACCEPT"
  793. > config set Resolver/query_acl[2]/from "192.168.1.0/24"
  794. > config commit
  795. (Replace the “2” as needed; run “config show Resolver/query_acl” if
  796. needed.)
  797. Note
  798. This prototype access control configuration syntax may be changed.
  799. 11.2. Forwarding
  800. To enable forwarding, the upstream address and port must be configured to
  801. forward queries to, such as:
  802. > config set Resolver/forward_addresses [{ "address": "192.168.1.1", "port": 53 }]
  803. > config commit
  804. (Replace 192.168.1.1 to point to your full resolver.)
  805. Normal iterative name service can be re-enabled by clearing the forwarding
  806. address(es); for example:
  807. > config set Resolver/forward_addresses []
  808. > config commit
  809. Chapter 12. DHCPv4 Server
  810. Table of Contents
  811. 12.1. DHCPv4 Server Usage
  812. 12.2. DHCPv4 Server Configuration
  813. 12.3. Supported standards
  814. 12.4. DHCPv4 Server Limitations
  815. Dynamic Host Configuration Protocol for IPv4 (DHCP or DHCPv4) and Dynamic
  816. Host Configuration Protocol for IPv6 (DHCPv6) are protocols that allow one
  817. node (server) to provision configuration parameters to many hosts and
  818. devices (clients). To ease deployment in larger networks, additional nodes
  819. (relays) may be deployed that facilitate communication between servers and
  820. clients. Even though principles of both DHCPv4 and DHCPv6 are somewhat
  821. similar, these are two radically different protocols. BIND10 offers server
  822. implementations for both DHCPv4 and DHCPv6. This chapter is about DHCP for
  823. IPv4. For a description of the DHCPv6 server, see Chapter 13, DHCPv6
  824. Server.
  825. The DHCPv4 server component is currently under intense development. You
  826. may want to check out BIND10 DHCP (Kea) wiki and recent posts on BIND10
  827. developers mailing list.
  828. The DHCPv4 and DHCPv6 components in BIND10 architecture are internally
  829. code named “Kea”.
  830. Note
  831. As of December 2011, both DHCPv4 and DHCPv6 components are skeleton
  832. servers. That means that while they are capable of performing DHCP
  833. configuration, they are not fully functional yet. In particular, neither
  834. has functional lease databases. This means that they will assign the same,
  835. fixed, hardcoded addresses to any client that will ask. See Section 12.4,
  836. “DHCPv4 Server Limitations” and Section 13.4, “DHCPv6 Server Limitations”
  837. for detailed description.
  838. 12.1. DHCPv4 Server Usage
  839. BIND10 provides the DHCPv4 server component since December 2011. It is a
  840. skeleton server and can be described as an early prototype that is not
  841. fully functional yet. It is mature enough to conduct first tests in lab
  842. environment, but it has significant limitations. See Section 12.4, “DHCPv4
  843. Server Limitations” for details.
  844. The DHCPv4 server is implemented as b10-dhcp4 daemon. As it is not
  845. configurable yet, it is fully autonomous, that is it does not interact
  846. with b10-cfgmgr. To start DHCPv4 server, simply input:
  847. #cd src/bin/dhcp4
  848. #./b10-dhcp4
  849. Depending on your installation, b10-dhcp4 binary may reside in
  850. src/bin/dhcp4 in your source code directory, in /usr/local/bin/b10-dhcp4
  851. or other directory you specified during compilation. At start, the server
  852. will detect available network interfaces and will attempt to open UDP
  853. sockets on all interfaces that are up, running, are not loopback, and have
  854. IPv4 address assigned. The server will then listen to incoming traffic.
  855. Currently supported client messages are DISCOVER and REQUEST. The server
  856. will respond to them with OFFER and ACK, respectively. Since the DHCPv4
  857. server opens privileged ports, it requires root access. Make sure you run
  858. this daemon as root.
  859. Note
  860. Integration with bind10 is planned. Ultimately, b10-dhcp4 will not be
  861. started directly, but rather via bind10. Please be aware of this planned
  862. change.
  863. 12.2. DHCPv4 Server Configuration
  864. The DHCPv4 server does not have a lease database implemented yet nor any
  865. support for configuration, so every time the same set of configuration
  866. options (including the same fixed address) will be assigned every time.
  867. At this stage of development, the only way to alter the server
  868. configuration is to tweak its source code. To do so, please edit
  869. src/bin/dhcp4/dhcp4_srv.cc file and modify following parameters and
  870. recompile:
  871. const std::string HARDCODED_LEASE = "192.0.2.222"; // assigned lease
  872. const std::string HARDCODED_NETMASK = "255.255.255.0";
  873. const uint32_t HARDCODED_LEASE_TIME = 60; // in seconds
  874. const std::string HARDCODED_GATEWAY = "192.0.2.1";
  875. const std::string HARDCODED_DNS_SERVER = "192.0.2.2";
  876. const std::string HARDCODED_DOMAIN_NAME = "isc.example.com";
  877. const std::string HARDCODED_SERVER_ID = "192.0.2.1";
  878. Lease database and configuration support is planned for 2012.
  879. 12.3. Supported standards
  880. The following standards and draft standards are currently supported:
  881. o RFC2131: Supported messages are DISCOVER, OFFER, REQUEST, and ACK.
  882. o RFC2132: Supported options are: PAD (0), END(255), Message Type(53),
  883. DHCP Server Identifier (54), Domain Name (15), DNS Servers (6), IP
  884. Address Lease Time (51), Subnet mask (1), and Routers (3).
  885. 12.4. DHCPv4 Server Limitations
  886. These are the current limitations of the DHCPv4 server software. Most of
  887. them are reflections of the early stage of development and should be
  888. treated as “not implemented yet”, rather than actual limitations.
  889. o During initial IPv4 node configuration, the server is expected to send
  890. packets to a node that does not have IPv4 address assigned yet. The
  891. server requires certain tricks (or hacks) to transmit such packets.
  892. This is not implemented yet, therefore DHCPv4 server supports relayed
  893. traffic only (that is, normal point to point communication).
  894. o b10-dhcp4 provides a single, fixed, hardcoded lease to any client that
  895. asks. There is no lease manager implemented. If two clients request
  896. addresses, they will both get the same fixed address.
  897. o b10-dhcp4 does not support any configuration mechanisms yet. The whole
  898. configuration is currently hardcoded. The only way to tweak
  899. configuration is to directly modify source code. See see Section 12.2,
  900. “DHCPv4 Server Configuration” for details.
  901. o Upon start, the server will open sockets on all interfaces that are
  902. not loopback, are up and running and have IPv4 address. Support for
  903. multiple interfaces is not coded in reception routines yet, so if you
  904. are running this code on a machine that has many interfaces and
  905. b10-dhcp4 happens to listen on wrong interface, the easiest way to
  906. work around this problem is to turn down other interfaces. This
  907. limitation will be fixed shortly.
  908. o PRL (Parameter Request List, a list of options requested by a client)
  909. is currently ignored and server assigns DNS SERVER and DOMAIN NAME
  910. options.
  911. o b10-dhcp4 does not support BOOTP. That is a design choice. This
  912. limitation is permanent. If you have legacy nodes that can't use DHCP
  913. and require BOOTP support, please use latest version of ISC DHCP
  914. http://www.isc.org/software/dhcp.
  915. o Interface detection is currently working on Linux only. See
  916. Section 14.1, “Interface detection” for details.
  917. o b10-dhcp4 does not verify that assigned address is unused. According
  918. to RFC2131, the allocating server should verify that address is no
  919. used by sending ICMP echo request.
  920. o Address renewal (RENEW), rebinding (REBIND), confirmation (CONFIRM),
  921. duplication report (DECLINE) and release (RELEASE) are not supported
  922. yet.
  923. o DNS Update is not supported yet.
  924. o -v (verbose) command line option is currently the default, and cannot
  925. be disabled.
  926. Chapter 13. DHCPv6 Server
  927. Table of Contents
  928. 13.1. DHCPv6 Server Usage
  929. 13.2. DHCPv6 Server Configuration
  930. 13.3. Supported DHCPv6 Standards
  931. 13.4. DHCPv6 Server Limitations
  932. Dynamic Host Configuration Protocol for IPv6 (DHCPv6) is specified in
  933. RFC3315. BIND10 provides DHCPv6 server implementation that is described in
  934. this chapter. For a description of the DHCPv4 server implementation, see
  935. Chapter 12, DHCPv4 Server.
  936. The DHCPv6 server component is currently under intense development. You
  937. may want to check out BIND10 DHCP (Kea) wiki and recent posts on BIND10
  938. developers mailing list.
  939. The DHCPv4 and DHCPv6 components in BIND10 architecture are internally
  940. code named “Kea”.
  941. Note
  942. As of December 2011, both DHCPv4 and DHCPv6 components are skeleton
  943. servers. That means that while they are capable of performing DHCP
  944. configuration, they are not fully functional yet. In particular, neither
  945. has functional lease databases. This means that they will assign the same,
  946. fixed, hardcoded addresses to any client that will ask. See Section 12.4,
  947. “DHCPv4 Server Limitations” and Section 13.4, “DHCPv6 Server Limitations”
  948. for detailed description.
  949. 13.1. DHCPv6 Server Usage
  950. BIND10 provides the DHCPv6 server component since September 2011. It is a
  951. skeleton server and can be described as an early prototype that is not
  952. fully functional yet. It is mature enough to conduct first tests in lab
  953. environment, but it has significant limitations. See Section 13.4, “DHCPv6
  954. Server Limitations” for details.
  955. The DHCPv6 server is implemented as b10-dhcp6 daemon. As it is not
  956. configurable yet, it is fully autonomous, that is it does not interact
  957. with b10-cfgmgr. To start DHCPv6 server, simply input:
  958. #cd src/bin/dhcp6
  959. #./b10-dhcp6
  960. Depending on your installation, b10-dhcp6 binary may reside in
  961. src/bin/dhcp6 in your source code directory, in /usr/local/bin/b10-dhcp6
  962. or other directory you specified during compilation. At start, server will
  963. detect available network interfaces and will attempt to open UDP sockets
  964. on all interfaces that are up, running, are not loopback, are
  965. multicast-capable, and have IPv6 address assigned. The server will then
  966. listen to incoming traffic. Currently supported client messages are
  967. SOLICIT and REQUEST. The server will respond to them with ADVERTISE and
  968. REPLY, respectively. Since the DHCPv6 server opens privileged ports, it
  969. requires root access. Make sure you run this daemon as root.
  970. Note
  971. Integration with bind10 is planned. Ultimately, b10-dhcp6 will not be
  972. started directly, but rather via bind10. Please be aware of this planned
  973. change.
  974. 13.2. DHCPv6 Server Configuration
  975. The DHCPv6 server does not have lease database implemented yet or any
  976. support for configuration, so every time the same set of configuration
  977. options (including the same fixed address) will be assigned every time.
  978. At this stage of development, the only way to alter server configuration
  979. is to tweak its source code. To do so, please edit
  980. src/bin/dhcp6/dhcp6_srv.cc file and modify following parameters and
  981. recompile:
  982. const std::string HARDCODED_LEASE = "2001:db8:1::1234:abcd";
  983. const uint32_t HARDCODED_T1 = 1500; // in seconds
  984. const uint32_t HARDCODED_T2 = 2600; // in seconds
  985. const uint32_t HARDCODED_PREFERRED_LIFETIME = 3600; // in seconds
  986. const uint32_t HARDCODED_VALID_LIFETIME = 7200; // in seconds
  987. const std::string HARDCODED_DNS_SERVER = "2001:db8:1::1";
  988. Lease database and configuration support is planned for 2012.
  989. 13.3. Supported DHCPv6 Standards
  990. The following standards and draft standards are currently supported:
  991. o RFC3315: Supported messages are SOLICIT, ADVERTISE, REQUEST, and
  992. REPLY. Supported options are SERVER_ID, CLIENT_ID, IA_NA, and
  993. IAADDRESS.
  994. o RFC3646: Supported option is DNS_SERVERS.
  995. 13.4. DHCPv6 Server Limitations
  996. These are the current limitations of the DHCPv6 server software. Most of
  997. them are reflections of the early stage of development and should be
  998. treated as “not implemented yet”, rather than actual limitations.
  999. o Relayed traffic is not supported.
  1000. o b10-dhcp6 provides a single, fixed, hardcoded lease to any client that
  1001. asks. There is no lease manager implemented. If two clients request
  1002. addresses, they will both get the same fixed address.
  1003. o b10-dhcp6 does not support any configuration mechanisms yet. The whole
  1004. configuration is currently hardcoded. The only way to tweak
  1005. configuration is to directly modify source code. See see Section 13.2,
  1006. “DHCPv6 Server Configuration” for details.
  1007. o Upon start, the server will open sockets on all interfaces that are
  1008. not loopback, are up, running and are multicast capable and have IPv6
  1009. address. Support for multiple interfaces is not coded in reception
  1010. routines yet, so if you are running this code on a machine that has
  1011. many interfaces and b10-dhcp6 happens to listen on wrong interface,
  1012. the easiest way to work around this problem is to turn down other
  1013. interfaces. This limitation will be fixed shortly.
  1014. o ORO (Option Request Option, a list of options requested by a client)
  1015. is currently ignored and server assigns DNS SERVER option.
  1016. o Temporary addresses are not supported yet.
  1017. o Prefix delegation is not supported yet.
  1018. o Address renewal (RENEW), rebinding (REBIND), confirmation (CONFIRM),
  1019. duplication report (DECLINE) and release (RELEASE) are not supported
  1020. yet.
  1021. o DNS Update is not supported yet.
  1022. o Interface detection is currently working on Linux only. See
  1023. Section 14.1, “Interface detection” for details.
  1024. o -v (verbose) command line option is currently the default, and cannot
  1025. be disabled.
  1026. Chapter 14. libdhcp++ library
  1027. Table of Contents
  1028. 14.1. Interface detection
  1029. 14.2. DHCPv4/DHCPv6 packet handling
  1030. libdhcp++ is a common library written in C++ that handles many
  1031. DHCP-related tasks, like DHCPv4 and DHCPv6 packets parsing, manipulation
  1032. and assembly, option parsing, manipulation and assembly, network interface
  1033. detection and socket operations, like socket creations, data transmission
  1034. and reception and socket closing.
  1035. While this library is currently used by b10-dhcp4 and b10-dhcp6 only, it
  1036. is designed to be portable, universal library useful for any kind of
  1037. DHCP-related software.
  1038. 14.1. Interface detection
  1039. Both DHCPv4 and DHCPv6 components share network interface detection
  1040. routines. Interface detection is currently only supported on Linux
  1041. systems.
  1042. For non-Linux systems, there is currently stub implementation provided. As
  1043. DHCP servers need to know available addresses, there is a simple mechanism
  1044. implemented to provide that information. User is expected to create
  1045. interfaces.txt file. Format of this file is simple. It contains list of
  1046. interfaces along with available address on each interface. This mechanism
  1047. is temporary and is going to be removed as soon as interface detection
  1048. becomes available on non-Linux systems. Here is an example of the
  1049. interfaces.txt file:
  1050. # For DHCPv6, please specify link-local address (starts with fe80::)
  1051. # If in doubt, check output of 'ifconfig -a' command.
  1052. eth0 fe80::21e:8cff:fe9b:7349
  1053. # For DHCPv4, please use following format:
  1054. #eth0 192.0.2.5
  1055. 14.2. DHCPv4/DHCPv6 packet handling
  1056. TODO: Describe packet handling here, with pointers to wiki
  1057. Chapter 15. Statistics
  1058. The b10-stats process is started by bind10. It periodically collects
  1059. statistics data from various modules and aggregates it.
  1060. This stats daemon provides commands to identify if it is running, show
  1061. specified or all statistics data, show specified or all statistics data
  1062. schema, and set specified statistics data. For example, using bindctl:
  1063. > Stats show
  1064. {
  1065. "Auth": {
  1066. "opcode.iquery": 0,
  1067. "opcode.notify": 10,
  1068. "opcode.query": 869617,
  1069. ...
  1070. "queries.tcp": 1749,
  1071. "queries.udp": 867868
  1072. },
  1073. "Boss": {
  1074. "boot_time": "2011-01-20T16:59:03Z"
  1075. },
  1076. "Stats": {
  1077. "boot_time": "2011-01-20T16:59:05Z",
  1078. "last_update_time": "2011-01-20T17:04:05Z",
  1079. "lname": "4d3869d9_a@jreed.example.net",
  1080. "report_time": "2011-01-20T17:04:06Z",
  1081. "timestamp": 1295543046.823504
  1082. }
  1083. }
  1084. Chapter 16. Logging
  1085. Table of Contents
  1086. 16.1. Logging configuration
  1087. 16.1.1. Loggers
  1088. 16.1.2. Output Options
  1089. 16.1.3. Example session
  1090. 16.2. Logging Message Format
  1091. 16.1. Logging configuration
  1092. The logging system in BIND 10 is configured through the Logging module.
  1093. All BIND 10 modules will look at the configuration in Logging to see what
  1094. should be logged and to where.
  1095. 16.1.1. Loggers
  1096. Within BIND 10, a message is logged through a component called a "logger".
  1097. Different parts of BIND 10 log messages through different loggers, and
  1098. each logger can be configured independently of one another.
  1099. In the Logging module, you can specify the configuration for zero or more
  1100. loggers; any that are not specified will take appropriate default values.
  1101. The three most important elements of a logger configuration are the name
  1102. (the component that is generating the messages), the severity (what to
  1103. log), and the output_options (where to log).
  1104. 16.1.1.1. name (string)
  1105. Each logger in the system has a name, the name being that of the component
  1106. using it to log messages. For instance, if you want to configure logging
  1107. for the resolver module, you add an entry for a logger named “Resolver”.
  1108. This configuration will then be used by the loggers in the Resolver
  1109. module, and all the libraries used by it.
  1110. If you want to specify logging for one specific library within the module,
  1111. you set the name to module.library. For example, the logger used by the
  1112. nameserver address store component has the full name of “Resolver.nsas”.
  1113. If there is no entry in Logging for a particular library, it will use the
  1114. configuration given for the module.
  1115. To illustrate this, suppose you want the cache library to log messages of
  1116. severity DEBUG, and the rest of the resolver code to log messages of
  1117. severity INFO. To achieve this you specify two loggers, one with the name
  1118. “Resolver” and severity INFO, and one with the name “Resolver.cache” with
  1119. severity DEBUG. As there are no entries for other libraries (e.g. the
  1120. nsas), they will use the configuration for the module (“Resolver”), so
  1121. giving the desired behavior.
  1122. One special case is that of a module name of “*” (asterisks), which is
  1123. interpreted as any module. You can set global logging options by using
  1124. this, including setting the logging configuration for a library that is
  1125. used by multiple modules (e.g. “*.config” specifies the configuration
  1126. library code in whatever module is using it).
  1127. If there are multiple logger specifications in the configuration that
  1128. might match a particular logger, the specification with the more specific
  1129. logger name takes precedence. For example, if there are entries for for
  1130. both “*” and “Resolver”, the resolver module — and all libraries it uses —
  1131. will log messages according to the configuration in the second entry
  1132. (“Resolver”). All other modules will use the configuration of the first
  1133. entry (“*”). If there was also a configuration entry for “Resolver.cache”,
  1134. the cache library within the resolver would use that in preference to the
  1135. entry for “Resolver”.
  1136. One final note about the naming. When specifying the module name within a
  1137. logger, use the name of the module as specified in bindctl, e.g.
  1138. “Resolver” for the resolver module, “Xfrout” for the xfrout module, etc.
  1139. When the message is logged, the message will include the name of the
  1140. logger generating the message, but with the module name replaced by the
  1141. name of the process implementing the module (so for example, a message
  1142. generated by the “Auth.cache” logger will appear in the output with a
  1143. logger name of “b10-auth.cache”).
  1144. 16.1.1.2. severity (string)
  1145. This specifies the category of messages logged. Each message is logged
  1146. with an associated severity which may be one of the following (in
  1147. descending order of severity):
  1148. o FATAL
  1149. o ERROR
  1150. o WARN
  1151. o INFO
  1152. o DEBUG
  1153. When the severity of a logger is set to one of these values, it will only
  1154. log messages of that severity, and the severities above it. The severity
  1155. may also be set to NONE, in which case all messages from that logger are
  1156. inhibited.
  1157. 16.1.1.3. output_options (list)
  1158. Each logger can have zero or more output_options. These specify where log
  1159. messages are sent to. These are explained in detail below.
  1160. The other options for a logger are:
  1161. 16.1.1.4. debuglevel (integer)
  1162. When a logger's severity is set to DEBUG, this value specifies what debug
  1163. messages should be printed. It ranges from 0 (least verbose) to 99 (most
  1164. verbose).
  1165. If severity for the logger is not DEBUG, this value is ignored.
  1166. 16.1.1.5. additive (true or false)
  1167. If this is true, the output_options from the parent will be used. For
  1168. example, if there are two loggers configured; “Resolver” and
  1169. “Resolver.cache”, and additive is true in the second, it will write the
  1170. log messages not only to the destinations specified for “Resolver.cache”,
  1171. but also to the destinations as specified in the output_options in the
  1172. logger named “Resolver”.
  1173. 16.1.2. Output Options
  1174. The main settings for an output option are the destination and a value
  1175. called output, the meaning of which depends on the destination that is
  1176. set.
  1177. 16.1.2.1. destination (string)
  1178. The destination is the type of output. It can be one of:
  1179. o console
  1180. o file
  1181. o syslog
  1182. 16.1.2.2. output (string)
  1183. Depending on what is set as the output destination, this value is
  1184. interpreted as follows:
  1185. destination is “console”
  1186. The value of output must be one of “stdout” (messages printed to
  1187. standard output) or “stderr” (messages printed to standard error).
  1188. Note: if output is set to “stderr” and a lot of messages are
  1189. produced in a short time (e.g. if the logging level is set to
  1190. DEBUG), you may occasionally see some messages jumbled up
  1191. together. This is due to a combination of the way that messages
  1192. are written to the screen and the unbuffered nature of the
  1193. standard error stream. If this occurs, it is recommended that
  1194. output be set to “stdout”.
  1195. destination is “file”
  1196. The value of output is interpreted as a file name; log messages
  1197. will be appended to this file.
  1198. destination is “syslog”
  1199. The value of output is interpreted as the syslog facility (e.g.
  1200. local0) that should be used for log messages.
  1201. The other options for output_options are:
  1202. 16.1.2.2.1. flush (true of false)
  1203. Flush buffers after each log message. Doing this will reduce performance
  1204. but will ensure that if the program terminates abnormally, all messages up
  1205. to the point of termination are output.
  1206. 16.1.2.2.2. maxsize (integer)
  1207. Only relevant when destination is file, this is maximum file size of
  1208. output files in bytes. When the maximum size is reached, the file is
  1209. renamed and a new file opened. (For example, a ".1" is appended to the
  1210. name — if a ".1" file exists, it is renamed ".2", etc.)
  1211. If this is 0, no maximum file size is used.
  1212. 16.1.2.2.3. maxver (integer)
  1213. Maximum number of old log files to keep around when rolling the output
  1214. file. Only relevant when destination is “file”.
  1215. 16.1.3. Example session
  1216. In this example we want to set the global logging to write to the file
  1217. /var/log/my_bind10.log, at severity WARN. We want the authoritative server
  1218. to log at DEBUG with debuglevel 40, to a different file
  1219. (/tmp/debug_messages).
  1220. Start bindctl.
  1221. ["login success "]
  1222. > config show Logging
  1223. Logging/loggers [] list
  1224. By default, no specific loggers are configured, in which case the severity
  1225. defaults to INFO and the output is written to stderr.
  1226. Let's first add a default logger:
  1227. > config add Logging/loggers
  1228. > config show Logging
  1229. Logging/loggers/ list (modified)
  1230. The loggers value line changed to indicate that it is no longer an empty
  1231. list:
  1232. > config show Logging/loggers
  1233. Logging/loggers[0]/name "" string (default)
  1234. Logging/loggers[0]/severity "INFO" string (default)
  1235. Logging/loggers[0]/debuglevel 0 integer (default)
  1236. Logging/loggers[0]/additive false boolean (default)
  1237. Logging/loggers[0]/output_options [] list (default)
  1238. The name is mandatory, so we must set it. We will also change the severity
  1239. as well. Let's start with the global logger.
  1240. > config set Logging/loggers[0]/name *
  1241. > config set Logging/loggers[0]/severity WARN
  1242. > config show Logging/loggers
  1243. Logging/loggers[0]/name "*" string (modified)
  1244. Logging/loggers[0]/severity "WARN" string (modified)
  1245. Logging/loggers[0]/debuglevel 0 integer (default)
  1246. Logging/loggers[0]/additive false boolean (default)
  1247. Logging/loggers[0]/output_options [] list (default)
  1248. Of course, we need to specify where we want the log messages to go, so we
  1249. add an entry for an output option.
  1250. > config add Logging/loggers[0]/output_options
  1251. > config show Logging/loggers[0]/output_options
  1252. Logging/loggers[0]/output_options[0]/destination "console" string (default)
  1253. Logging/loggers[0]/output_options[0]/output "stdout" string (default)
  1254. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  1255. Logging/loggers[0]/output_options[0]/maxsize 0 integer (default)
  1256. Logging/loggers[0]/output_options[0]/maxver 0 integer (default)
  1257. These aren't the values we are looking for.
  1258. > config set Logging/loggers[0]/output_options[0]/destination file
  1259. > config set Logging/loggers[0]/output_options[0]/output /var/log/bind10.log
  1260. > config set Logging/loggers[0]/output_options[0]/maxsize 204800
  1261. > config set Logging/loggers[0]/output_options[0]/maxver 8
  1262. Which would make the entire configuration for this logger look like:
  1263. > config show all Logging/loggers
  1264. Logging/loggers[0]/name "*" string (modified)
  1265. Logging/loggers[0]/severity "WARN" string (modified)
  1266. Logging/loggers[0]/debuglevel 0 integer (default)
  1267. Logging/loggers[0]/additive false boolean (default)
  1268. Logging/loggers[0]/output_options[0]/destination "file" string (modified)
  1269. Logging/loggers[0]/output_options[0]/output "/var/log/bind10.log" string (modified)
  1270. Logging/loggers[0]/output_options[0]/flush false boolean (default)
  1271. Logging/loggers[0]/output_options[0]/maxsize 204800 integer (modified)
  1272. Logging/loggers[0]/output_options[0]/maxver 8 integer (modified)
  1273. That looks OK, so let's commit it before we add the configuration for the
  1274. authoritative server's logger.
  1275. > config commit
  1276. Now that we have set it, and checked each value along the way, adding a
  1277. second entry is quite similar.
  1278. > config add Logging/loggers
  1279. > config set Logging/loggers[1]/name Auth
  1280. > config set Logging/loggers[1]/severity DEBUG
  1281. > config set Logging/loggers[1]/debuglevel 40
  1282. > config add Logging/loggers[1]/output_options
  1283. > config set Logging/loggers[1]/output_options[0]/destination file
  1284. > config set Logging/loggers[1]/output_options[0]/output /tmp/auth_debug.log
  1285. > config commit
  1286. And that's it. Once we have found whatever it was we needed the debug
  1287. messages for, we can simply remove the second logger to let the
  1288. authoritative server use the same settings as the rest.
  1289. > config remove Logging/loggers[1]
  1290. > config commit
  1291. And every module will now be using the values from the logger named “*”.
  1292. 16.2. Logging Message Format
  1293. Each message written by BIND 10 to the configured logging destinations
  1294. comprises a number of components that identify the origin of the message
  1295. and, if the message indicates a problem, information about the problem
  1296. that may be useful in fixing it.
  1297. Consider the message below logged to a file:
  1298. 2011-06-15 13:48:22.034 ERROR [b10-resolver.asiolink]
  1299. ASIODNS_OPENSOCK error 111 opening TCP socket to 127.0.0.1(53)
  1300. Note: the layout of messages written to the system logging file (syslog)
  1301. may be slightly different. This message has been split across two lines
  1302. here for display reasons; in the logging file, it will appear on one
  1303. line.)
  1304. The log message comprises a number of components:
  1305. 2011-06-15 13:48:22.034
  1306. The date and time at which the message was generated.
  1307. ERROR
  1308. The severity of the message.
  1309. [b10-resolver.asiolink]
  1310. The source of the message. This comprises two components: the BIND
  1311. 10 process generating the message (in this case, b10-resolver) and
  1312. the module within the program from which the message originated
  1313. (which in the example is the asynchronous I/O link module,
  1314. asiolink).
  1315. ASIODNS_OPENSOCK
  1316. The message identification. Every message in BIND 10 has a unique
  1317. identification, which can be used as an index into the BIND 10
  1318. Messages Manual (http://bind10.isc.org/docs/bind10-messages.html)
  1319. from which more information can be obtained.
  1320. error 111 opening TCP socket to 127.0.0.1(53)
  1321. A brief description of the cause of the problem. Within this text,
  1322. information relating to the condition that caused the message to
  1323. be logged will be included. In this example, error number 111 (an
  1324. operating system-specific error number) was encountered when
  1325. trying to open a TCP connection to port 53 on the local system
  1326. (address 127.0.0.1). The next step would be to find out the reason
  1327. for the failure by consulting your system's documentation to
  1328. identify what error number 111 means.