<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
	       [<!ENTITY mdash "&#8212;">]>
<!--
 - Copyright (C) 2010-2011  Internet Systems Consortium, Inc. ("ISC")
 -
 - Permission to use, copy, modify, and/or distribute this software for any
 - purpose with or without fee is hereby granted, provided that the above
 - copyright notice and this permission notice appear in all copies.
 -
 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 - PERFORMANCE OF THIS SOFTWARE.
-->

<refentry>

  <refentryinfo>
    <date>February 17, 2011</date>
  </refentryinfo>

  <refmeta>
    <refentrytitle>b10-resolver</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo>BIND10</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>b10-resolver</refname>
    <refpurpose>Recursive DNS server</refpurpose>
  </refnamediv>

  <docinfo>
    <copyright>
      <year>2010</year>
      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
    </copyright>
  </docinfo>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>b10-resolver</command>
      <arg><option>-u <replaceable>username</replaceable></option></arg>
      <arg><option>-v</option></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>DESCRIPTION</title>
    <para>The <command>b10-resolver</command> daemon provides the BIND 10
      recursive DNS server.  Normally it is started by the
      <citerefentry><refentrytitle>bind10</refentrytitle><manvolnum>8</manvolnum></citerefentry>
      boss process.
    </para>

    <para>
      This daemon communicates with other BIND 10 components over a
      <citerefentry><refentrytitle>b10-msgq</refentrytitle><manvolnum>8</manvolnum></citerefentry>
      C-Channel connection.  If this connection is not established,
      <command>b10-resolver</command> will exit.
    </para>

    <para>
      It also receives its configurations from
<citerefentry><refentrytitle>b10-cfgmgr</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
    </para>

<!--
    <note><para>
      Future versions will introduce lookup of local authoritative
      data (as in <command>b10-auth</command>) and DNSSEC validation.
    </para></note>
-->

  </refsect1>

  <refsect1>
    <title>OPTIONS</title>

    <para>The arguments are as follows:</para>

    <variablelist>

      <varlistentry>
        <term><option>-u <replaceable>username</replaceable></option></term>
        <listitem>
	  <para>
	    The user name of the <command>b10-resolver</command> daemon.
	    If specified, the daemon changes the process owner to the
	    specified user.
	    The <replaceable>username</replaceable> must be either a
	    valid numeric user ID or a valid user name.
	    By default the daemon runs as the user who invokes it.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-v</option></term>
        <listitem><para>
          Enabled verbose mode. This enables diagnostic messages to
          STDERR.
        </para></listitem>
      </varlistentry>

    </variablelist>

  </refsect1>

  <refsect1>
    <title>CONFIGURATION AND COMMANDS</title>
    <para>
      The configurable settings are:
    </para>

    <para>
      <varname>forward_addresses</varname> defines the list of addresses
      and ports that <command>b10-resolver</command> should forward
      queries to.
      Defining this enables forwarding.
<!-- TODO: list
address
	::1
port
	53
-->
    </para>

<!-- trac384:

once that is merged you can for instance do 'config add Resolver/forward_addresses { "port": 123 } and it will fill in the rest (in this case ::1 for the address)

-->

    <para>
      <varname>listen_on</varname> is a list of addresses and ports for
      <command>b10-resolver</command> to listen on.
      The list items are the <varname>address</varname> string
      and <varname>port</varname> number.
      The defaults are address ::1 port 53 and
      address 127.0.0.1 port 53.
<!-- TODO: but defaults are not used, Trac #518 -->
    </para>

    <para>
      <varname>retries</varname> is the number of times to retry
      (resend query) after a query timeout
      (<varname>timeout_query</varname>).
      The default is 3.
    </para>

    <para>
      <varname>root_addresses</varname> is a list of addresses and ports
      for <command>b10-resolver</command> to use directly as
      root servers to start resolving.
      The list items are the <varname>address</varname> string
      and <varname>port</varname> number.
      If empty, a hardcoded address for F-root (192.5.5.241) is used.
    </para>

    <para>
      <varname>timeout_client</varname> is the number of milliseconds
      to wait before timing out the incoming client query.
      If set to -1, this timeout is disabled.
      The default is 4000.
      After this timeout, a SERVFAIL is sent back to the client asking
      the question.
      (The lookup may continue after the timeout, but a later answer
      is not returned for the now-past query.)
    </para>

    <para>
      <varname>timeout_lookup</varname> is the number of milliseconds
      before it stops trying the query.
      If set to -1, this timeout is disabled.
      The default is 30000.
    </para>

    <para>
<!-- previous timeout was renamed to timeout_query -->
      <varname>timeout_query</varname> is the number of milliseconds to
      wait before it retries a query.
      If set to -1, this timeout is disabled.
      The default is 2000.
    </para>

<!-- TODO: formating -->
    <para>
      The configuration command is:
    </para>

    <para>
      <command>shutdown</command> exits <command>b10-resolver</command>.
      (Note that the BIND 10 boss process will restart this service.)
    </para>

  </refsect1>

<!--
  <refsect1>
    <title>FILES</title>
    <para>
      None.
    </para>
  </refsect1>
-->

  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
        <refentrytitle>b10-cfgmgr</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>b10-cmdctl</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>b10-msgq</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>bind10</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
      <citetitle>BIND 10 Guide</citetitle>.
    </para>
  </refsect1>

  <refsect1>
    <title>HISTORY</title>
    <para>
      The <command>b10-resolver</command> daemon was first coded in
      September 2010. The initial implementation only provided
      forwarding. Iteration was introduced in January 2011.
<!-- TODO: document when caching was added -->
<!-- TODO: document when validation was added -->
    </para>
  </refsect1>
</refentry><!--
 - Local variables:
 - mode: sgml
 - End:
-->
