Bv9ARM.5.html revision 40f53fa8d9c6a4fc38c0014495e7a42b08f52481
58042eafd071de078c4f2d8fa69791a86eb58667William King<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">
58042eafd071de078c4f2d8fa69791a86eb58667William King<!--
58042eafd071de078c4f2d8fa69791a86eb58667William King - Copyright (C) 2000 Internet Software Consortium.
58042eafd071de078c4f2d8fa69791a86eb58667William King -
58042eafd071de078c4f2d8fa69791a86eb58667William King - Permission to use, copy, modify, and distribute this software for any
58042eafd071de078c4f2d8fa69791a86eb58667William King - purpose with or without fee is hereby granted, provided that the above
58042eafd071de078c4f2d8fa69791a86eb58667William King - copyright notice and this permission notice appear in all copies.
58042eafd071de078c4f2d8fa69791a86eb58667William King -
58042eafd071de078c4f2d8fa69791a86eb58667William King - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
58042eafd071de078c4f2d8fa69791a86eb58667William King - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
58042eafd071de078c4f2d8fa69791a86eb58667William King - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
58042eafd071de078c4f2d8fa69791a86eb58667William King - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
- FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: Bv9ARM.5.html,v 1.10 2000/08/01 01:17:54 tale Exp $ -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 5.5/HTML Export Filter">
<LINK REL="STYLESHEET" HREF="Bv9ARM.css">
<TITLE> Section 5. The BIND 9 Lightweight Resolver</TITLE></HEAD>
<BODY BGCOLOR="#ffffff">
<OL>
<H1 CLASS="1Level">
<A NAME="pgfId=1001240">
</A>
Section 5. <A NAME="22731">
</A>
The BIND&nbsp;9 Lightweight Resolver</H1>
</OL>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=1001241">
</A>
5.1 The Lightweight Resolver Library</H3>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1001242">
</A>
Traditionally applications have been linked with a stub resolver library that sends recursive DNS queries to a local caching name server.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1001243">
</A>
IPv6 introduces new complexity into the resolution process, such as following A6 chains and DNAME records, and simultaneous lookup of IPv4 and IPv6 addresses. These are hard or impossible to implement in a traditional stub resolver.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1001244">
</A>
Instead, BIND&nbsp;9 provides resolution services to local clients using a combination of a lightweight resolver library and a resolver daemon process running on the local host. These communicate using a simple UDP-based protocol, the &quot;lightweight resolver protocol&quot; that is distinct from and simpler than the full DNS protocol.</P>
</DIV>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=1001245">
</A>
5.2 Running a Resolver Daemon</H3>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1001246">
</A>
To use the lightweight resolver interface, the system must run the resolver daemon <CODE CLASS="Program-Process">
lwresd</CODE>
.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1001247">
</A>
Applications using the lightweight resolver library will make UDP requests to the IPv4 loopback address (127.0.0.1) on port 921. The daemon will try to find the answer to the questions &quot;what are the addresses for host <EM CLASS="URL">
foo.example.com</EM>
?&quot; and &quot;what are the names for IPv4 address 204.152.184.79?&quot;</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1001248">
</A>
The daemon currently only looks in the DNS, but in the future it may use other sources such as <EM CLASS="grammar_literal">
/etc/hosts</EM>
, NIS, etc.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1001249">
</A>
The <CODE CLASS="Program-Process">
lwresd</CODE>
daemon is essentially a stripped-down, caching-only name server that answers requests using the lightweight resolver protocol rather than the DNS protocol. Because it needs to run on each host, it is designed to require no or minimal configuration. It uses the name servers listed on <CODE CLASS="Program-Process">
nameserver</CODE>
lines in <EM CLASS="pathname">
/etc/resolv.conf</EM>
as forwarders, but is also capable of doing the resolution autonomously if none are specified.</P>
</DIV>
<HR ALIGN="center">
<p>Return to <A href="Bv9ARM.html">BIND 9 Administrator Reference Manual</A> table of contents.</p>
</BODY>
</HTML>