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