Bv9ARM.ch05.html revision 4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
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 - 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<!-- $Id: Bv9ARM.ch05.html,v 1.79 2009/07/11 01:12:46 tbox Exp $ -->
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<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<tr><th colspan="3" align="center">Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</th></tr>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<a accesskey="p" href="Bv9ARM.ch04.html">Prev</a>�</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch06.html">Next</a>
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>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch05.html#id2572454">The Lightweight Resolver Library</a></span></dt>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<dt><span class="sect1"><a href="Bv9ARM.ch05.html#lwresd">Running a Resolver Daemon</a></span></dt>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<div class="titlepage"><div><div><h2 class="title" style="clear: both">
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User<a name="id2572454"></a>The Lightweight Resolver Library</h2></div></div></div>
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 IPv6 once introduced new complexity into the resolution process,
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews such as following A6 chains and DNAME records, and simultaneous
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein lookup of IPv4 and IPv6 addresses. Though most of the complexity was
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein then removed, these are hard or impossible
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to implement in a traditional stub resolver.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <acronym class="acronym">BIND</acronym> 9 therefore can also provide resolution
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein services to local clients
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein using a combination of a lightweight resolver library and a resolver
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User daemon process running on the local host. These communicate using
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein a simple UDP-based protocol, the "lightweight resolver protocol"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User that is distinct from and simpler than the full DNS protocol.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<div class="titlepage"><div><div><h2 class="title" style="clear: both">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<a name="lwresd"></a>Running a Resolver Daemon</h2></div></div></div>
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews To use the lightweight resolver interface, the system must
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews run the resolver daemon <span><strong class="command">lwresd</strong></span> or a
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User name server configured with a <span><strong class="command">lwres</strong></span>
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User By default, applications using the lightweight resolver library will
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews address can be overridden by <span><strong class="command">lwserver</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The daemon currently only looks in the DNS, but in the future
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater it may use other sources such as <code class="filename">/etc/hosts</code>,
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater The <span><strong class="command">lwresd</strong></span> daemon is essentially a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein caching-only name server that responds to requests using the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein resolver protocol rather than the DNS protocol. Because it needs
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater to run on each host, it is designed to require no or minimal
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein configuration.
bea931e17b7567f09107f93ab7e25c7f00abeb9cMark Andrews Unless configured otherwise, it uses the name servers listed on
bea931e17b7567f09107f93ab7e25c7f00abeb9cMark Andrews <span><strong class="command">nameserver</strong></span> lines in <code class="filename">/etc/resolv.conf</code>
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews as forwarders, but is also capable of doing the resolution
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein autonomously if
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein none are specified.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User The <span><strong class="command">lwresd</strong></span> daemon may also be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein configured with a
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User <code class="filename">named.conf</code> style configuration file,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <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>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<a accesskey="p" href="Bv9ARM.ch04.html">Prev</a>�</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td width="40%" align="right">�<a accesskey="n" href="Bv9ARM.ch06.html">Next</a>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td width="40%" align="left" valign="top">Chapter�4.�Advanced DNS Features�</td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<td width="40%" align="right" valign="top">�Chapter�6.�<acronym class="acronym">BIND</acronym> 9 Configuration Reference</td>