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