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