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