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