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