Bv9ARM.ch05.html revision fc74b733bf679e1b3fb1599e32d445dffe325208
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<!--
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - Copyright (C) 2000-2003 Internet Software Consortium.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome -
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - Permission to use, copy, modify, and/or distribute this software for any
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - purpose with or without fee is hereby granted, provided that the above
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - copyright notice and this permission notice appear in all copies.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome -
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome - PERFORMANCE OF THIS SOFTWARE.
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome-->
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<!-- $Id$ -->
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<html>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<head>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<title>Chapter�5.�The BIND 9 Lightweight Resolver</title>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<link rel="prev" href="Bv9ARM.ch04.html" title="Chapter�4.�Advanced DNS Features">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<link rel="next" href="Bv9ARM.ch06.html" title="Chapter�6.�BIND 9 Configuration Reference">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome</head>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<div class="navheader">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<table width="100%" summary="Navigation header">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<tr><th colspan="3" align="center">Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</th></tr>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<tr>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<td width="20%" align="left">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<a accesskey="p" href="Bv9ARM.ch04.html">Prev</a>�</td>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<th width="60%" align="center">�</th>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch06.html">Next</a>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome</td>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome</tr>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome</table>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<hr>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome</div>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<div class="chapter" lang="en">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<div class="titlepage"><div><div><h2 class="title">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<a name="Bv9ARM.ch05"></a>Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</h2></div></div></div>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<div class="toc">
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<p><b>Table of Contents</b></p>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<dl>
afc2ba1deb75b323afde536f2dd18bcafdaa308dToomas Soome<dt><span class="sect1"><a href="Bv9ARM.ch05.html#id2571895">The Lightweight Resolver Library</a></span></dt>
<dt><span class="sect1"><a href="Bv9ARM.ch05.html#lwresd">Running a Resolver Daemon</a></span></dt>
</dl>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id2571895"></a>The Lightweight Resolver Library</h2></div></div></div>
<p>
Traditionally applications have been linked with a stub resolver
library that sends recursive DNS queries to a local caching name
server.
</p>
<p>
IPv6 once introduced new complexity into the resolution process,
such as following A6 chains and DNAME records, and simultaneous
lookup of IPv4 and IPv6 addresses. Though most of the complexity was
then removed, these are hard or impossible
to implement in a traditional stub resolver.
</p>
<p>
<acronym class="acronym">BIND</acronym> 9 therefore can also provide resolution
services to local clients
using a combination of a lightweight resolver library and a resolver
daemon process running on the local host. These communicate using
a simple UDP-based protocol, the "lightweight resolver protocol"
that is distinct from and simpler than the full DNS protocol.
</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="lwresd"></a>Running a Resolver Daemon</h2></div></div></div>
<p>
To use the lightweight resolver interface, the system must
run the resolver daemon <span><strong class="command">lwresd</strong></span> or a
local
name server configured with a <span><strong class="command">lwres</strong></span>
statement.
</p>
<p>
By default, applications using the lightweight resolver library will
make
UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
The
address can be overridden by <span><strong class="command">lwserver</strong></span>
lines in
<code class="filename">/etc/resolv.conf</code>.
</p>
<p>
The daemon currently only looks in the DNS, but in the future
it may use other sources such as <code class="filename">/etc/hosts</code>,
NIS, etc.
</p>
<p>
The <span><strong class="command">lwresd</strong></span> daemon is essentially a
caching-only name server that responds to requests using the
lightweight
resolver protocol rather than the DNS protocol. Because it needs
to run on each host, it is designed to require no or minimal
configuration.
Unless configured otherwise, it uses the name servers listed on
<span><strong class="command">nameserver</strong></span> lines in <code class="filename">/etc/resolv.conf</code>
as forwarders, but is also capable of doing the resolution
autonomously if
none are specified.
</p>
<p>
The <span><strong class="command">lwresd</strong></span> daemon may also be
configured with a
<code class="filename">named.conf</code> style configuration file,
in
<code class="filename">/etc/lwresd.conf</code> by default. A name
server may also
be configured to act as a lightweight resolver daemon using the
<span><strong class="command">lwres</strong></span> statement in <code class="filename">named.conf</code>.
</p>
<p>
The number of client queries that the <span><strong class="command">lwresd</strong></span>
daemon is able to serve can be set using the
<code class="option">lwres-tasks</code> and <code class="option">lwres-clients</code>
statements in the configuration.
</p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="Bv9ARM.ch04.html">Prev</a>�</td>
<td width="20%" align="center">�</td>
<td width="40%" align="right">�<a accesskey="n" href="Bv9ARM.ch06.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter�4.�Advanced DNS Features�</td>
<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
<td width="40%" align="right" valign="top">�Chapter�6.�<acronym class="acronym">BIND</acronym> 9 Configuration Reference</td>
</tr>
</table>
</div>
</body>
</html>