Bv9ARM.ch05.html revision 3b2c6af63e0367c6eabe0a21ca23841ca87cd22f
297be3708069ef31814d6d75c0d71a50a78feb03Mark Andrews - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - 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.
922312472e2e05ebc64993d465999c5351b83036Automatic Updater<!-- $Id: Bv9ARM.ch05.html,v 1.83 2009/10/12 23:15:32 tbox Exp $ -->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<title>Chapter�5.�The BIND 9 Lightweight Resolver</title>
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews<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>
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater<div class="titlepage"><div><div><h2 class="title">
297be3708069ef31814d6d75c0d71a50a78feb03Mark Andrews<a name="Bv9ARM.ch05"></a>Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</h2></div></div></div>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="sect1"><a href="Bv9ARM.ch05.html#id2572513">The Lightweight Resolver Library</a></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="sect1"><a href="Bv9ARM.ch05.html#lwresd">Running a Resolver Daemon</a></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<div class="titlepage"><div><div><h2 class="title" style="clear: both">
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater<a name="id2572513"></a>The Lightweight Resolver Library</h2></div></div></div>
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater Traditionally applications have been linked with a stub resolver
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater library that sends recursive DNS queries to a local caching name
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater IPv6 once introduced new complexity into the resolution process,
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater such as following A6 chains and DNAME records, and simultaneous
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater lookup of IPv4 and IPv6 addresses. Though most of the complexity was
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater 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
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater services to local clients
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater using a combination of a lightweight resolver library and a resolver
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater daemon process running on the local host. These communicate using
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater a simple UDP-based protocol, the "lightweight resolver protocol"
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater 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>
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic Updater To use the lightweight resolver interface, the system must
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein run the resolver daemon <span><strong class="command">lwresd</strong></span> or a
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater name server configured with a <span><strong class="command">lwres</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein By default, applications using the lightweight resolver library will
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein address can be overridden by <span><strong class="command">lwserver</strong></span>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater The daemon currently only looks in the DNS, but in the future
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein it may use other sources such as <code class="filename">/etc/hosts</code>,
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater The <span><strong class="command">lwresd</strong></span> daemon is essentially a
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater caching-only name server that responds to requests using the
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater resolver protocol rather than the DNS protocol. Because it needs
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to run on each host, it is designed to require no or minimal
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater configuration.
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater Unless configured otherwise, it uses the name servers listed on
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nameserver</strong></span> lines in <code class="filename">/etc/resolv.conf</code>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein as forwarders, but is also capable of doing the resolution
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater autonomously if
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater none are specified.
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater The <span><strong class="command">lwresd</strong></span> daemon may also be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein configured with a
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater <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
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews be configured to act as a lightweight resolver daemon using the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">lwres</strong></span> statement in <code class="filename">named.conf</code>.
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater<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>
38417cbfb1a328c20b5b723b8584a02c57f88897Automatic Updater<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>