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