[BACK]Return to Bv9ARM.ch03.html CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / mpl / bind / dist / doc / arm

File: [cvs.NetBSD.org] / src / external / mpl / bind / dist / doc / arm / Attic / Bv9ARM.ch03.html (download) (as text)

Revision 1.1.1.4 (vendor branch), Sat Apr 27 23:47:21 2019 UTC (4 years, 11 months ago) by christos
Branch: ISC
CVS Tags: phil-wifi-20190609, netbsd-9-base, bind-9-14-1
Branch point for: phil-wifi, netbsd-9
Changes since 1.1.1.3: +1 -1 lines

	--- 9.14.1 released ---

5201.	[bug]		Fix a possible deadlock in RPZ update code. [GL #973]

5200.	[security]	tcp-clients settings could be exceeded in some cases,
			which could lead to exhaustion of file descriptors.
			(CVE-2018-5743) [GL #615]

5199.	[security]	In certain configurations, named could crash
			if nxdomain-redirect was in use and a redirected
			query resulted in an NXDOMAIN from the cache.
			(CVE-2019-6467) [GL #880]

5198.	[bug]		If a fetch context was being shut down and, at the same
			time, we returned from qname minimization, an INSIST
			could be hit. [GL #966]

5197.	[bug]		dig could die in best effort mode on multiple SIG(0)
			records. Similarly on multiple OPT and multiple TSIG
			records. [GL #920]

5196.	[bug]		make install failed with --with-dlopen=no. [GL #955]

5195.	[bug]		"allow-update" and "allow-update-forwarding" were
			treated as configuration errors if used at the
			options or view level. [GL #913]

5194.	[bug]		Enforce non empty ZOMEMD hash. [GL #899]

5193.	[bug]		EID and NIMLOC failed to do multi-line output
			correctly. [GL #899]

5189.	[cleanup]	Remove revoked root DNSKEY from bind.keys. [GL #945]

5187.	[test]		Set time zone before running any tests in dnstap_test.
			[GL #940]

5186.	[cleanup]	More dnssec-keygen manual tidying. [GL !1678]

5184.	[bug]		Missing unlocks in sdlz.c. [GL #936]

5183.	[bug]		Reinitialize ECS data before reusing client
			structures. [GL #881]

	--- 9.14.0 released ---

	--- 9.14.0rc3 released ---

5182.	[bug]		Fix a high-load race/crash in handling of
			isc_socket_close() in resolver. [GL #834]

5180.	[bug]		delv now honors the operating system's preferred
			ephemeral port range. [GL #925]

5179.	[cleanup]	Replace some vague type declarations with the more
			specific dns_secalg_t and dns_dsdigest_t.
			Thanks to Tony Finch. [GL !1498]

5178.	[bug]		Handle EDQUOT (disk quota) and ENOSPC (disk full)
			errors when writing files. [GL #902]

5177.	[func]		Add the ability to specify in named.conf whether a
			response-policy zone's SOA record should be added
			to the additional section (add-soa yes/no). [GL #865]

5167.	[bug]		nxdomain-redirect could sometimes lookup the wrong
			redirect name. [GL #892]

	--- 9.14.0rc2 released ---

5176.	[tests]		Remove a dependency on libxml in statschannel system
			test. [GL #926]

5175.	[bug]		Fixed a problem with file input in dnssec-keymgr,
			dnssec-coverage and dnssec-checkds when using
			python3. [GL #882]

5174.	[doc]		Tidy dnssec-keygen manual. [GL !1557]

5173.	[bug]		Fixed a race in socket code that could occur when
			accept, send, or recv were called from an event
			loop but the socket had been closed by another
			thread. [RT #874]

5172.	[bug]		nsupdate now honors the operating system's preferred
			ephemeral port range. [GL #905]

5171.	[func]		named plugins are now installed into a separate
			directory.  Supplying a filename (a string without path
			separators) in a "plugin" configuration stanza now
			causes named to look for that plugin in that directory.
			[GL #878]

5170.	[test]		Added --with-dlz-filesystem to feature-test. [GL !1587]

5169.	[bug]		The presence of certain types in an otherwise
			empty node could cause a crash while processing a
			type ANY query. [GL #901]

	--- 9.14.0rc1 released ---

5168.	[bug]		Do not crash on shutdown when RPZ fails to load.  Also,
			keep previous version of the database if RPZ fails to
			load. [GL #813]

5165.	[contrib]	Removed SDB drivers from contrib; they're obsolete.
			[GL #428]

5164.	[bug]		Correct errno to result translation in dlz filesystem
			modules. [GL #884]

5163.	[cleanup]	Out-of-tree builds failed --enable-dnstap. [GL #836]

5162.	[cleanup]	Improve dnssec-keymgr manual. Thanks to Tony Finch.
			[GL !1518]

5161.	[bug]		Do not require the SEP bit to be set for mirror zone
			trust anchors. [GL #873]

5160.	[contrib]	Added DNAME support to the DLZ LDAP schema. Also
			fixed a compilation bug affecting several DLZ
			modules. [GL #872]

5159.	[bug]		dnssec-coverage was incorrectly ignoring
			names specified on the command line without
			trailing dots. [GL !1478]

5158.	[protocol]	Add support for AMTRELAY and ZONEMD. [GL #867]

5157.	[bug]		Nslookup now errors out if there are extra command
			line arguments. [GL #207]

5141.	[security]	Zone transfer controls for writable DLZ zones were
			not effective as the allowzonexfr method was not being
			called for such zones. (CVE-2019-6465) [GL #790]

5118.	[security]	Named could crash if it is managing a key with
			`managed-keys` and the authoritative zone is rolling
			the key to an unsupported algorithm. (CVE-2018-5745)
			[GL #780]

5110.	[security]	Named leaked memory if there were multiple Key Tag
			EDNS options present. (CVE-2018-5744) [GL #772]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
 - Copyright (C) 2000-2019 Internet Systems Consortium, Inc. ("ISC")
 - 
 - This Source Code Form is subject to the terms of the Mozilla Public
 - License, v. 2.0. If a copy of the MPL was not distributed with this
 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter. Îame Server Configuration</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
<link rel="prev" href="Bv9ARM.ch02.html" title="Chapter. ÂIND Resource Requirements">
<link rel="next" href="Bv9ARM.ch04.html" title="Chapter. Ádvanced DNS Features">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">Chapter. Îame Server Configuration</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="Bv9ARM.ch02.html">Prev</a>/td>
<th width="60%" align="center">/th>
<td width="20%" align="right">a accesskey="n" href="Bv9ARM.ch04.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="chapter">
<div class="titlepage"><div><div><h1 class="title">
<a name="Bv9ARM.ch03"></a>Chapter. Îame Server Configuration</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="Bv9ARM.ch03.html#sample_configuration">Sample Configurations</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="Bv9ARM.ch03.html#cache_only_sample">A Caching-only Name Server</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch03.html#auth_only_sample">An Authoritative-only Name Server</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="Bv9ARM.ch03.html#load_balancing">Load Balancing</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch03.html#ns_operations">Name Server Operations</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="Bv9ARM.ch03.html#tools">Tools for Use With the Name Server Daemon</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch03.html#signals">Signals</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="Bv9ARM.ch03.html#module-info">Plugins</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="Bv9ARM.ch03.html#id-1.4.6.5">Configuring Plugins</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch03.html#id-1.4.6.6">Developing Plugins</a></span></dt>
</dl></dd>
</dl>
</div>

    <p>
      In this chapter we provide some suggested configurations along
      with guidelines for their use.  We suggest reasonable values for
      certain option settings.
    </p>

    <div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="sample_configuration"></a>Sample Configurations</h2></div></div></div>

      <div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="cache_only_sample"></a>A Caching-only Name Server</h3></div></div></div>

        <p>
          The following sample configuration is appropriate for a caching-only
          name server for use by clients internal to a corporation.  All
          queries
          from outside clients are refused using the <span class="command"><strong>allow-query</strong></span>
          option.  Alternatively, the same effect could be achieved using
          suitable
          firewall rules.
        </p>

<pre class="programlisting">
// Two corporate subnets we wish to allow queries from.
acl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
options {
     // Working directory
     directory "/etc/namedb";

     allow-query { corpnets; };
};
// Provide a reverse mapping for the loopback
// address 127.0.0.1
zone "0.0.127.in-addr.arpa" {
     type master;
     file "localhost.rev";
     notify no;
};
</pre>

      </div>

      <div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="auth_only_sample"></a>An Authoritative-only Name Server</h3></div></div></div>

        <p>
          This sample configuration is for an authoritative-only server
          that is the master server for "<code class="filename">example.com</code>"
          and a slave for the subdomain "<code class="filename">eng.example.com</code>".
        </p>

<pre class="programlisting">
options {
     // Working directory
     directory "/etc/namedb";
     // Do not allow access to cache
     allow-query-cache { none; };
     // This is the default
     allow-query { any; };
     // Do not provide recursive service
     recursion no;
};

// Provide a reverse mapping for the loopback
// address 127.0.0.1
zone "0.0.127.in-addr.arpa" {
     type master;
     file "localhost.rev";
     notify no;
};
// We are the master server for example.com
zone "example.com" {
     type master;
     file "example.com.db";
     // IP addresses of slave servers allowed to
     // transfer example.com
     allow-transfer {
          192.168.4.14;
          192.168.5.53;
     };
};
// We are a slave server for eng.example.com
zone "eng.example.com" {
     type slave;
     file "eng.example.com.bk";
     // IP address of eng.example.com master server
     masters { 192.168.4.12; };
};
</pre>

      </div>
    </div>

    <div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="load_balancing"></a>Load Balancing</h2></div></div></div>

      

      <p>
        A primitive form of load balancing can be achieved in
        the <acronym class="acronym">DNS</acronym> by using multiple records
        (such as multiple A records) for one name.
      </p>

      <p>
        For example, if you have three WWW servers with network addresses
        of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
        following means that clients will connect to each machine one third
        of the time:
      </p>

      <div class="informaltable">
        <table border="1">
<colgroup>
<col width="0.875in" class="1">
<col width="0.500in" class="2">
<col width="0.750in" class="3">
<col width="0.750in" class="4">
<col width="2.028in" class="5">
</colgroup>
<tbody>
<tr>
<td>
                <p>
                  Name
                </p>
              </td>
<td>
                <p>
                  TTL
                </p>
              </td>
<td>
                <p>
                  CLASS
                </p>
              </td>
<td>
                <p>
                  TYPE
                </p>
              </td>
<td>
                <p>
                  Resource Record (RR) Data
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="literal">www</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">600</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">IN</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">A</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">10.0.0.1</code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p></p>
              </td>
<td>
                <p>
                  <code class="literal">600</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">IN</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">A</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">10.0.0.2</code>
                </p>
              </td>
</tr>
<tr>
<td>
                <p></p>
              </td>
<td>
                <p>
                  <code class="literal">600</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">IN</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">A</code>
                </p>
              </td>
<td>
                <p>
                  <code class="literal">10.0.0.3</code>
                </p>
              </td>
</tr>
</tbody>
</table>
      </div>
      <p>
        When a resolver queries for these records, <acronym class="acronym">BIND</acronym> will rotate
        them and respond to the query with the records in a different
        order.  In the example above, clients will randomly receive
        records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
        will use the first record returned and discard the rest.
      </p>
      <p>
        For more detail on ordering responses, check the
        <span class="command"><strong>rrset-order</strong></span> sub-statement in the
        <span class="command"><strong>options</strong></span> statement, see
        <a class="xref" href="Bv9ARM.ch05.html#rrset_ordering" title="RRset Ordering">RRset Ordering</a>.
      </p>

    </div>

    <div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="ns_operations"></a>Name Server Operations</h2></div></div></div>

      <div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="tools"></a>Tools for Use With the Name Server Daemon</h3></div></div></div>
        <p>
          This section describes several indispensable diagnostic,
          administrative and monitoring tools available to the system
          administrator for controlling and debugging the name server
          daemon.
        </p>
        <div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="diagnostic_tools"></a>Diagnostic Tools</h4></div></div></div>
          <p>
            The <span class="command"><strong>dig</strong></span>, <span class="command"><strong>host</strong></span>, and
            <span class="command"><strong>nslookup</strong></span> programs are all command
            line tools
            for manually querying name servers.  They differ in style and
            output format.
          </p>

          <div class="variablelist"><dl class="variablelist">
<dt><span class="term"><a name="dig"></a><span class="command"><strong>dig</strong></span></span></dt>
<dd>
                <p>
                  <span class="command"><strong>dig</strong></span>
                  is the most versatile and complete of these lookup tools.
                  It has two modes: simple interactive
                  mode for a single query, and batch mode which executes a
                  query for
                  each in a list of several query lines. All query options are
                  accessible
                  from the command line.
                </p>
                <div class="cmdsynopsis"><p>
                  <code class="command">dig</code> 
                   [@<em class="replaceable"><code>server</code></em>]
                    <em class="replaceable"><code>domain</code></em> 
                   [<em class="replaceable"><code>query-type</code></em>]
                   [<em class="replaceable"><code>query-class</code></em>]
                   [+<em class="replaceable"><code>query-option</code></em>]
                   [-<em class="replaceable"><code>dig-option</code></em>]
                   [%<em class="replaceable"><code>comment</code></em>]
                </p></div>
                <p>
                  The usual simple use of <span class="command"><strong>dig</strong></span> will take the form
                </p>
                <p class="simpara">
                  <span class="command"><strong>dig @server domain query-type query-class</strong></span>
                </p>
                <p>
                  For more information and a list of available commands and
                  options, see the <span class="command"><strong>dig</strong></span> man
                  page.
                </p>
              </dd>
<dt><span class="term"><span class="command"><strong>host</strong></span></span></dt>
<dd>
                <p>
                  The <span class="command"><strong>host</strong></span> utility emphasizes
                  simplicity
                  and ease of use.  By default, it converts
                  between host names and Internet addresses, but its
                  functionality
                  can be extended with the use of options.
                </p>
                <div class="cmdsynopsis"><p>
                  <code class="command">host</code> 
                   [-aCdlnrsTwv]
                   [-c <em class="replaceable"><code>class</code></em>]
                   [-N <em class="replaceable"><code>ndots</code></em>]
                   [-t <em class="replaceable"><code>type</code></em>]
                   [-W <em class="replaceable"><code>timeout</code></em>]
                   [-R <em class="replaceable"><code>retries</code></em>]
                   [-m <em class="replaceable"><code>flag</code></em>]
                   [-4]
                   [-6]
                    <em class="replaceable"><code>hostname</code></em> 
                   [<em class="replaceable"><code>server</code></em>]
                </p></div>
                <p>
                  For more information and a list of available commands and
                  options, see the <span class="command"><strong>host</strong></span> man
                  page.
                </p>
              </dd>
<dt><span class="term"><span class="command"><strong>nslookup</strong></span></span></dt>
<dd>
                <p><span class="command"><strong>nslookup</strong></span>
                  has two modes: interactive and
                  non-interactive. Interactive mode allows the user to
                  query name servers for information about various
                  hosts and domains or to print a list of hosts in a
                  domain. Non-interactive mode is used to print just
                  the name and requested information for a host or
                  domain.
                </p>
                <div class="cmdsynopsis"><p>
                  <code class="command">nslookup</code> 
                   [-option...]
                   [
                    [<em class="replaceable"><code>host-to-find</code></em>]
                     |  [- [server]]
                  ]
                </p></div>
                <p>
                  Interactive mode is entered when no arguments are given (the
                  default name server will be used) or when the first argument
                  is a
                  hyphen (`-') and the second argument is the host name or
                  Internet address
                  of a name server.
                </p>
                <p>
                  Non-interactive mode is used when the name or Internet
                  address
                  of the host to be looked up is given as the first argument.
                  The
                  optional second argument specifies the host name or address
                  of a name server.
                </p>
                <p>
                  Due to its arcane user interface and frequently inconsistent
                  behavior, we do not recommend the use of <span class="command"><strong>nslookup</strong></span>.
                  Use <span class="command"><strong>dig</strong></span> instead.
                </p>
              </dd>
</dl></div>
        </div>

        <div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="admin_tools"></a>Administrative Tools</h4></div></div></div>
          <p>
            Administrative tools play an integral part in the management
            of a server.
          </p>
          <div class="variablelist"><dl class="variablelist">
<dt>
<a name="named-checkconf"></a><span class="term"><span class="command"><strong>named-checkconf</strong></span></span>
</dt>
<dd>
                <p>
                  The <span class="command"><strong>named-checkconf</strong></span> program
                  checks the syntax of a <code class="filename">named.conf</code> file.
                </p>
                <div class="cmdsynopsis"><p>
                  <code class="command">named-checkconf</code> 
                   [-jvz]
                   [-t <em class="replaceable"><code>directory</code></em>]
                   [<em class="replaceable"><code>filename</code></em>]
                </p></div>
              </dd>
<dt>
<a name="named-checkzone"></a><span class="term"><span class="command"><strong>named-checkzone</strong></span></span>
</dt>
<dd>
                <p>
                  The <span class="command"><strong>named-checkzone</strong></span> program
                  checks a master file for
                  syntax and consistency.
                </p>
                <div class="cmdsynopsis"><p>
                  <code class="command">named-checkzone</code> 
                   [-djqvD]
                   [-c <em class="replaceable"><code>class</code></em>]
                   [-o <em class="replaceable"><code>output</code></em>]
                   [-t <em class="replaceable"><code>directory</code></em>]
                   [-w <em class="replaceable"><code>directory</code></em>]
                   [-k <em class="replaceable"><code>(ignore|warn|fail)</code></em>]
                   [-n <em class="replaceable"><code>(ignore|warn|fail)</code></em>]
                   [-W <em class="replaceable"><code>(ignore|warn)</code></em>]
                    <em class="replaceable"><code>zone</code></em> 
                   [<em class="replaceable"><code>filename</code></em>]
                </p></div>
              </dd>
<dt>
<a name="named-compilezone"></a><span class="term"><span class="command"><strong>named-compilezone</strong></span></span>
</dt>
<dd>
                <p>
                  Similar to <span class="command"><strong>named-checkzone,</strong></span> but
                  it always dumps the zone content to a specified file
                  (typically in a different format).
                </p>
              </dd>
<dt>
<a name="rndc"></a><span class="term"><span class="command"><strong>rndc</strong></span></span>
</dt>
<dd>
                <p>
                  The remote name daemon control
                  (<span class="command"><strong>rndc</strong></span>) program allows the
                  system
                  administrator to control the operation of a name server.
                  If you run <span class="command"><strong>rndc</strong></span> without any
                  options, it will display a usage message as follows:
                </p>
                <div class="cmdsynopsis"><p>
                  <code class="command">rndc</code> 
                   [-c <em class="replaceable"><code>config</code></em>]
                   [-s <em class="replaceable"><code>server</code></em>]
                   [-p <em class="replaceable"><code>port</code></em>]
                   [-y <em class="replaceable"><code>key</code></em>]
                    <em class="replaceable"><code>command</code></em> 
                   [<em class="replaceable"><code>command</code></em>...]
                </p></div>

                <p>See <a class="xref" href="man.rndc.html" title="rndc"><span class="refentrytitle"><span class="application">rndc</span></span>(8)</a> for details of
                  the available <span class="command"><strong>rndc</strong></span> commands.
                </p>

                <p>
                  <span class="command"><strong>rndc</strong></span> requires a configuration file,
                  since all
                  communication with the server is authenticated with
                  digital signatures that rely on a shared secret, and
                  there is no way to provide that secret other than with a
                  configuration file.  The default location for the
                  <span class="command"><strong>rndc</strong></span> configuration file is
                  <code class="filename">/etc/rndc.conf</code>, but an
                  alternate
                  location can be specified with the <code class="option">-c</code>
                  option.  If the configuration file is not found,
                  <span class="command"><strong>rndc</strong></span> will also look in
                  <code class="filename">/etc/rndc.key</code> (or whatever
                  <code class="varname">sysconfdir</code> was defined when
                  the <acronym class="acronym">BIND</acronym> build was
                  configured).
                  The <code class="filename">rndc.key</code> file is
                  generated by
                  running <span class="command"><strong>rndc-confgen -a</strong></span> as
                  described in
                  <a class="xref" href="Bv9ARM.ch05.html#controls_statement_definition_and_usage" title="controls Statement Definition and Usage">the section called &#8220;<span class="command"><strong>controls</strong></span> Statement Definition and
          Usage&#8221;</a>.
                </p>

                <p>
                  The format of the configuration file is similar to
                  that of <code class="filename">named.conf</code>, but
                  limited to
                  only four statements, the <span class="command"><strong>options</strong></span>,
                  <span class="command"><strong>key</strong></span>, <span class="command"><strong>server</strong></span> and
                  <span class="command"><strong>include</strong></span>
                  statements.  These statements are what associate the
                  secret keys to the servers with which they are meant to
                  be shared.  The order of statements is not
                  significant.
                </p>

                <p>
                  The <span class="command"><strong>options</strong></span> statement has
                  three clauses:
                  <span class="command"><strong>default-server</strong></span>, <span class="command"><strong>default-key</strong></span>,
                  and <span class="command"><strong>default-port</strong></span>.
                  <span class="command"><strong>default-server</strong></span> takes a
                  host name or address argument  and represents the server
                  that will
                  be contacted if no <code class="option">-s</code>
                  option is provided on the command line.
                  <span class="command"><strong>default-key</strong></span> takes
                  the name of a key as its argument, as defined by a <span class="command"><strong>key</strong></span> statement.
                  <span class="command"><strong>default-port</strong></span> specifies the
                  port to which
                  <span class="command"><strong>rndc</strong></span> should connect if no
                  port is given on the command line or in a
                  <span class="command"><strong>server</strong></span> statement.
                </p>

                <p>
                  The <span class="command"><strong>key</strong></span> statement defines a
                  key to be used
                  by <span class="command"><strong>rndc</strong></span> when authenticating
                  with
                  <span class="command"><strong>named</strong></span>.  Its syntax is
                  identical to the
                  <span class="command"><strong>key</strong></span> statement in <code class="filename">named.conf</code>.
                  The keyword <strong class="userinput"><code>key</code></strong> is
                  followed by a key name, which must be a valid
                  domain name, though it need not actually be hierarchical;
                  thus,
                  a string like "<strong class="userinput"><code>rndc_key</code></strong>" is a valid
                  name.
                  The <span class="command"><strong>key</strong></span> statement has two
                  clauses:
                  <span class="command"><strong>algorithm</strong></span> and <span class="command"><strong>secret</strong></span>.
                  While the configuration parser will accept any string as the
                  argument
                  to algorithm, currently only the strings
                  "<strong class="userinput"><code>hmac-md5</code></strong>",
                  "<strong class="userinput"><code>hmac-sha1</code></strong>",
                  "<strong class="userinput"><code>hmac-sha224</code></strong>",
                  "<strong class="userinput"><code>hmac-sha256</code></strong>",
                  "<strong class="userinput"><code>hmac-sha384</code></strong>"
                  and "<strong class="userinput"><code>hmac-sha512</code></strong>"
                  have any meaning.  The secret is a Base64 encoded string
                  as specified in RFC 3548.
                </p>

                <p>
                  The <span class="command"><strong>server</strong></span> statement
                  associates a key
                  defined using the <span class="command"><strong>key</strong></span>
                  statement with a server.
                  The keyword <strong class="userinput"><code>server</code></strong> is followed by a
                  host name or address.  The <span class="command"><strong>server</strong></span> statement
                  has two clauses: <span class="command"><strong>key</strong></span> and <span class="command"><strong>port</strong></span>.
                  The <span class="command"><strong>key</strong></span> clause specifies the
                  name of the key
                  to be used when communicating with this server, and the
                  <span class="command"><strong>port</strong></span> clause can be used to
                  specify the port <span class="command"><strong>rndc</strong></span> should
                  connect
                  to on the server.
                </p>

                <p>
                  A sample minimal configuration file is as follows:
                </p>

<pre class="programlisting">
key rndc_key {
     algorithm "hmac-sha256";
     secret
       "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};
options {
     default-server 127.0.0.1;
     default-key    rndc_key;
};
</pre>

                <p>
                  This file, if installed as <code class="filename">/etc/rndc.conf</code>,
                  would allow the command:
                </p>

                <p>
                  <code class="prompt">$ </code><strong class="userinput"><code>rndc reload</code></strong>
                </p>

                <p>
                  to connect to 127.0.0.1 port 953 and cause the name server
                  to reload, if a name server on the local machine were
                  running with
                  following controls statements:
                </p>

<pre class="programlisting">
controls {
        inet 127.0.0.1
            allow { localhost; } keys { rndc_key; };
};
</pre>

                <p>
                  and it had an identical key statement for
                  <code class="literal">rndc_key</code>.
                </p>

                <p>
                  Running the <span class="command"><strong>rndc-confgen</strong></span>
                  program will
                  conveniently create a <code class="filename">rndc.conf</code>
                  file for you, and also display the
                  corresponding <span class="command"><strong>controls</strong></span>
                  statement that you need to
                  add to <code class="filename">named.conf</code>.
                  Alternatively,
                  you can run <span class="command"><strong>rndc-confgen -a</strong></span>
                  to set up
                  a <code class="filename">rndc.key</code> file and not
                  modify
                  <code class="filename">named.conf</code> at all.
                </p>

              </dd>
</dl></div>

        </div>
      </div>

      <div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="signals"></a>Signals</h3></div></div></div>
        <p>
          Certain UNIX signals cause the name server to take specific
          actions, as described in the following table.  These signals can
          be sent using the <span class="command"><strong>kill</strong></span> command.
        </p>
        <div class="informaltable">
          <table border="1">
<colgroup>
<col width="1.125in" class="1">
<col width="4.000in" class="2">
</colgroup>
<tbody>
<tr>
<td>
                  <p><span class="command"><strong>SIGHUP</strong></span></p>
                </td>
<td>
                  <p>
                    Causes the server to read <code class="filename">named.conf</code> and
                    reload the database.
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p><span class="command"><strong>SIGTERM</strong></span></p>
                </td>
<td>
                  <p>
                    Causes the server to clean up and exit.
                  </p>
                </td>
</tr>
<tr>
<td>
                  <p><span class="command"><strong>SIGINT</strong></span></p>
                </td>
<td>
                  <p>
                    Causes the server to clean up and exit.
                  </p>
                </td>
</tr>
</tbody>
</table>
        </div>
      </div>
    </div>

    <div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="module-info"></a>Plugins</h2></div></div></div>

  <p>
    Plugins are a mechanism to extend the functionality of
    <span class="command"><strong>named</strong></span> using dynamically loadable libraries.
    By using plugins, core server functionality can be kept simple
    for the majority of users; more complex code implementing optional
    features need only be installed by users that need those features.
  </p>
  <p>
    The plugin interface is a work in progress, and is expected to evolve
    as more plugins are added. Currently, only "query plugins" are supported;
    these modify the name server query logic. Other plugin types may be added
    in the future.
  </p>
  <p>
    The only plugin currently included in BIND is
    <code class="filename">filter-aaaa.so</code>, which replaces the
    <span class="command"><strong>filter-aaaa</strong></span> feature that previously existed natively
    as part of <span class="command"><strong>named</strong></span>.
    The code for this feature has been removed from <span class="command"><strong>named</strong></span>,
    and can no longer be configured using standard
    <code class="filename">named.conf</code> syntax, but linking in the
    <code class="filename">filter-aaaa.so</code> plugin provides identical
    functionality.
  </p>

  <div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.4.6.5"></a>Configuring Plugins</h3></div></div></div>
    <p>
      A plugin is configured with the <span class="command"><strong>plugin</strong></span>
      statement in <code class="filename">named.conf</code>:
    </p>
    <pre class="screen">
    plugin query "library.so" {
        <em class="replaceable"><code>parameters</code></em>
    };
    </pre>
    <p>
      In this example, file <code class="filename">library.so</code> is the plugin
      library.  <code class="literal">query</code> indicates that this is a query
      plugin.
    </p>
<p>
    </p>
<p>
      Multiple <span class="command"><strong>plugin</strong></span> statements can be specified, to load
      different plugins or multiple instances of the same plugin.
    </p>
    <p>
      <em class="replaceable"><code>parameters</code></em> are passed as an opaque
      string to the plugin's initialization routine. Configuration
      syntax will differ depending on the module.
    </p>
  </div>

  <div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.4.6.6"></a>Developing Plugins</h3></div></div></div>
    <p>
      Each plugin implements four functions:
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<span class="command"><strong>plugin_register</strong></span> to allocate memory,
        configure a plugin instance, and attach to hook points within
        <span class="command"><strong>named</strong></span>,</li>
<li class="listitem">
<span class="command"><strong>plugin_destroy</strong></span> to tear down the plugin
        instance and free memory,</li>
<li class="listitem">
<span class="command"><strong>plugin_version</strong></span> to check that the plugin
        is compatible with the current version of the plugin API,</li>
<li class="listitem">
<span class="command"><strong>plugin_check</strong></span> to test syntactic
        correctness of the plugin parameters.</li>
</ul></div>
<p>
    </p>
    <p>
      At various locations within the <span class="command"><strong>named</strong></span> source code,
      there are "hook points" at which a plugin may register itself.
      When a hook point is reached while <span class="command"><strong>named</strong></span> is
      running, it is checked to see whether any plugins have registered
      themselves there; if so, the associated "hook action" is called -
      this is a function within the plugin library. Hook actions may
      examine the runtime state and make changes - for example, modifying
      the answers to be sent back to a client or forcing a query to be
      aborted. More details can be found in the file
      <code class="filename">lib/ns/include/ns/hooks.h</code>.
    </p>
  </div>

</div>

  </div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="Bv9ARM.ch02.html">Prev</a>/td>
<td width="20%" align="center">/td>
<td width="40%" align="right">a accesskey="n" href="Bv9ARM.ch04.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter.acronym class="acronym">BIND</acronym> Resource Requirements/td>
<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
<td width="40%" align="right" valign="top"> Ãhapter. Ádvanced DNS Features</td>
</tr>
</table>
</div>
<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.14.1 (Stable Release)</p>
</body>
</html>