Bv9ARM.ch05.html revision 5347c0fcb04eaea19d9f39795646239f487c6207
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<!--
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - Copyright (C) 2000-2015 Internet Systems Consortium, Inc. ("ISC")
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - This Source Code Form is subject to the terms of the Mozilla Public
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - License, v. 2.0. If a copy of the MPL was not distributed with this
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - file, You can obtain one at http://mozilla.org/MPL/2.0/.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte-->
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<html>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<head>
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>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<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">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<link rel="next" href="Bv9ARM.ch06.html" title="Chapter�6.�BIND 9 Configuration Reference">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte</head>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<div class="navheader">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<table width="100%" summary="Navigation header">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<tr><th colspan="3" align="center">Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</th></tr>
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang<tr>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<td width="20%" align="left">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<a accesskey="p" href="Bv9ARM.ch04.html">Prev</a>�</td>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<th width="60%" align="center">�</th>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch06.html">Next</a>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte</td>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte</tr>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte</table>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<hr>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte</div>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<div class="chapter">
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang<div class="titlepage"><div><div><h1 class="title">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<a name="Bv9ARM.ch05"></a>Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</h1></div></div></div>
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang<div class="toc">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<p><b>Table of Contents</b></p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<dl class="toc">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<dt><span class="section"><a href="Bv9ARM.ch05.html#lightweight_resolver">The Lightweight Resolver Library</a></span></dt>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<dt><span class="section"><a href="Bv9ARM.ch05.html#lwresd">Running a Resolver Daemon</a></span></dt>
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang</dl>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte</div>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<div class="section">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<div class="titlepage"><div><div><h2 class="title" style="clear: both">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<a name="lightweight_resolver"></a>The Lightweight Resolver Library</h2></div></div></div>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<p>
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 server.
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang </p>
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang<p>
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang 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
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang to implement in a traditional stub resolver.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<p>
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
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang daemon process running on the local host. These communicate using
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte a simple UDP-based protocol, the "lightweight resolver protocol"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte that is distinct from and simpler than the full DNS protocol.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte</div>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<div class="section">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<div class="titlepage"><div><div><h2 class="title" style="clear: both">
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<a name="lwresd"></a>Running a Resolver Daemon</h2></div></div></div>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte To use the lightweight resolver interface, the system must
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte run the resolver daemon <span class="command"><strong>lwresd</strong></span> or a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte local
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte name server configured with a <span class="command"><strong>lwres</strong></span>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte statement.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte By default, applications using the lightweight resolver library will
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte make
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte The
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte address can be overridden by <span class="command"><strong>lwserver</strong></span>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte lines in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <code class="filename">/etc/resolv.conf</code>.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<p>
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 NIS, etc.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<p>
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang The <span class="command"><strong>lwresd</strong></span> daemon is essentially a
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang caching-only name server that responds to requests using the
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang lightweight
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 class="command"><strong>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 </p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<p>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte The <span class="command"><strong>lwresd</strong></span> daemon may also be
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte configured with a
<code class="filename">named.conf</code> style configuration file,
in
<code class="filename">/etc/lwresd.conf</code> by default. A name
server may also
be configured to act as a lightweight resolver daemon using the
<span class="command"><strong>lwres</strong></span> statement in <code class="filename">named.conf</code>.
</p>
<p>
The number of client queries that the <span class="command"><strong>lwresd</strong></span>
daemon is able to serve can be set using the
<code class="option">lwres-tasks</code> and <code class="option">lwres-clients</code>
statements in the configuration.
</p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="Bv9ARM.ch04.html">Prev</a>�</td>
<td width="20%" align="center">�</td>
<td width="40%" align="right">�<a accesskey="n" href="Bv9ARM.ch06.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter�4.�Advanced DNS Features�</td>
<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
<td width="40%" align="right" valign="top">�Chapter�6.�<acronym class="acronym">BIND</acronym> 9 Configuration Reference</td>
</tr>
</table>
</div>
<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.11.0b2</p>
</body>
</html>