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