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