Bv9ARM.ch05.html revision ea94d370123a5892f6c47a97f21d1b28d44bb168
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
c8175ece69d986ccd0671bc4d2571b247dfae177Automatic Updater - Copyright (C) 2000-2003 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - Permission to use, copy, modify, and/or 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$ -->
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#id2573017">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="id2573017"></a>The Lightweight Resolver Library</h2></div></div></div>
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews Traditionally applications have been linked with a stub resolver
12a3ab37fe6556406acdf92fc7c5f198d603ca2eMark Andrews library that sends recursive DNS queries to a local caching name
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews IPv6 once introduced new complexity into the resolution process,
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley 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.
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence <acronym class="acronym">BIND</acronym> 9 therefore can also provide resolution
596912ee9ca8eb14d30707ec286ab5d28bd39b3eMark Andrews services to local clients
8319af16557b81eba3277ee67215285f0823b587Mark Andrews using a combination of a lightweight resolver library and a resolver
8319af16557b81eba3277ee67215285f0823b587Mark Andrews daemon process running on the local host. These communicate using
aee5e9cbacd8f88325840b8a498876f4319b0890Mark Andrews a simple UDP-based protocol, the "lightweight resolver protocol"
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence that is distinct from and simpler than the full DNS protocol.
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence<div class="titlepage"><div><div><h2 class="title" style="clear: both">
c32b87bc54abacf95fb3b063d72b7d1855c1643bMichael Graff<a name="lwresd"></a>Running a Resolver Daemon</h2></div></div></div>
460b427411b72da26b1836b9424e2e70d65d9394David 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
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence name server configured with a <span><strong class="command">lwres</strong></span>
2320f230995995595438a9d9301d84931fd266ceMark Andrews By default, applications using the lightweight resolver library will
620a452ebe92fff63e85c5930a6e6dc8d9455918Mark Andrews UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
6dcb47e37f9f0cdb94bdabc3fa157ff07983c590Mark Andrews 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.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley 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
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence server may also
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence 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>