Bv9ARM.ch05.html revision 32098293b78922a5fbd10906afa28624820d3756
fa9e4066f08beec538e775443c5be79dd423fcabahrens<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
fa9e4066f08beec538e775443c5be79dd423fcabahrens - Copyright (C) 2000-2017 Internet Systems Consortium, Inc. ("ISC")
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock - This Source Code Form is subject to the terms of the Mozilla Public
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock - License, v. 2.0. If a copy of the MPL was not distributed with this
fa9e4066f08beec538e775443c5be79dd423fcabahrens - file, You can obtain one at http://mozilla.org/MPL/2.0/.
fa9e4066f08beec538e775443c5be79dd423fcabahrens<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<title>Chapter�5.�The BIND 9 Lightweight Resolver</title>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<link rel="prev" href="Bv9ARM.ch04.html" title="Chapter�4.�Advanced DNS Features">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<link rel="next" href="Bv9ARM.ch06.html" title="Chapter�6.�BIND 9 Configuration Reference">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
e6032be1b8a5a1d03081e0d62b624db95c4cf8b7marks<tr><th colspan="3" align="center">Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</th></tr>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<a accesskey="p" href="Bv9ARM.ch04.html">Prev</a>�</td>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch06.html">Next</a>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<a name="Bv9ARM.ch05"></a>Chapter�5.�The <acronym class="acronym">BIND</acronym> 9 Lightweight Resolver</h1></div></div></div>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<dt><span class="section"><a href="Bv9ARM.ch05.html#lightweight_resolver">The Lightweight Resolver Library</a></span></dt>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<dt><span class="section"><a href="Bv9ARM.ch05.html#lwresd">Running a Resolver Daemon</a></span></dt>
fa9e4066f08beec538e775443c5be79dd423fcabahrens<div class="titlepage"><div><div><h2 class="title" style="clear: both">
fa9e4066f08beec538e775443c5be79dd423fcabahrens<a name="lightweight_resolver"></a>The Lightweight Resolver Library</h2></div></div></div>
fa9e4066f08beec538e775443c5be79dd423fcabahrens Traditionally applications have been linked with a stub resolver
fa9e4066f08beec538e775443c5be79dd423fcabahrens library that sends recursive DNS queries to a local caching name
fa9e4066f08beec538e775443c5be79dd423fcabahrens IPv6 once introduced new complexity into the resolution process,
fa9e4066f08beec538e775443c5be79dd423fcabahrens such as following A6 chains and DNAME records, and simultaneous
fa9e4066f08beec538e775443c5be79dd423fcabahrens lookup of IPv4 and IPv6 addresses. Though most of the complexity was
fa9e4066f08beec538e775443c5be79dd423fcabahrens then removed, these are hard or impossible
fa9e4066f08beec538e775443c5be79dd423fcabahrens to implement in a traditional stub resolver.
fa9e4066f08beec538e775443c5be79dd423fcabahrens <acronym class="acronym">BIND</acronym> 9 therefore can also provide resolution
fa9e4066f08beec538e775443c5be79dd423fcabahrens services to local clients
fa9e4066f08beec538e775443c5be79dd423fcabahrens using a combination of a lightweight resolver library and a resolver
fa9e4066f08beec538e775443c5be79dd423fcabahrens daemon process running on the local host. These communicate using
fa9e4066f08beec538e775443c5be79dd423fcabahrens a simple UDP-based protocol, the "lightweight resolver protocol"
fa9e4066f08beec538e775443c5be79dd423fcabahrens that is distinct from and simpler than the full DNS protocol.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw<div class="titlepage"><div><div><h2 class="title" style="clear: both">
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw<a name="lwresd"></a>Running a Resolver Daemon</h2></div></div></div>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw To use the lightweight resolver interface, the system must
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw run the resolver daemon <span class="command"><strong>lwresd</strong></span> or a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw name server configured with a <span class="command"><strong>lwres</strong></span>
fa9e4066f08beec538e775443c5be79dd423fcabahrens By default, applications using the lightweight resolver library will
fa9e4066f08beec538e775443c5be79dd423fcabahrens UDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw address can be overridden by <span class="command"><strong>lwserver</strong></span>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw The daemon currently only looks in the DNS, but in the future
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw it may use other sources such as <code class="filename">/etc/hosts</code>,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw The <span class="command"><strong>lwresd</strong></span> daemon is essentially a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw caching-only name server that responds to requests using the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw lightweight
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw resolver protocol rather than the DNS protocol. Because it needs
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw to run on each host, it is designed to require no or minimal
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw configuration.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw Unless configured otherwise, it uses the name servers listed on
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <span class="command"><strong>nameserver</strong></span> lines in <code class="filename">/etc/resolv.conf</code>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw as forwarders, but is also capable of doing the resolution
fa9e4066f08beec538e775443c5be79dd423fcabahrens autonomously if
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw none are specified.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw The <span class="command"><strong>lwresd</strong></span> daemon may also be
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw configured with a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <code class="filename">named.conf</code> style configuration file,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <code class="filename">/etc/lwresd.conf</code> by default. A name
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw server may also
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw be configured to act as a lightweight resolver daemon using the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <span class="command"><strong>lwres</strong></span> statement in <code class="filename">named.conf</code>.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw The number of client queries that the <span class="command"><strong>lwresd</strong></span>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw daemon is able to serve can be set using the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw <code class="option">lwres-tasks</code> and <code class="option">lwres-clients</code>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw statements in the configuration.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw<td width="40%" align="right">�<a accesskey="n" href="Bv9ARM.ch06.html">Next</a>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw<td width="40%" align="left" valign="top">Chapter�4.�Advanced DNS Features�</td>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw<td width="40%" align="right" valign="top">�Chapter�6.�<acronym class="acronym">BIND</acronym> 9 Configuration Reference</td>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.11.2b1</p>