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