From: Marcin Siodelski Date: Fri, 11 Apr 2014 13:13:26 +0000 (+0200) Subject: [3395] Updated BIND10 Guide, removing DNS parts and updating examples. X-Git-Tag: trac2406k_base~3^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7a7acb58f30f1cb079b8b06e96f4a26fd10cfb2;p=thirdparty%2Fkea.git [3395] Updated BIND10 Guide, removing DNS parts and updating examples. --- diff --git a/doc/guide/bind10-guide.xml b/doc/guide/bind10-guide.xml index 7bb7be2571..a5faee2c87 100644 --- a/doc/guide/bind10-guide.xml +++ b/doc/guide/bind10-guide.xml @@ -26,95 +26,64 @@ - BIND 10 Guide - Administrator Reference for BIND 10 + Kea Guide + Administrator Reference for Kea 2010-2014Internet Systems Consortium, Inc. - BIND 10 is a framework that features Domain Name System - (DNS) suite and Dynamic Host Configuration Protocol (DHCP) - servers with development managed by Internet Systems Consortium (ISC). - It includes DNS libraries, modular components for controlling - authoritative and recursive DNS servers, and experimental DHCPv4 - and DHCPv6 servers (codenamed Kea). + + Kea is an implementation of the Dynamic Host Configuration + Protocol (DHCP) servers with development managed by Internet Systems + Consortium (ISC). + + - This is the reference guide for BIND 10 version &__VERSION__;. + This is the reference guide for Kea version &__VERSION__;. The most up-to-date version of this document (in PDF, HTML, and plain text formats), along with other documents for - BIND 10, can be found at . + Kea, can be found at . - This is the reference guide for BIND 10 version + This is the reference guide for Kea version &__VERSION__;. + Preface - -
- Acknowledgements - - BIND 10 is a sponsored development project, and would not - be possible without the generous support of the sponsors. - - JPRS and - CIRA are Patron Level - sponsors. - - AFNIC, - CNNIC, - CZ.NIC, - DENIC eG, - Google, - RIPE NCC, - Registro.br, - .nz Registry Services, and - Technical Center of Internet - are current sponsors. - - Afilias, - IIS.SE, - Nominet, and - SIDN were founding - sponsors of the project. - - - - Support for BIND 10 development of the DHCPv4 and DHCPv6 - components is provided by - Comcast. - -
-
Introduction - BIND is the popular implementation of a DNS server, developer - interfaces, and DNS tools. - BIND 10 is a rewrite of BIND 9 and ISC DHCP. - BIND 10 is written in C++ and Python and provides a modular - environment for serving, maintaining, and developing DNS and DHCP. - BIND 10 provides a EDNS0- and DNSSEC-capable authoritative - DNS server and a caching recursive name server which also - provides forwarding. - It also provides experimental DHCPv4 and DHCPv6 servers. + Kea is an implementation of the new generation DHCP servers from + ISC. It supports both DHCPv4 and DHCPv6 protocols along with their + extensions (e.g. prefix delegation). It also supports the dynamic + updates to DNS. + + + + Kea has been initially developed as a part of the BIND 10 framework + (). In early 2014, ISC has + made a decision to discontinue active development of BIND 10 and + continue development of Kea as standalone DHCP servers. As a result, + the DNS-related binaries and libraries are going to be removed from + the Kea source tree over time. - This guide covers BIND 10 version &__VERSION__;. + This guide covers Kea version &__VERSION__;.
Supported Platforms - BIND 10 builds have been tested on (in no particular order) + Kea builds have been tested on (in no particular order) Debian GNU/Linux 6 and unstable, Ubuntu 9.10, NetBSD 5, Solaris 10 and 11, FreeBSD 7 and 8, CentOS Linux 5.3, MacOS 10.6 and 10.7, and OpenBSD 5.1. @@ -122,7 +91,7 @@ It has been tested on Sparc, i386, and amd64 hardware platforms. - It is planned for BIND 10 to build, install and run on + It is planned for Kea to build, install and run on Windows and standard Unix-type platforms.
@@ -131,7 +100,7 @@ Required Software at Run-time - Running BIND 10 uses various extra software which may + Running Kea uses various extra software which may not be provided in some operating systems' default installations nor standard packages collections. You may need to install this required software separately. @@ -140,52 +109,41 @@ - BIND 10 requires at least Python 3.1 - (). - It also works with Python 3.2. + Kea was developed as a collection of applications within + BIND 10 framework and it still relies on the remaining parts + of this framework. In particular, the servers' configuration + and startup are still facilitated by the modules which origin + in BIND 10. These modules require at least Python 3.1 to run. + They also work with Python 3.2 + ()). The dependency + on Python will be removed once a replacing configuration + and startup mechanisms are developed for Kea. At this point + Kea will be written in pure C++. - BIND 10 uses the Botan crypto library for C++ + Kea uses the Botan crypto library for C++ (). It requires at least Botan version 1.8. - BIND 10 uses the log4cplus C++ logging library + Kea uses the log4cplus C++ logging library (). It requires at least log4cplus version 1.0.3. - - - The authoritative DNS server uses SQLite3 - (). - - It needs at least SQLite version 3.3.9. - - - - The b10-ddns, b10-xfrin, - b10-xfrout, and b10-zonemgr - components require the libpython3 library and the Python - _sqlite3.so module (which is included with Python). - Python modules need to be built for the corresponding Python 3. - -
Starting and Stopping the Server - - BIND 10 is modular. Part of this modularity is + Kea is modular. Part of this modularity is accomplished using multiple cooperating processes which, together, - provide the server functionality. This is a change from - the previous generation of BIND software, which used a - single process. + provide the server functionality. + At first, running many different processes may seem confusing. However, these processes are started by running a single @@ -200,14 +158,6 @@ - - - b10-auth — - Authoritative DNS server. - This process serves DNS requests. - - - b10-cfgmgr — @@ -226,30 +176,36 @@ - b10-ddns — - Dynamic DNS update service. - This process is used to handle incoming DNS update - requests to allow granted clients to update zones - for which BIND 10 is serving as a primary server. + b10-dhcp4 — + DHCPv4 server process. + This process responds to DHCPv4 queries from clients. - b10-msgq — - Message bus daemon. - This process coordinates communication between all of the other - BIND 10 processes. + b10-dhcp6 — + DHCPv6 server process. + This process responds to DHCPv6 queries from clients. + + + + + + b10-dhcp-ddns — + DHCP-DDNS process. + This process acts as an intermediary between the DHCP servers + and DNS server. It receives name update requests from the DHCP + servers and sends DNS Update messages to the DNS servers. - b10-resolver — - Recursive name server. - This process handles incoming DNS queries and provides - answers from its cache or by recursively doing remote lookups. - (This is an experimental proof of concept.) + b10-msgq — + Message bus daemon. + This process coordinates communication between all of the other + BIND 10 processes. @@ -278,33 +234,6 @@ - - - b10-xfrin — - Incoming zone transfer service. - This process is used to transfer a new copy - of a zone into BIND 10, when acting as a secondary server. - - - - - - b10-xfrout — - Outgoing zone transfer service. - This process is used to handle transfer requests to - send a local zone to a remote secondary server. - - - - - - b10-zonemgr — - Secondary zone manager. - This process keeps track of timers and other - necessary information for BIND 10 to act as a slave server. - - - @@ -327,15 +256,7 @@ Interactive administration interface. This is a low-level command-line tool which allows a developer or an experienced administrator to control - BIND 10. - - - - - b10-loadzone — - Zone file loader. - This tool will load standard masterfile-format zone files into - BIND 10. + Kea. @@ -343,7 +264,7 @@ b10-cmdctl-usermgr — User access control. This tool allows an administrator to authorize additional users - to manage BIND 10. + to manage Kea. @@ -381,10 +302,9 @@ var/ BIND 10 also provides libraries and programmer interfaces - for C++ and Python for the message bus, configuration backend, - and, of course, DNS. These include detailed developer + for C++ and Python for the message bus and configuration backend, + and, of course, DHCP. These include detailed developer documentation and code examples. - @@ -395,13 +315,13 @@ var/ This quickly covers the standard steps for installing - and deploying BIND 10. + and deploying Kea. For further details, full customizations, and troubleshooting, - see the respective chapters in the BIND 10 guide. + see the respective chapters in the Kea guide. -
- Quick start guide for authoritative DNS service +
+ Quick start guide for DHCPv6 service @@ -411,22 +331,18 @@ var/ + - Download the BIND 10 source tar file from - . + Checkout the latest Kea revision from the Git repository: + $ git clone git://git.kea.isc.org/kea - - Extract the tar file: - $ gzcat bind10-VERSION.tar.gz | tar -xvf - - - - Go into the source and run configure: - $ cd bind10-VERSION + $ cd kea $ ./configure @@ -465,16 +381,16 @@ $ ./configure - DNS and DHCP components are not started in the default - configuration. In another console, enable the authoritative - DNS service (by using the bindctl utility - to configure the b10-auth component to + DHCP components are not started in the default + configuration. In another console, enable the DHCPv6 + service (by using the bindctl utility + to configure the b10-dhcp6 component to run): $ bin/bindctl (Login with the username and password you used above to create a user.) -> config add Init/components b10-auth -> config set Init/components/b10-auth/special auth -> config set Init/components/b10-auth/kind needed +> config add Init/components b10-dhcp6 + +> config set Init/components/b10-dhcp6/kind dispensable > config commit > quit @@ -482,25 +398,13 @@ $ ./configure - Test it; for example: - $ dig @127.0.0.1 -c CH -t TXT version.bind + Test it; for example, use the + ISC DHCP client + to send DHCPv6 queries to the server and verify that the client receives a + configuration from the server: + $ dhclient -6 - - - Load desired zone file(s), for example: - $ bin/b10-loadzone -c '{"database_file": "/usr/local/var/bind10/zone.sqlite3"}' your.zone.example.org your.zone.file - - (If you use the sqlite3 data source with the default DB - file, you can omit the -c option). - - - - - Test the new zone. - - -
@@ -516,7 +420,7 @@ $ ./configure Some operating systems or software package vendors may provide ready-to-use, pre-built software packages for - the BIND 10 suite. + the Kea. Installing a pre-built package means you do not need to install build-only prerequisites and do not need to make the software. @@ -533,7 +437,7 @@ $ ./configure Install Hierarchy The following is the standard, common layout of the - complete BIND 10 installation: + complete Kea installation: @@ -558,7 +462,7 @@ $ ./configure libexec/bind10/ — executables that a user wouldn't normally run directly and are not run independently. - These are the BIND 10 modules which are daemons started by + These are the BIND 10 and Kea modules which are daemons started by the b10-init master process. @@ -601,7 +505,7 @@ $ ./configure In addition to the run-time requirements (listed in - ), building BIND 10 + ), building Kea from source code requires various development include headers and program development tools. @@ -611,7 +515,7 @@ $ ./configure Some operating systems have split their distribution packages into a run-time and a development package. You will need to install the development package versions, which include header files and - libraries, to build BIND 10 from source code. + libraries, to build Kea from source code. @@ -625,7 +529,7 @@ $ ./configure - To build BIND 10, also install the Botan (at least version + To build Kea, also install the Botan (at least version 1.8) and the log4cplus (at least version 1.0.3) development include headers. @@ -640,15 +544,15 @@ Debian and Ubuntu: as a dependency earlier --> - Building BIND 10 also requires a C++ compiler and + Building Kea also requires a C++ compiler and standard development headers, make, and pkg-config. - BIND 10 builds have been tested with GCC g++ 3.4.3, 4.1.2, + Kea builds have been tested with GCC 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++ 5.10. Visit the user-contributed wiki at + url="http://kea.isc.org/wiki/SystemSpecificNotes" /> for system-specific installation tips. @@ -657,26 +561,21 @@ as a dependency earlier -->
Installation from source - BIND 10 is open source software written in C++ and Python. + Kea is open source software written in C++ and Python. It is freely available in source code form from ISC as a - downloadable tar file or via BIND 10's Git code revision control + downloadable tar file or via Kea Git code revision control service. (It may also be available in pre-compiled ready-to-use packages from operating system vendors.)
- Download Tar File - - Downloading a release tar file is the recommended method to - obtain the source code. - + Download Tar File - The BIND 10 releases are available as tar file downloads from - . - Periodic development snapshots may also be available. + Kea 0.8 is available as a part of BIND10 1.2 release, which is + a final release of BIND10 from ISC. This release can be downloaded + from: . -
@@ -698,18 +597,18 @@ as a dependency earlier --> The latest development code (and temporary experiments - and un-reviewed code) is available via the BIND 10 code revision - control system. This is powered by Git and all the BIND 10 + and un-reviewed code) is available via the Kea code revision + control system. This is powered by Git and all the Kea development is public. The leading development is done in the master branch. The code can be checked out from - git://git.bind10.isc.org/bind10; + git://git.kea.isc.org/kea; for example: - $ git clone git://git.bind10.isc.org/bind10 + $ git clone git://git.kea.isc.org/kea @@ -733,7 +632,7 @@ as a dependency earlier -->
Configure before the build - BIND 10 uses the GNU Build System to discover build environment + Kea uses the GNU Build System to discover build environment details. To generate the makefiles using the defaults, simply run: $ ./configure @@ -794,7 +693,7 @@ as a dependency earlier --> For additional instructions concerning the building and installation of - BIND 10 DHCP, see . + Kea, see . @@ -832,7 +731,7 @@ as a dependency earlier -->
Install - To install the BIND 10 executables, support files, + To install the Kea executables, support files, and documentation, run: $ make install @@ -879,14 +778,14 @@ as a dependency earlier --> - Starting BIND 10 with <command>bind10</command> + Starting Kea with <command>bind10</command> - BIND 10 is started with the bind10 command. + Kea is started with the bind10 command. It runs the b10-init daemon which starts up the required processes, and will also restart some processes that exit unexpectedly. bind10 is the only command needed to start - the BIND 10 system. + the Kea. @@ -905,8 +804,8 @@ as a dependency earlier --> module, if only to send information about themselves somewhere, but more importantly to ask about their own settings, and about other modules. The b10-sockcreator daemon - helps allocate Internet addresses and ports as needed for BIND 10 - network services. + can allocate Internet addresses and ports needed by network services + but is currently unused by DHCP servers. @@ -915,13 +814,13 @@ as a dependency earlier --> b10-cmdctl for administration tools to communicate with the system, and b10-stats for statistics collection. - The DNS and DHCP servers are not started by default. + The DHCP servers are not started by default. The configuration of components to start is covered in - . + .
- Starting BIND 10 + Starting Kea To start the BIND 10 service, simply run bind10 as root. @@ -954,7 +853,7 @@ as a dependency earlier --> The BIND 10 components use the b10-msgq - message routing daemon to communicate with other BIND 10 components. + message routing daemon to communicate with Kea components. The b10-msgq implements what is called the Command Channel. Processes intercommunicate by sending messages on the command @@ -980,14 +879,14 @@ as a dependency earlier --> The configuration manager, b10-cfgmgr, - handles all BIND 10 system configuration. It provides + handles all system configuration. It provides persistent storage for configuration, and notifies running modules of configuration changes. - The b10-auth and b10-xfrin - daemons and other components receive their configurations + The b10-dhcp6, b10-dhcp4 and + b10-dhcp-ddns daemons receive their configurations from the configuration manager over the b10-msgq command channel. @@ -1001,11 +900,10 @@ as a dependency earlier --> - The current release only provides - bindctl as a user interface to - b10-cmdctl. - Upcoming releases will provide another interactive command-line - interface and a web-based interface. + In the future releases of Kea, the architecture which origins in + BIND 10 project will be replaced by the new mechanisms to start + and configure Kea. The new mechanisms will use a file based + configuration. @@ -1143,7 +1041,7 @@ but you might wanna check with likun public service. If any client wants to control BIND 10, then a certificate needs to be first received from the BIND 10 administrator. - The BIND 10 installation provides a sample PEM bundle that matches + The Kea installation provides a sample PEM bundle that matches the sample key and certificate. @@ -1218,14 +1116,6 @@ TODO Control and configure user interface - - For the current release, bindctl - is the only user interface. It is expected that upcoming - releases will provide another interactive command-line - interface and a web-based interface for controlling and - configuring BIND 10. - - bindctl has an internal command history, as well as tab-completion for most of the commands and arguments. @@ -1236,7 +1126,7 @@ TODO The bindctl tool provides an interactive - prompt for configuring, controlling, and querying the BIND 10 + prompt for configuring, controlling, and querying the Kea components. It communicates directly with a REST-ful interface over HTTPS provided by b10-cmdctl. It doesn't @@ -1326,7 +1216,7 @@ TODO BIND 10, with an optional argument 'help': > Init shutdown help -Command shutdown (Shut down BIND 10) +Command shutdown (Shut down BIND 10 and Kea) help (Get help for command) This command has no parameters @@ -1352,19 +1242,19 @@ Available module names: Module Init Master process Available commands: help Get help for module. - shutdown Shut down BIND 10 + shutdown Shut down BIND10 and Kea ping Ping the Init process show_processes - List the running BIND 10 processes + List the running BIND10 and Kea processes And when added to a module command, it shows the description and parameters of that specific command; for example: - > Auth loadzone help -Command loadzone ((Re)load a specified zone) + > DhcpDdns shutdown help +Command shutdown (Shuts down b10-dhcp-ddns module server.) help (Get help for command) Parameters: - class (string, optional) - origin (string, mandatory) + type (string, optional) + values: normal (default), now, or drain_first
@@ -1384,30 +1274,24 @@ Parameters: positional arguments are used. - For example, the loadzone command of the Auth + For example, the shutdown command of the DhcpDdns module, as shown in the last example of the previous section, has - two arguments, one of which is optional. The positional arguments in - this case are class first and origin second; for example: - > Auth loadzone IN example.com. - But since the class is optional (defaulting to IN), leaving it out + one optional argument which is appended right after the command: + > DhcpDdns shutdown now + But since the class is optional (defaulting to normal), leaving it out works as well: - > Auth loadzone example.com. + > DhcpDdns shutdown - The arguments can also be provided with their names, in which - case the order does not matter: - > Auth loadzone origin="example.com." class="IN" + The arguments can also be provided with their names: + > DhcpDdns shutdown type="now"
Module commands Each module has its own set of commands (if any), which will only be - available if the module is running. For instance, the - Auth module has a loadzone command. - The commands a module provides are documented in - this guide in the section of that module or in the module's - corresponding manual page. + available if the module is running.
@@ -1613,12 +1497,7 @@ Parameters: modified directly, but their elements are. Every top-level element for a module is a map containing the configuration values for that map, which can - themselves be maps again. For instance, the Auth - module configuration is a map containing the - elements 'listen_on' (list) and 'tcp_recv_timeout' - (integer). When changing one of its values, they can - be modified directly with config set - Auth/tcp_recv_timeout 3000. + themselves be maps again. Some map entries are optional. If they are, and @@ -1679,8 +1558,8 @@ Parameters: entire list value in JSON format. - For example, this command shows the port number used for the second element of the list listen_on in the Auth module: - config show Auth/listen_on[1]/port + For example, this command shows the renew-timer used for the second element of the list subnet4 in the Dhcp4 module: + config show Dhcp4/subnet4[1]/renew-timer @@ -1750,45 +1629,12 @@ Parameters: The execute command The execute command executes a set of commands, either from a file - or from a pre-defined set. Currently, the only predefined set is - init_authoritative_server, which adds - b10-auth, b10-xfrin, and - b10-xfrout to the set of components to be - started by BIND 10. This - pre-defined set does not commit the changes, so these modules do not - show up for commands or configuration until the user enters - config commit after - execute init_authoritative_server. For example: - - > execute init_authoritative_server + or from a pre-defined set. Currently, there are no pre-defined sets + available. > execute file /tmp/example_commands - The optional argument show displays the exact set of - commands that would be executed; for example: - - > execute init_authoritative_server show -!echo adding Authoritative server component -config add /Init/components b10-auth -config set /Init/components/b10-auth/kind needed -config set /Init/components/b10-auth/special auth -!echo adding Xfrin component -config add /Init/components b10-xfrin -config set /Init/components/b10-xfrin/address Xfrin -config set /Init/components/b10-xfrin/kind dispensable -!echo adding Xfrout component -config add /Init/components b10-xfrout -config set /Init/components/b10-xfrout/address Xfrout -config set /Init/components/b10-xfrout/kind dispensable -!echo adding Zone Manager component -config add /Init/components b10-zonemgr -config set /Init/components/b10-zonemgr/address Zonemgr -config set /Init/components/b10-zonemgr/kind dispensable -!echo Components added. Please enter "config commit" to -!echo finalize initial setup and run the components. - - - The optional show argument may also be used when + The optional show argument may be used when executing a script from a file; for example: > execute file /tmp/example_commands show @@ -1824,1705 +1670,155 @@ config set /Init/components/b10-zonemgr/kind dispensable be executed are no longer printed. - - -
- -
- Notes on execute scripts - Within scripts, you can add or remove modules with the normal - configuration commands for Init/components. - However, as module - configuration and commands do not show up until the module is - running, it is currently not possible to add a module and set - its configuration in one script. This will be addressed in the - future, but for now the only option is to add and configure - modules in separate commands and execute scripts. -
-
- - - - Common configuration elements - - - Some things are configured in the same or similar manner across - many modules. So we show them here in one place. - - -
- TSIG keys - - - TSIG is a way to sign requests and responses in DNS. It is defined in - RFC 2845 and uses symmetric cryptography to sign the DNS messages. If - you want to make any use of TSIG (to authenticate transfers or DDNS, - for example), you need to set up shared secrets between the endpoints. - - - - BIND 10 uses a global key ring for the secrets. It doesn't currently - mean they would be stored differently, they are just in one place of - the configuration. - - -
- Key anatomy and syntax - - - Each key has three attributes. One is a name by which it is referred - both in DNS packets and the rest of the configuration. Another is the - algorithm used to compute the signature. And the last part is a - base64 encoded secret, which might be any blob of data. - - - - The parts are written into a string, concatenated together by colons. - So if you wanted to have a key called "example.key", used as a - HMAC-MD5 key with secret "secret", you'd write it as: -"example.key.:c2VjcmV0:hmac-md5" - - - - The HMAC-MD5 algorithm is the default, so you can omit it. You could - write the same key as: -"example.key.:c2VjcmV0" - - - - You can also use these algorithms (which may not be omitted from the - key definition if used): - - hmac-sha1 - hmac-sha224 - hmac-sha256 - hmac-sha384 - hmac-sha512 - - - - - The name of the key must be a valid DNS name. - -
- -
- Key ring - - The key ring lives in the configuration in "tsig_keys/keys". Most of - the system uses the keys from there — ACLs, authoritative server to - sign responses to signed queries, and b10-xfrin - and b10-xfrout to sign transfers. - - - - The key ring is just a list of strings, each describing one key. So, - to add a new key, you can do this: - > config add tsig_keys/keys "example.key.:c2VjcmV0" -> config show tsig_keys/keys -tsig_keys/keys[0] "example.key.:c2VjcmV0" string (modified) -> config commit - - - - You can keep as many keys as you want in the key ring, but each must - have a different name. - -
-
- -
- ACLs - - - An ACL, or Access Control List, is a way to describe if a request - is allowed or disallowed. The principle is, there's a list of rules. - Each rule is a name-value mapping (a dictionary, in the JSON - terminology). Each rule must contain exactly one mapping called - "action", which describes what should happen if the rule applies. - There may be more mappings, called matches, which describe the - conditions under which the rule applies. - - - - When there's a query, the first rule is examined. If it matches, the - action in it is taken. If not, next rule is examined. If there are no - more rules to examine, a default action is taken. - - - - There are three possible "action" values. The "ACCEPT" value means - the query is handled. If it is "REJECT", the query is not answered, - but a polite error message is sent back (if that makes sense in the - context). The "DROP" action acts like a black hole. The query is - not answered and no error message is sent. - - - - If there are multiple matching conditions inside the rule, all of - them must be satisfied for the rule to apply. This can be used, - for example, to require the query to be signed by a TSIG key and - originate from given address. - - - - This is encoded in form of JSON. Semi-formal description could look - something like this. It is described in more details below. - - ACL := [ RULE, RULE, ... ] -RULE := { "action": "ACCEPT"|"REJECT"|"DROP", MATCH, MATCH, ... } -RULE_RAW := { MATCH, MATCH, ... } -MATCH := FROM_MATCH|KEY_MATCH|NOT_MATCH|OR_MATCH|AND_MATCH|... -FROM_MATCH := "from": [RANGE, RANGE, RANGE, ...] | RANGE -RANGE := "<ip range>" -KEY_MATCH := "key": [KEY, KEY, KEY, ...] | KEY -KEY := "<key name>" -NOT_MATCH := "NOT": RULE_RAW -OR_MATCH := "ANY": [ RULE_RAW, RULE_RAW, ... ] -AND_MATCH := "ALL": [ RULE_RAW, RULE_RAW, ... ] - - - -
- Matching properties - - - The first thing you can check against is the source address - of request. The name is from and the value - is a string containing either a single IPv4 or IPv6 address, - or a range in the usual slash notation (eg. "192.0.2.0/24"). - - - - The other is TSIG key by which the message was signed. The ACL - contains only the name (under the name "key"), the key itself - must be stored in the global key ring (see ). - This property is applicable only to the DNS context. - - - - More properties to match are planned — the destination - address, ports, matches against the packet content. - -
- -
- More complicated matches - - - From time to time, you need to express something more complex - than just a single address or key. - - - - You can specify a list of values instead of single value. Then - the property needs to match at least one of the values listed - — so you can say "from": ["192.0.2.0/24", - "2001:db8::/32"] to match any address in the ranges - set aside for documentation. The keys or any future properties - will work in a similar way. - - - - If that is not enough, you can compose the matching conditions - to logical expressions. They are called "ANY", "ALL" and "NOT". - The "ANY" and "ALL" ones contain lists of subexpressions — - each subexpression is a similar dictionary, just not containing - the "action" element. The "NOT" contains single subexpression. - Their function should be obvious — "NOT" matches if and - only if the subexpression does not match. The "ALL" matches exactly - when each of the subexpressions matches and "ANY" when at least - one matches. - -
- -
- Examples - - - All the examples here is just the JSON representing the ACL, - nicely formatted and split across lines. They are out of any - surrounding context. This is similar to what you'd get from - config show_json called on the entry containing - the ACL. - - - - In the first example, the ACL accepts queries from two known hosts. - Each host has an IP addresses (both IPv4 and IPv6) and a TSIG - key. Other queries are politely rejected. The last entry in the list - has no conditions — making it match any query. - - [ - { - "from": ["192.0.2.1", "2001:db8::1"], - "key": "first.key", - "action": "ACCEPT" - }, - { - "from": ["192.0.2.2", "2001:db8::2"], - "key": "second.key", - "action": "ACCEPT" - }, - { - "action": "REJECT" - } -] - - - - Now we show two ways to accept only the queries from private ranges. - This is the same as rejecting anything that is outside. - - [ - { - "from": [ - "10.0.0.0/8", - "172.16.0.0/12", - "192.168.0.0/16", - "fc00::/7" - ], - "action": "ACCEPT" - }, - { - "action": "REJECT" - } -] - - [ - { - "NOT": { - "ANY": [ - {"from": "10.0.0.0/8"}, - {"from": "172.16.0.0/12"}, - {"from": "192.168.0.0/16"}, - {"from": "fc00::/7"} - ] - }, - "action": "REJECT" - }, - { - "action": "ACCEPT" - } -] - -
- -
- Interaction with <command>bindctl</command> - - - Currently, bindctl has hard time coping with - the variable nature of the ACL syntax. This technical limitation - makes it impossible to edit parts of the entries. You need to - set the whole entry at once, providing the whole JSON value. - - - - This limitation is planned to be solved soon at least partially. - - - - You'd do something like this to create the second example. - Note that the whole JSON must be on a single line. - - > config add somewhere/acl -> config set somewhere/acl[0] { "from": [ "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fc00::/7" ], "action": "ACCEPT" } -> config add somewhere/acl -> config set somewhere/acl[1] { "action": "REJECT" } -> config commit - -
-
-
- - - bind10 Control and Configuration - - - This chapter explains how to control and configure the - b10-init parent. - The startup of this resident process that runs the BIND 10 - daemons is covered in . - - -
- Stopping bind10 - - The BIND 10 suite may be shut down by stopping the - parent b10-init process. This may be done - by running the Init shutdown command - at the bindctl prompt. - -
- -
- Configuration to start processes - - - The processes to be used can be configured for - b10-init to start, with the exception - of the required b10-sockcreator, - b10-msgq and b10-cfgmgr - components. - The configuration is in the Init/components - section. Each element represents one component, which is - an abstraction of a process. - - - - To add a process to the set, let's say the resolver (which - is not started by default), you would do this: - > config add Init/components b10-resolver -> config set Init/components/b10-resolver/special resolver -> config set Init/components/b10-resolver/kind needed -> config set Init/components/b10-resolver/priority 10 -> config commit - - - Now, what it means. We add an entry called - b10-resolver. It is both a name used to - reference this component in the configuration and the name - of the process to start. Then we set some parameters on - how to start it. - - - - The special setting is for components - that need some kind of special care during startup or - shutdown. Unless specified, the component is started in a - usual way. This is the list of components that need to be - started in a special way, with the value of special used - for them: - - - Special startup components - - - - - ComponentSpecialDescription - - b10-authauthAuthoritative DNS server - b10-resolverresolverDNS resolver - b10-cmdctlcmdctlCommand control (remote control interface) - - - -
-
- - - The kind specifies how a failure of the - component should be handled. If it is set to - dispensable (the default unless you set - something else), it will get started again if it fails. If - it is set to needed and it fails at startup, - the whole b10-init shuts down and exits - with an error exit code. But if it fails some time later, it - is just started again. If you set it to core, - you indicate that the system is not usable without the - component and if such component fails, the system shuts - down no matter when the failure happened. This is the - behavior of the core components (the ones you can't turn - off), but you can declare any other components as core as - well if you wish (but you can turn these off, they just - can't fail). - - - - The priority defines order in which the - components should start. The ones with higher numbers are - started sooner than the ones with lower ones. If you don't - set it, 0 (zero) is used as the priority. Usually, leaving - it at the default is enough. - - - - There are other parameters we didn't use in our example. - One of them is address. It is the address - used by the component on the b10-msgq - message bus. The special components already know their - address, but the usual ones don't. The address is by - convention the thing after b10-, with - the first letter capitalized (eg. b10-stats - would have Stats as its address). - - - - - - - - - The last one is process. It is the name - of the process to be started. It defaults to the name of - the component if not set, but you can use this to override - it. (The special components also already know their - executable name.) - - - - - - - The configuration is quite powerful, but that includes - a lot of space for mistakes. You could turn off the - b10-cmdctl, but then you couldn't - change it back the usual way, as it would require it to - be running (you would have to find and edit the configuration - directly). Also, some modules might have dependencies: - b10-stats-httpd needs - b10-stats, b10-xfrout - needs b10-auth to be running, etc. - - - - - - In short, you should think twice before disabling something here. - - - - It is possible to start some components multiple times (currently - b10-auth and b10-resolver). - You might want to do that to gain more performance (each one uses only - single core). Just put multiple entries under different names, like - this, with the same config: - > config add Init/components b10-resolver-2 -> config set Init/components/b10-resolver-2/special resolver -> config set Init/components/b10-resolver-2/kind needed -> config commit - - - However, this is work in progress and the support is not yet complete. - For example, each resolver will have its own cache, each authoritative - server will keep its own copy of in-memory data and there could be - problems with locking the sqlite database, if used. The configuration - might be changed to something more convenient in future. - Other components don't expect such a situation, so it would - probably not do what you want. Such support is yet to be - implemented. - - - - The running processes started by b10-init - may be listed by running Init show_processes - using bindctl. - - -
-
- - - Authoritative Server - - - The b10-auth is the authoritative DNS server. - It supports EDNS0, DNSSEC, IPv6, and SQLite3 and in-memory zone - data backends. - Normally it is started by the b10-init master - process. - - -
- Server Configurations - - - - - b10-auth is configured via the - b10-cfgmgr configuration manager. - The module name is Auth. - The configuration data items are: - - - - - database_file - - This is an optional string to define the path to find - the SQLite3 database file. - -Note: This may be a temporary setting because the DNS server -can use various data source backends. - - - - - - - datasources - - - datasources configures data sources. - The list items include: - type to define the required data source type - (such as memory); - class to optionally select the class - (it defaults to IN); - and - zones to define - the file path name, - the filetype (sqlite3 to load - from a SQLite3 database file or text to - load from a master text file), - and the origin (default domain). - - By default, this is empty. - - - Currently this is only used for the memory data source. - Only the IN class is supported at this time. - By default, the memory data source is disabled. - Also, currently the zone file must be canonical such as - generated by named-compilezone -D, or - must be an SQLite3 database. - - - - - - - - listen_on - - - listen_on is a list of addresses and ports for - b10-auth to listen on. - The list items are the address string - and port number. - By default, b10-auth listens on port 53 - on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses. - - - The default configuration is currently not appropriate for a multi-homed host. - In case you have multiple public IP addresses, it is possible the - query UDP packet comes through one interface and the answer goes out - through another. The answer will probably be dropped by the client, as it - has a different source address than the one it sent the query to. The - client would fallback on TCP after several attempts, which works - well in this situation, but is clearly not ideal. - - - There are plans to solve the problem such that the server handles - it by itself. But until it is actually implemented, it is recommended to - alter the configuration — remove the wildcard addresses and list all - addresses explicitly. Then the server will answer on the same - interface the request came on, preserving the correct address. - - - - - - - tcp_recv_timeout - - - tcp_recv_timeout is the timeout used on - incoming TCP connections, in milliseconds. If the query - is not sent within this time, the connection is closed. - Setting this to 0 will disable TCP timeouts completely. - - - - - - - - - - The configuration commands are: - - - - - loadzone - - - loadzone tells b10-auth - to load or reload a zone file. The arguments include: - class which optionally defines the class - (it defaults to IN); - origin is the domain name of the zone; - and - datasrc optionally defines the type of datasource - (it defaults to memory). - - - Currently this only supports the - IN class and the memory data source. - - - - - - - getstats - - - getstats requests b10-auth - to send its statistics data to - b10-stats - 8 - as a response of the command. - - - - - - shutdown - - Stop the authoritative DNS server. - This has an optional pid argument to - select the process ID to stop. - (Note that the BIND 10 init process may restart this service - if configured.) - - - - - - - - - - -
- -
- Data Source Backends - - - Bind 10 has the concept of data sources. A data source is a place - where authoritative zone data reside and where they can be served - from. This can be a master file, a database or something completely - different. - - - - Once a query arrives, b10-auth goes through a - configured list of data sources and finds the one containing a best - matching zone. From the equally good ones, the first one is taken. - This data source is then used to answer the query. - - - - In the current release, b10-auth - can serve data from a SQLite3 data source backend and from master - files. - Upcoming versions will be able to use multiple different - data sources, such as MySQL and Berkeley DB. - - - - The configuration is located in data_sources/classes. Each item there - represents one RR class and a list used to answer queries for that - class. The default contains two classes. The CH class contains a - built-in data source — one that serves things like - AUTHORS.BIND.. The IN class contains single SQLite3 - data source with database file located at - /usr/local/var/bind10/zone.sqlite3. - - - - Each data source has several options. The first one is - type, which specifies the type of data source to - use. Valid types include the ones listed below, but BIND 10 uses - dynamically loaded modules for them, so there may be more in your - case. This option is mandatory. - - - - Another option is params. This option is type - specific; it holds different data depending on the type - above. Also, depending on the type, it could be possible to omit it. - - - - There are two options related to the so-called cache. If you enable - cache, zone data from the data source are loaded into memory. - Then, when answering a query, b10-auth looks - into the memory only instead of the data source, which speeds - answering up. The first option is cache-enable, - a boolean value turning the cache on and off (off is the default). - The second one, cache-zones, is a list of zone - origins to load into in-memory. - - - - -
- Data source types - - As mentioned, the type used by default is sqlite3. - It has single configuration option inside params - — database_file, which contains the path - to the SQLite3 file containing the data. - - - - Another type is called MasterFiles. This one is - slightly special. The data are stored in RFC1034 master files. - Because answering directly from them would be impractical, - this type mandates the cache to be enabled. Also, the list of - zones (cache-zones) should be omitted. The - params is a dictionary mapping from zone - origins to the files they reside in. - -
- -
- Examples - - As this is one of the more complex configurations of BIND 10, - we show some examples. They all assume they start with default - configuration. - - - - First, let's disable the built-in data source - (VERSION.BIND and friends). As it is the only - data source in the CH class, we can remove the whole class. - - > config remove data_sources/classes CH -> config commit - - - - Another one, let's say our default data source contains zones - example.org. and example.net.. - We want them to be served from memory to make the answering - faster. - - > config set data_sources/classes/IN[0]/cache-enable true -> config add data_sources/classes/IN[0]/cache-zones example.org. -> config add data_sources/classes/IN[0]/cache-zones example.net. -> config commit - - Now every time the zone in the data source is changed by the - operator, the authoritative server needs to be told to reload it, by - > Auth loadzone example.org - You don't need to do this when the zone is modified by - b10-xfrin; it does so automatically. - - - - Now, the last example is when there are master files we want to - serve in addition to whatever is inside the SQLite3 database. - - > config add data_sources/classes/IN -> config set data_sources/classes/IN[1]/type MasterFiles -> config set data_sources/classes/IN[1]/cache-enable true -> config set data_sources/classes/IN[1]/params { "example.org": "/path/to/example.org", "example.com": "/path/to/example.com" } -> config commit - - Unfortunately, due to current technical limitations, the - params must be set as one JSON blob. To reload a zone, use the - same Auth loadzone command as above. - - - - Initially, a map value has to be set, but this value may be an - empty map. After that, key/value pairs can be added with - config add and keys can be removed with - config remove. The initial value may be an - empty map, but it has to be set before zones are added or - removed. - - -> config set data_sources/classes/IN[1]/params {} -> config add data_sources/classes/IN[1]/params another.example.org /path/to/another.example.org -> config add data_sources/classes/IN[1]/params another.example.com /path/to/another.example.com -> config remove data_sources/classes/IN[1]/params another.example.org -> config commit - - -
- - - - There's also Auth/database_file configuration - variable, pointing to a SQLite3 database file. This is no longer - used by b10-auth, but it is left in place for - now, since other modules use it. Once b10-zonemgr, - b10-xfrout and b10-ddns - are ported to the new configuration, this will disappear. But for - now, make sure that if you use any of these modules, the new - and old configuration correspond. The defaults are consistent, so - unless you tweaked either the new or the old configuration, you're - good. - - - -
- Adding a static data source - - - BIND 10 includes a zone file named - static.zone in the CH (Chaos) class for - providing information about the server via the AUTHORS.BIND - and VERSION.BIND TXT records. By default, this BIND zone is - configured and its records are served. - - - - If you have removed this zone from the configuration (e.g., by - using the commands in the previous section to disable the - "built-in data source"), here is how you can add it back to - serve the zones in the static.zone file. - - - First, add the CH class if it doesn't exist: - - > config add data_sources/classes CH -> config commit - - Then, add a data source of type MasterFiles - in the CH class to serve the zones in - static.zone: - - > config add data_sources/classes/CH -> config set data_sources/classes/CH[0]/type MasterFiles -> config set data_sources/classes/CH[0]/cache-enable true -> config set data_sources/classes/CH[0]/params {"BIND": "/usr/local/bind10/share/bind10/static.zone"} -> config commit - - Then, lookup the static data from - static.zone to test it (assuming your - authoritative server is running on localhost): - - > dig @localhost -c CH -t TXT version.bind -> dig @localhost -c CH -t TXT authors.bind - - - -
- -
- -
- Loading Master Zones Files - - - RFC 1035 style DNS master zone files may imported - into a BIND 10 SQLite3 data source by using the - b10-loadzone utility. - - - - b10-loadzone supports the following - special directives (control entries): - - - - - $INCLUDE - - Loads an additional zone file. This may be recursive. - - - - - - $ORIGIN - - Defines the relative domain name. - - - - - - $TTL - - Defines the time-to-live value used for following - records that don't include a TTL. - - - - - - - - - - - In the current release, only the SQLite3 back - end is used by b10-loadzone. - Multiple zones are stored in a single SQLite3 zone database. - - - - - If you reload a zone already existing in the database, - all records from that prior zone disappear and a whole new set - appears. - - - - -
- - - -
- - - Incoming Zone Transfers - - - Incoming zones are transferred using the b10-xfrin - process which is started by b10-init. - When received, the zone is stored in the corresponding BIND 10 - data source, and its records can be served by - b10-auth. - In combination with b10-zonemgr (for - automated SOA checks), this allows the BIND 10 server to - provide secondary service. - - - - The b10-xfrin process supports both AXFR and - IXFR. - - -
- Configuration for Incoming Zone Transfers - - In order to enable incoming zone transfers for a secondary - zone, you will first need to make the zone "exist" in some - data source. - One easy way to do this is to create an empty zone using the - b10-loadzone utility. - For example, this makes an empty zone (or empties any existing - content of the zone) "example.com" in the default data source - for b10-loadzone (which is SQLite3-based - data source): - $ b10-loadzone -e example.com - - - - Next, you need to specify a list of secondary zones to - enable incoming zone transfers for these zones in most - practical cases (you can still trigger a zone transfer - manually, without a prior configuration (see below)). - - - - For example, to enable zone transfers for a zone named "example.com" - (whose master address is assumed to be 2001:db8::53 here), - run the following at the bindctl prompt: - - > config add Xfrin/zones -> config set Xfrin/zones[0]/name "" -> config set Xfrin/zones[0]/master_addr "" -> config commit - - (We assume there has been no zone configuration before). - - - - - There is a plan to revise overall zone management - configuration (which are primary and secondary zones, which - data source they are stored, etc) so it can be configured - more consistently and in a unified way among various BIND 10 modules. - When it's done, part or all of the initial configuration - setup described in this section may be deprecated. - - -
- -
- TSIG - If you want to use TSIG for incoming transfers, a system wide TSIG - key ring must be configured (see ). - To specify a key to use, set tsig_key value to the name of the key - to use from the key ring. -> config set Xfrin/zones[0]/tsig_key "" -
- -
- Control the use of IXFR - - By default, b10-xfrin uses IXFR for - transferring zones specified in - the Xfrin/zones list of the configuration, - unless it doesn't know the current SOA serial of the zone - (including the case where the zone has never transferred or - locally loaded), in which case it automatically uses AXFR. - If the attempt of IXFR fails, b10-xfrin - automatically retries the transfer using AXFR. - In general, this works for any master server implementations - including those that don't support IXFR and in any local state - of the zone. So there should normally be no need to configure - on whether to use IXFR. - - - - In some cases, however, it may be desirable to specify how and - whether to use IXFR and AXFR. - The request_ixfr configuration item under - Xfrin/zones can be used to control such - policies. - It can take the following values. - - - - yes - - - This is the default behavior as described above. - - - - - no - - - Only use AXFR. Note that this value normally shouldn't - be needed thanks to the automatic fallback from IXFR to IXFR. - A possible case where this value needs to be used is - that the master server has a bug and crashes if it - receives an IXFR request. - - - - - only - - - Only use IXFR except when the current SOA serial is not - known. - This value has a severe drawback, that is, if the master - server does not support IXFR zone transfers never - succeed (except for the very first one, which will use AXFR), - and the zone will eventually expire. - Therefore it should not be used in general. - Still, in some special cases the use of this value may - make sense. For example, if the operator is sure that - the master server supports IXFR and the zone is very - large, they may want to avoid falling back to AXFR as - it can be more expensive. - - - - - - - - There used to be a boolean configuration item named - use_ixfr. - It was deprecated for the finer control described above. - The request_ixfr item should be used instead. - - - -
- - - -
- Secondary Manager - - - The b10-zonemgr process is started by - b10-init. - It keeps track of SOA refresh, retry, and expire timers - and other details for BIND 10 to perform as a slave. - When the b10-auth authoritative DNS server - receives a NOTIFY message, b10-zonemgr - may tell b10-xfrin to do a refresh - to start an inbound zone transfer. - The secondary manager resets its counters when a new zone is - transferred in. - - - - Access control (such as allowing notifies) is not yet provided. - The primary/secondary service is not yet complete. - - - - The following example shows using bindctl - to configure the server to be a secondary for the example zone: - - > config add Zonemgr/secondary_zones -> config set Zonemgr/secondary_zones[0]/name "" -> config commit - - - - - If the zone does not exist in the data source already - (i.e. no SOA record for it), b10-zonemgr - will automatically tell b10-xfrin - to transfer the zone in. - - -
- -
- Trigger an Incoming Zone Transfer Manually - - - To manually trigger a zone transfer to retrieve a remote zone, - you may use the bindctl utility. - For example, at the bindctl prompt run: - - > Xfrin retransfer zone_name="" master= - - - - The retransfer command always uses AXFR. - To use IXFR for a zone that has already been transferred once, - use the refresh command. - It honors the Xfrin/zones/request_ixfr - configuration item (see .), and - if it's configured to use IXFR, it will be used. - - - - Both the retransfer - and refresh commands can be used for - an initial transfer before setting up secondary - configurations. - In this case AXFR will be used for the obvious reason. - -
- -
- Incoming Transfers with In-memory Datasource - - - In the case of an incoming zone transfer, the received zone is - first stored in the corresponding BIND 10 datasource. In - case the secondary zone is served by an in-memory datasource - with an SQLite3 backend, b10-auth is - automatically sent a loadzone command to - reload the corresponding zone into memory from the backend. - - + + +
- - The administrator doesn't have to do anything for - b10-auth to serve the new version of the - zone, except for the configuration such as the one described in - . - +
+ Notes on execute scripts + Within scripts, you can add or remove modules with the normal + configuration commands for Init/components. + However, as module + configuration and commands do not show up until the module is + running, it is currently not possible to add a module and set + its configuration in one script. This will be addressed in the + future, but for now the only option is to add and configure + modules in separate commands and execute scripts. +
- - - - - - - Outbound Zone Transfers - - The b10-xfrout process is started by - b10-init. - When the b10-auth authoritative DNS server - receives an AXFR or IXFR request, b10-auth - internally forwards the request to b10-xfrout, - which handles the rest of this request processing. - This is used to provide primary DNS service to share zones - to secondary name servers. - The b10-xfrout is also used to send - NOTIFY messages to secondary servers. - - - - A global or per zone configuration - can be used to control accessibility of the outbound zone - transfer service. - By default, b10-xfrout allows any clients to - perform zone transfers for any zones. - - - > config show Xfrout/transfer_acl -Xfrout/transfer_acl[0] {"action": "ACCEPT"} any (default) - - - If you want to require TSIG in access control, a system wide TSIG - key ring must be configured (see ). - In this example, we allow client matching both the IP address - and key. - - - > config set tsig_keys/keys ["key.example:<base64-key>"] -> config set Xfrout/zone_config[0]/transfer_acl [{"action": "ACCEPT", "from": "192.0.2.1", "key": "key.example"}] -> config commit - - Both b10-xfrout and b10-auth - will use the system wide key ring to check - TSIGs in the incoming messages and to sign responses. - - - For further details on ACL configuration, see - . - - - - The way to specify zone specific configuration (ACLs, etc) is - likely to be changed. - - - - - - Dynamic DNS Update - - - BIND 10 supports the server side of the Dynamic DNS Update - (DDNS) protocol as defined in RFC 2136. - This service is provided by the b10-ddns - component, which is started by the b10-init - process if configured so. - - - - When the b10-auth authoritative DNS server - receives an UPDATE request, it internally forwards the request - to b10-ddns, which handles the rest of - this request processing. - When the processing is completed, b10-ddns - will send a response to the client as specified in RFC 2136 - (NOERROR for successful update, REFUSED if rejected due to - ACL check, etc). - If the zone has been changed as a result, it will internally - notify b10-xfrout so that other secondary - servers will be notified via the DNS NOTIFY protocol. - In addition, if b10-auth serves the updated - zone (as described in - ), - b10-ddns will also - notify b10-auth so that b10-auth - will re-cache the updated zone content if necessary. - - - - The b10-ddns component supports requests over - both UDP and TCP, and both IPv6 and IPv4; for TCP requests, - however, it terminates the TCP connection immediately after - each single request has been processed. Clients cannot reuse the - same TCP connection for multiple requests. (This is a current - implementation limitation of b10-ddns. - While RFC 2136 doesn't specify anything about such reuse of TCP - connection, there is no reason for disallowing it as RFC 1035 - generally allows multiple requests sent over a single TCP - connection. BIND 9 supports such reuse.) - + + bind10 Control and Configuration - As of this writing b10-ddns does not support - update forwarding for secondary zones. - If it receives an update request for a secondary zone, it will - immediately return a not implemented response. - - For feature completeness, update forwarding should be - eventually supported. But currently it's considered a lower - priority task and there is no specific plan of implementing - this feature. - - + This chapter explains how to control and configure the + b10-init parent. + The startup of this resident process that runs the BIND 10 + daemons is covered in . -
- Enabling Dynamic Update - - First off, it must be made sure that a few components on which - b10-ddns depends are configured to run, - which are b10-auth - and b10-zonemgr. - In addition, b10-xfrout should also be - configured to run; otherwise the notification after an update - (see above) will fail with a timeout, suspending the DDNS - service while b10-ddns waits for the - response (see the description of the DDNS_UPDATE_NOTIFY_FAIL - log message for further details). - If BIND 10 is already configured to provide authoritative DNS - service they should normally be configured to run already. - - - - Second, for the obvious reason dynamic update requires that the - underlying data source storing the zone data be writable. - In the current implementation this means the zone must be stored - in an SQLite3-based data source. - - Also, in this current version, the b10-ddns - component configures itself with the data source referring to the - database_file configuration parameter of - b10-auth. - So this information must be configured correctly before starting - b10-ddns. - - - The way to configure data sources is now being revised. - Configuration on the data source for DDNS will be very - likely to be changed in a backward incompatible manner in - a near future version. - - - - - In general, if something goes wrong regarding the dependency - described above, b10-ddns will log the - related event at the warning or error level. - It's advisable to check the log message when you first enable - DDNS or if it doesn't work as you expect to see if there's any - warning or error log message. - - +
+ Stopping bind10 - Next, to enable the DDNS service, b10-ddns - needs to be explicitly configured to run. - It can be done by using the bindctl - utility. For example: - -> config add Init/components b10-ddns -> config set Init/components/b10-ddns/address DDNS -> config set Init/components/b10-ddns/kind dispensable -> config commit - - - In theory kind could be omitted because - "dispensable" is its default. - But there's some peculiar behavior (which should be a - bug and should be fixed eventually; see Trac ticket #2064) - with bindctl and you'll still need to - specify that explicitly. Likewise, address - may look unnecessary because b10-ddns - would start and work without specifying it. But for it - to shutdown gracefully this parameter should also be - specified. - + The BIND 10 suite may be shut down by stopping the + parent b10-init process. This may be done + by running the Init shutdown command + at the bindctl prompt.
-
- Access Control - - By default, b10-ddns rejects any update - requests from any clients by returning a REFUSED response. - To allow updates to take effect, an access control rule - (called update ACL) with a policy allowing updates must explicitly be - configured. - Update ACL must be configured per zone basis in the - zones configuration parameter of - b10-ddns. - This is a list of per-zone configurations regarding DDNS. - Each list element consists of the following parameters: - - - origin - - The zone's origin name - - - - class - - The RR class of the zone - (normally IN, and in that case - can be omitted in configuration) - - - - update_acl - - List of access control rules (ACL) for the zone - - - - The syntax of the ACL is the same as ACLs for other - components. - Specific examples are given below. - +
+ Configuration to start processes - In general, an update ACL rule that allows an update request - should be configured with a TSIG key. - This is an example update ACL that allows updates to the zone - named example.org (of default RR class IN) - from clients that send requests signed with a TSIG whose - key name is "key.example.org" (and refuses all others): - -> config add DDNS/zones -> config set DDNS/zones[0]/origin example.org -> config add DDNS/zones[0]/update_acl {"action": "ACCEPT", "key": "key.example.org"} -> config commit - - The TSIG key must be configured system wide - (see ). - - - - The full description of ACLs can be found in . - - - - The b10-ddns component accepts an ACL - rule that just allows updates from a specific IP address - (i.e., without requiring TSIG), but this is highly - discouraged (remember that requests can be made over UDP and - spoofing the source address of a UDP packet is often pretty - easy). - Unless you know what you are doing and that you can accept - its consequence, any update ACL rule that allows updates - should have a TSIG key in its constraints. - - - - Currently update ACL can only control updates per zone basis; - it's not possible to specify access control with higher - granularity such as for particular domain names or specific - types of RRs. - - - - - Contrary to what RFC 2136 (literally) specifies, - b10-ddns checks the update ACL before - checking the prerequisites of the update request. - This is a deliberate implementation decision. - This counter intuitive specification has been repeatedly - discussed among implementers and in the IETF, and it is now - widely agreed that it does not make sense to strictly follow - that part of RFC. - One known specific bad result of following the RFC is that it - could leak information about which name or record exists or does not - exist in the zone as a result of prerequisite checks even if a - zone is somehow configured to reject normal queries from - arbitrary clients. - There have been other troubles that could have been avoided if - the ACL could be checked before the prerequisite check. - -
- -
- Miscellaneous Operational Issues - - Unlike BIND 9, BIND 10 currently does not support automatic - re-signing of DNSSEC-signed zone when it's updated via DDNS. - It could be possible to re-sign the updated zone afterwards - or make sure the update request also updates related DNSSEC - records, but that will be pretty error-prone operation. - In general, it's not advisable to allow DDNS for a signed zone - at this moment. - - - - Also unlike BIND 9, it's currently not possible - to freeze a zone temporarily in order to - suspend DDNS while you manually update the zone. - If you need to make manual updates to a dynamic zone, - you'll need to temporarily reject any updates to the zone via - the update ACLs. - - - - Dynamic updates are only applicable to primary zones. - In order to avoid updating secondary zones via DDNS requests, - b10-ddns refers to the - secondary_zones configuration of - b10-zonemgr. Zones listed in - secondary_zones will never be updated via DDNS - regardless of the update ACL configuration; - b10-ddns will return a NOTAUTH (server - not authoritative for the zone) response. - If you have a "conceptual" secondary zone whose content is a - copy of some external source but is not updated via the - standard zone transfers and therefore not listed in - secondary_zones, be careful not to allow DDNS - for the zone; it would be quite likely to lead to inconsistent - state between different servers. - Normally this should not be a problem because the default - update ACL rejects any update requests, but you may want to - take an extra care about the configuration if you have such - type of secondary zones. - - - The difference of two versions of a zone, before and after a - DDNS transaction, is automatically recorded in the underlying - data source, and can be retrieved in the form of outbound - IXFR. - This is done automatically; it does not require specific - configuration to make this possible. + The processes to be used can be configured for + b10-init to start, with the exception + of the required b10-sockcreator, + b10-msgq and b10-cfgmgr + components. + The configuration is in the Init/components + section. Each element represents one component, which is + an abstraction of a process. -
- - - - Recursive Name Server - - - The b10-resolver is an experimental proof - of concept. - - - - The b10-resolver daemon provides an - iterative caching and forwarding DNS server. - The process is started by b10-init. - - - - - The main b10-init process can be configured - to select to run either the authoritative or resolver or both. - By default, it doesn't start either one. You may change this using - bindctl, for example: - -> config add Init/components b10-resolver -> config set Init/components/b10-resolver/special resolver + + To add a process to the set, let's say the DHCPv6 server (which + is not started by default), you would do this: + > config add Init/components b10-dhcp6 > config set Init/components/b10-resolver/kind needed > config set Init/components/b10-resolver/priority 10 -> config commit - - - - - - The master b10-init process will stop and start - the desired services. - - - - By default, the resolver listens on port 53 for 127.0.0.1 and ::1. - The following example shows how it can be configured to - listen on an additional address (and port): - - -> config add Resolver/listen_on -> config set Resolver/listen_on[2]/address "192.168.1.1" -> config set Resolver/listen_on[2]/port 53 -> config commit - - - - (Replace the 2 - as needed; run config show - Resolver/listen_on if needed.) - - -
- Access Control +> config commit - By default, the b10-resolver daemon only accepts - DNS queries from the localhost (127.0.0.1 and ::1). - The configuration may - be used to reject, drop, or allow specific IPs or networks. - See . + Now, what it means. We add an entry called + b10-dhcp6. It is both a name used to + reference this component in the configuration and the name + of the process to start. Then we set some parameters on + how to start it. - The following session is an example of extending the ACL to also - allow queries from 192.0.2.0/24: - -> config show Resolver/query_acl -Resolver/query_acl[0] {"action": "ACCEPT", "from": "127.0.0.1"} any (default) -Resolver/query_acl[1] {"action": "ACCEPT", "from": "::1"} any (default) -> config add Resolver/query_acl -> config set Resolver/query_acl[2] {"action": "ACCEPT", "from": "192.0.2.0/24"} -> config add Resolver/query_acl -> config show Resolver/query_acl -Resolver/query_acl[0] {"action": "ACCEPT", "from": "127.0.0.1"} any (modified) -Resolver/query_acl[1] {"action": "ACCEPT", "from": "::1"} any (modified) -Resolver/query_acl[2] {"action": "ACCEPT", "from": "192.0.2.0/24"} any (modified) -Resolver/query_acl[3] {"action": "REJECT"} any (modified) -> config commit - Note that we didn't set the value of the last final rule - (query_acl[3]) -- in the case of resolver, rejecting all queries is - the default value of a new rule. In fact, this rule can even be - omitted completely, as the default, when a query falls off the list, - is rejection. + The special (not used in the example above), was introduced + to be used for the components which require some kind of special care + during startup. One such component is the b10-cmdctl, which is always started + by default. No other components use this setting and it should be left unset + for them. -
+ + The kind specifies how a failure of the + component should be handled. If it is set to + dispensable (the default unless you set + something else), it will get started again if it fails. If + it is set to needed and it fails at startup, + the whole b10-init shuts down and exits + with an error exit code. But if it fails some time later, it + is just started again. If you set it to core, + you indicate that the system is not usable without the + component and if such component fails, the system shuts + down no matter when the failure happened. This is the + behavior of the core components (the ones you can't turn + off), but you can declare any other components as core as + well if you wish (but you can turn these off, they just + can't fail). + -
- Forwarding + + The priority defines order in which the + components should start. The ones with higher numbers are + started sooner than the ones with lower ones. If you don't + set it, 0 (zero) is used as the priority. Usually, leaving + it at the default is enough. + + There are other parameters we didn't use in our example. + One of them is address. It is the address + used by the component on the b10-msgq + message bus. The special components already know their + address, but the usual ones don't. The address is by + convention the thing after b10-, with + the first letter capitalized (eg. b10-stats + would have Stats as its address). + + - To enable forwarding, the upstream address and port must be - configured to forward queries to, such as: + - -> config set Resolver/forward_addresses [{ "address": "192.168.1.1", "port": 53 }] -> config commit - + - (Replace 192.168.1.1 to point to your - full resolver.) + + The last one is process. It is the name + of the process to be started. It defaults to the name of + the component if not set, but you can use this to override + it. (The special components also already know their + executable name.) - - Normal iterative name service can be re-enabled by clearing the - forwarding address(es); for example: + - -> config set Resolver/forward_addresses [] -> config commit - + + + The configuration is quite powerful, but that includes + a lot of space for mistakes. You could turn off the + b10-cmdctl, but then you couldn't + change it back the usual way, as it would require it to + be running (you would have to find and edit the configuration + directly). + + + In short, you should think twice before disabling something here. + + + + The running processes started by b10-init + may be listed by running Init show_processes + using bindctl.
- - -
@@ -7607,8 +5903,8 @@ DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]/port 53 integer(default) - The logging system in BIND 10 is configured through the - Logging module. All BIND 10 modules will look at the + The logging system in Kea is configured through the + Logging module. All modules will look at the configuration in Logging to see what should be logged and to where. @@ -7621,8 +5917,8 @@ DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]/port 53 integer(default) - Within BIND 10, a message is logged through a component - called a "logger". Different parts of BIND 10 log messages + Within Kea, a message is logged through a component + called a "logger". Different parts of log messages through different loggers, and each logger can be configured independently of one another. @@ -7652,10 +5948,10 @@ DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]/port 53 integer(default) Each logger in the system has a name, the name being that of the component using it to log messages. For instance, - if you want to configure logging for the resolver module, - you add an entry for a logger named Resolver. This + if you want to configure logging for the Dhcp4 module, + you add an entry for a logger named Dhcp4. This configuration will then be used by the loggers in the - Resolver module, and all the libraries used by it. + Dhcp4 module, and all the libraries used by it. - - + If you want to specify logging for one specific library within the module, you set the name to module.library. For example, the logger used by the nameserver address store component - has the full name of Resolver.nsas. If + has the full name of Dhcp4.dhcpsrv. If there is no entry in Logging for a particular library, it will use the configuration given for the module. - - - - - + To illustrate this, suppose you want the cache library to log messages of severity DEBUG, and the rest of the resolver code to log messages of severity INFO. To achieve this you specify two loggers, one with the name - Resolver and severity INFO, and one with - the name Resolver.cache with severity - DEBUG. As there are no entries for other libraries (e.g. - the nsas), they will use the configuration for the module - (Resolver), so giving the desired behavior. + Dhcp4 and severity INFO, and one with + the name Dhcp4.dhcpsrv with severity + DEBUG. As there are no entries for other libraries, + they will use the configuration for the module + (Dhcp4), so giving the desired behavior. @@ -7718,15 +6004,12 @@ specify module-wide logging and see what appears... configuration that might match a particular logger, the specification with the more specific logger name takes precedence. For example, if there are entries for - both * and Resolver, the - resolver module — and all libraries it uses — + both * and Dhcp4, the + Dhcp4 module — and all libraries it uses — will log messages according to the configuration in the - second entry (Resolver). All other modules + second entry (Dhcp4). All other modules will use the configuration of the first entry - (*). If there was also a configuration - entry for Resolver.cache, the cache library - within the resolver would use that in preference to the - entry for Resolver. + (*). @@ -7735,14 +6018,14 @@ specify module-wide logging and see what appears... One final note about the naming. When specifying the module name within a logger, use the name of the module as specified in bindctl, e.g. - Resolver for the resolver module, - Xfrout for the xfrout module, etc. When + Dhcp4 for the Dhcp4 module, + Dhcp6 for the Dhcp6 module, etc. When the message is logged, the message will include the name of the logger generating the message, but with the module name replaced by the name of the process implementing the module (so for example, a message generated by the - Auth.cache logger will appear in the output - with a logger name of b10-auth.cache). + Dhcp4 logger will appear in the output + with a logger name of b10-dhcp4). @@ -7848,15 +6131,13 @@ TODO; there's a ticket to determine these levels, see #1074 If this is true, the from the parent will be used. For example, if there are two - loggers configured; Resolver and - Resolver.cache, and + loggers configured; Dhcp4 and + Dhcp4.dhcpsrv, and is true in the second, it will write the log messages not only to the destinations specified for - Resolver.cache, but also to the destinations + Dhcp4.dhcpsrv, but also to the destinations as specified in the in - the logger named Resolver. - - + the logger named Dhcp4. @@ -8000,11 +6281,11 @@ TODO; there's a ticket to determine these levels, see #1074 (log4cplus), rolling over the log files (from ".1" to ".2", etc) may show odd results: There can be multiple small files at the timing of roll over. This - can happen when multiple BIND 10 processes try to roll + can happen when multiple processes try to roll over the files simultaneously. Version 1.1.0 of log4cplus solved this problem, so if this or higher version of log4cplus is used to build - BIND 10, it shouldn't happen. Even for older versions + Kea, it shouldn't happen. Even for older versions it is normally expected to happen rarely unless the log messages are produced very frequently by multiple different processes. @@ -8151,7 +6432,7 @@ Logging/loggers[0]/output_options[0]/maxver 0 integer (default) > config set Logging/loggers[0]/output_options[0]/destination file -> config set Logging/loggers[0]/output_options[0]/output /var/log/bind10.log +> config set Logging/loggers[0]/output_options[0]/output /var/log/kea.log > config set Logging/loggers[0]/output_options[0]/maxsize 204800 > config set Logging/loggers[0]/output_options[0]/maxver 8 @@ -8173,7 +6454,7 @@ Logging/loggers[0]/severity "WARN" string (modified) Logging/loggers[0]/debuglevel 0 integer (default) Logging/loggers[0]/additive false boolean (default) Logging/loggers[0]/output_options[0]/destination "file" string (modified) -Logging/loggers[0]/output_options[0]/output "/var/log/bind10.log" string (modified) +Logging/loggers[0]/output_options[0]/output "/var/log/kea.log" string (modified) Logging/loggers[0]/output_options[0]/flush false boolean (default) Logging/loggers[0]/output_options[0]/maxsize 204800 integer (modified) Logging/loggers[0]/output_options[0]/maxver 8 integer (modified) @@ -8204,12 +6485,12 @@ Logging/loggers[0]/output_options[0]/maxver 8 integer (modified) > config add Logging/loggers -> config set Logging/loggers[1]/name Auth +> config set Logging/loggers[1]/name Dhcp4 > config set Logging/loggers[1]/severity DEBUG > config set Logging/loggers[1]/debuglevel 40 > config add Logging/loggers[1]/output_options > config set Logging/loggers[1]/output_options[0]/destination file -> config set Logging/loggers[1]/output_options[0]/output /tmp/auth_debug.log +> config set Logging/loggers[1]/output_options[0]/output /tmp/dhcp4_debug.log > config commit @@ -8219,7 +6500,7 @@ Logging/loggers[0]/output_options[0]/maxver 8 integer (modified) And that's it. Once we have found whatever it was we needed the debug messages for, we can simply remove the - second logger to let the authoritative server use the + second logger to let the DHCP server use the same settings as the rest. @@ -8247,7 +6528,7 @@ Logging/loggers[0]/output_options[0]/maxver 8 integer (modified) Logging Message Format - Each message written by BIND 10 to the configured logging + Each message written to the configured logging destinations comprises a number of components that identify the origin of the message and, if the message indicates a problem, information about the problem that may be @@ -8256,8 +6537,8 @@ Logging/loggers[0]/output_options[0]/maxver 8 integer (modified) Consider the message below logged to a file: - 2011-06-15 13:48:22.034 ERROR [b10-resolver.asiolink] - ASIODNS_OPENSOCK error 111 opening TCP socket to 127.0.0.1(53) + 2014-04-11 12:58:01.005 INFO [b10-dhcp4.dhcpsrv/27456] + DHCPSRV_MEMFILE_DB opening memory file lease database: type=memfile universe=4 @@ -8272,7 +6553,7 @@ Logging/loggers[0]/output_options[0]/maxver 8 integer (modified) - 2011-06-15 13:48:22.034 + 2014-04-11 12:58:01.005 The date and time at which the message was generated. @@ -8280,50 +6561,45 @@ Logging/loggers[0]/output_options[0]/maxver 8 integer (modified) - ERROR + INFO The severity of the message. - [b10-resolver.asiolink] + [b10-dhcp4.dhcpsrv/27456] The source of the message. This comprises two components: the BIND 10 process generating the message (in this - case, b10-resolver) and the module + case, b10-dhcp4) and the module within the program from which the message originated - (which in the example is the asynchronous I/O link - module, asiolink). + (which is the name of the common library used by DHCP server + implementations). - ASIODNS_OPENSOCK + DHCPSRV_MEMFILE_DB - The message identification. Every message in BIND 10 + The message identification. Every message in Kea has a unique identification, which can be used as an index into the BIND 10 Messages + url="bind10-messages.html">Kea Messages Manual () from which more information can be obtained. - error 111 opening TCP socket to 127.0.0.1(53) + opening memory file lease database: type=memfile universe=4 - A brief description of the cause of the problem. + A brief description. Within this text, information relating to the condition that caused the message to be logged will be included. - In this example, error number 111 (an operating - system-specific error number) was encountered when - trying to open a TCP connection to port 53 on the - local system (address 127.0.0.1). The next step - would be to find out the reason for the failure by - consulting your system's documentation to identify - what error number 111 means. + In this example, the information is logged that the in-memory + lease database backend will be used to store DHCP leases. @@ -8333,6 +6609,43 @@ Logging/loggers[0]/output_options[0]/maxver 8 integer (modified) + + Acknowledgements + + Kea was initially implemented as a collection of applications + within the BIND 10 framework. Hence, Kea development would not be + possible without the generous support of BIND 10 project sponsors. + + JPRS and + CIRA are Patron Level + sponsors. + + AFNIC, + CNNIC, + CZ.NIC, + DENIC eG, + Google, + RIPE NCC, + Registro.br, + .nz Registry Services, and + Technical Center of Internet + are current sponsors. + + Afilias, + IIS.SE, + Nominet, and + SIDN were founding + sponsors of the project. + + + + Support for the development of the DHCPv4, DHCPv6 and + DHCP-DDNS components is provided by + Comcast. + + + +