man.lwresd.html revision 903596730995d4a0a7c3cc76119c9cf240a4c4fc
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen - Copyright (C) 2000-2015 Internet Systems Consortium, Inc. ("ISC")
d1fff80640050631b06bfab904a34b2ad24601e8Timo Sirainen - This Source Code Form is subject to the terms of the Mozilla Public
47e9fdee55c2074425cf0316f4f64fbbb790301cTimo Sirainen - License, v. 2.0. If a copy of the MPL was not distributed with this
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen - file, You can obtain one at http://mozilla.org/MPL/2.0/.
47e9fdee55c2074425cf0316f4f64fbbb790301cTimo Sirainen<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
3e564425db51f3921ce4de11859777135fdedd15Timo Sirainen<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
3e564425db51f3921ce4de11859777135fdedd15Timo Sirainen<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
3e564425db51f3921ce4de11859777135fdedd15Timo Sirainen<link rel="prev" href="man.dnssec-verify.html" title="dnssec-verify">
3e564425db51f3921ce4de11859777135fdedd15Timo Sirainen<link rel="next" href="man.named.html" title="named">
1b04762685272a53643ac2179939537a44c7c044Timo Sirainen<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
02a6291366caff79793db35d479e2a062bec2af4Timo Sirainen<table width="100%" summary="Navigation header">
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen<tr><th colspan="3" align="center"><span class="application">lwresd</span></th></tr>
95d9395d15540b3a96f75c7f9fd73e6d8ad5e897Timo Sirainen<a accesskey="p" href="man.dnssec-verify.html">Prev</a>�</td>
95d9395d15540b3a96f75c7f9fd73e6d8ad5e897Timo Sirainen<th width="60%" align="center">Manual pages</th>
8f5b34c22e4c3bfb35ca13c4744867eb5ddbd3d6Timo Sirainen<td width="20%" align="right">�<a accesskey="n" href="man.named.html">Next</a>
303e375b7e76278f4ec541f49af0476d3e4ee710Timo Sirainen<a name="man.lwresd"></a><div class="titlepage"></div>
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen<p><span class="application">lwresd</span> — lightweight resolver daemon</p>
d2729522f8b4754b66be7e16548ede39b033fb04Timo Sirainen<div class="cmdsynopsis"><p><code class="command">lwresd</code> [<code class="option">-c <em class="replaceable"><code>config-file</code></em></code>] [<code class="option">-C <em class="replaceable"><code>config-file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>debug-level</code></em></code>] [<code class="option">-f</code>] [<code class="option">-g</code>] [<code class="option">-i <em class="replaceable"><code>pid-file</code></em></code>] [<code class="option">-m <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-n <em class="replaceable"><code>#cpus</code></em></code>] [<code class="option">-P <em class="replaceable"><code>port</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port</code></em></code>] [<code class="option">-s</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-u <em class="replaceable"><code>user</code></em></code>] [<code class="option">-v</code>] [<code class="option">-4</code>] [<code class="option">-6</code>]</p></div>
d1fff80640050631b06bfab904a34b2ad24601e8Timo Sirainen<a name="id-1.14.18.7"></a><h2>DESCRIPTION</h2>
1959accd3886d99efccd9f98247f21e8fd54da66Timo Sirainen<p><span class="command"><strong>lwresd</strong></span>
b55f914c0ade77252cfd798ea8eb9a84bda56315Timo Sirainen is the daemon providing name lookup
1959accd3886d99efccd9f98247f21e8fd54da66Timo Sirainen services to clients that use the BIND 9 lightweight resolver
1959accd3886d99efccd9f98247f21e8fd54da66Timo Sirainen library. It is essentially a stripped-down, caching-only name
1959accd3886d99efccd9f98247f21e8fd54da66Timo Sirainen server that answers queries using the BIND 9 lightweight
a020eb653b2620a989e4795adceb6136037327b2Timo Sirainen resolver protocol rather than the DNS protocol.
a020eb653b2620a989e4795adceb6136037327b2Timo Sirainen<p><span class="command"><strong>lwresd</strong></span>
a020eb653b2620a989e4795adceb6136037327b2Timo Sirainen listens for resolver queries on a
d1fff80640050631b06bfab904a34b2ad24601e8Timo Sirainen UDP port on the IPv4 loopback interface, 127.0.0.1. This
009217abb57a24a4076092e8e4e165545747839eStephan Bosch means that <span class="command"><strong>lwresd</strong></span> can only be used by
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen processes running on the local machine. By default, UDP port
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen number 921 is used for lightweight resolver requests and
b9b841558c5f91db7f5fc71c0ac62aad1bbf6418Timo Sirainen Incoming lightweight resolver requests are decoded by the
b9b841558c5f91db7f5fc71c0ac62aad1bbf6418Timo Sirainen server which then resolves them using the DNS protocol. When
762e17079d29d9f1838114ff5fec9ceaba8eb6a8Timo Sirainen the DNS lookup completes, <span class="command"><strong>lwresd</strong></span> encodes
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen the answers in the lightweight resolver format and returns
11120acd01d43973cd504952d691a2ae1c546ee2Timo Sirainen them to the client that made the request.
211caf3c233d562b0c8137e5eefae3cb1ef13003Stephan Bosch If <code class="filename">/etc/resolv.conf</code> contains any
211caf3c233d562b0c8137e5eefae3cb1ef13003Stephan Bosch <code class="option">nameserver</code> entries, <span class="command"><strong>lwresd</strong></span>
211caf3c233d562b0c8137e5eefae3cb1ef13003Stephan Bosch sends recursive DNS queries to those servers. This is similar
d1fff80640050631b06bfab904a34b2ad24601e8Timo Sirainen to the use of forwarders in a caching name server. If no
d1fff80640050631b06bfab904a34b2ad24601e8Timo Sirainen <code class="option">nameserver</code> entries are present, or if
38f227941bcf673e0e523c1ac7267bca9cbcd2c4Timo Sirainen forwarding fails, <span class="command"><strong>lwresd</strong></span> resolves the
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen queries autonomously starting at the root name servers, using
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen a built-in list of root server hints.
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen<div class="variablelist"><dl class="variablelist">
50b9773bebe5c66485728e21e4da6e99db388c92Timo Sirainen Use IPv4 only even if the host machine is capable of IPv6.
2fb9ae42f9e36388ec6db24188b9108434043fd0Timo Sirainen <code class="option">-4</code> and <code class="option">-6</code> are mutually
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4Timo Sirainen Use IPv6 only even if the host machine is capable of IPv4.
97180ea9c26c4de0807daaad21e03c80643b09fdTimo Sirainen <code class="option">-4</code> and <code class="option">-6</code> are mutually
97180ea9c26c4de0807daaad21e03c80643b09fdTimo Sirainen<dt><span class="term">-c <em class="replaceable"><code>config-file</code></em></span></dt>
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4Timo Sirainen Use <em class="replaceable"><code>config-file</code></em> as the
57ff998a443881c8959a8e65f6325cf19fefc1d0Timo Sirainen configuration file instead of the default,
6dc2060d6e0261e4bfd453f1eb1c165cc8d905c1Timo Sirainen <code class="filename">/etc/lwresd.conf</code>.
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen <code class="option">-c</code> can not be used with <code class="option">-C</code>.
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen<dt><span class="term">-C <em class="replaceable"><code>config-file</code></em></span></dt>
3482fee0e3733456512ba110780824e6daa7ff9fTimo Sirainen Use <em class="replaceable"><code>config-file</code></em> as the
3482fee0e3733456512ba110780824e6daa7ff9fTimo Sirainen configuration file instead of the default,
3482fee0e3733456512ba110780824e6daa7ff9fTimo Sirainen <code class="filename">/etc/resolv.conf</code>.
3b22894b8805b186c73d8b754001e8d7e944be85Timo Sirainen <code class="option">-C</code> can not be used with <code class="option">-c</code>.
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen<dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
61d3fd14828b68d789f3df73d1dbed56e37b7931Timo Sirainen Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
2092da86f3a332e8d7eae1300a3b9852fed8f2f8Sergey Kitov Debugging traces from <span class="command"><strong>lwresd</strong></span> become
2092da86f3a332e8d7eae1300a3b9852fed8f2f8Sergey Kitov more verbose as the debug level increases.
2092da86f3a332e8d7eae1300a3b9852fed8f2f8Sergey Kitov Run the server in the foreground (i.e. do not daemonize).
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen Run the server in the foreground and force all logging
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen<dt><span class="term">-i <em class="replaceable"><code>pid-file</code></em></span></dt>
d1bf4ae66b8bf3b9e28df1823d6d4adda2b923b6Timo Sirainen Use <em class="replaceable"><code>pid-file</code></em> as the
d1bf4ae66b8bf3b9e28df1823d6d4adda2b923b6Timo Sirainen PID file instead of the default,
4dc81fe17cc3aca2e8e9ccb988f90bae12ca2ad0Timo Sirainen <code class="filename">/var/run/lwresd/lwresd.pid</code>.
a7b9a392af1ee67134ac63435601d6abb819beeeTimo Sirainen<dt><span class="term">-m <em class="replaceable"><code>flag</code></em></span></dt>
55e04e5659b27c520633835d3f04e2eca7f21117Timo Sirainen Turn on memory usage debugging flags. Possible flags are
55e04e5659b27c520633835d3f04e2eca7f21117Timo Sirainen <em class="replaceable"><code>usage</code></em>,
55e04e5659b27c520633835d3f04e2eca7f21117Timo Sirainen <em class="replaceable"><code>trace</code></em>,
fa2433aebcf3fccfa30ca9eed9b1a9166cf92ee2Timo Sirainen <em class="replaceable"><code>record</code></em>,
fa2433aebcf3fccfa30ca9eed9b1a9166cf92ee2Timo Sirainen <em class="replaceable"><code>size</code></em>, and
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen <em class="replaceable"><code>mctx</code></em>.
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen These correspond to the ISC_MEM_DEBUGXXXX flags described in
4da8c6cdefabd31262318c32da3c13de1d9ea953Timo Sirainen <code class="filename"><isc/mem.h></code>.
85779ec11f23eb8efeb8993b1e0b9aad62c4122aTimo Sirainen<dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
85779ec11f23eb8efeb8993b1e0b9aad62c4122aTimo Sirainen Create <em class="replaceable"><code>#cpus</code></em> worker threads
85779ec11f23eb8efeb8993b1e0b9aad62c4122aTimo Sirainen to take advantage of multiple CPUs. If not specified,
85779ec11f23eb8efeb8993b1e0b9aad62c4122aTimo Sirainen <span class="command"><strong>lwresd</strong></span> will try to determine the
85779ec11f23eb8efeb8993b1e0b9aad62c4122aTimo Sirainen number of CPUs present and create one thread per CPU.
85779ec11f23eb8efeb8993b1e0b9aad62c4122aTimo Sirainen If it is unable to determine the number of CPUs, a
85779ec11f23eb8efeb8993b1e0b9aad62c4122aTimo Sirainen single worker thread will be created.
47e9fdee55c2074425cf0316f4f64fbbb790301cTimo Sirainen<dt><span class="term">-P <em class="replaceable"><code>port</code></em></span></dt>
544a946df4de398125bafb51f26d5e3697bde649Timo Sirainen Listen for lightweight resolver queries on port
544a946df4de398125bafb51f26d5e3697bde649Timo Sirainen <em class="replaceable"><code>port</code></em>. If
7e95ba7f38b9b421287d36c6152f8a9e6b9f225bTimo Sirainen not specified, the default is port 921.
608bdb7f008cd5cd332d727018a9e8173abec998Timo Sirainen<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
95dcc0f8e80cc8c9278c904c3cd06dcc4a6d2d33Timo Sirainen Send DNS lookups to port <em class="replaceable"><code>port</code></em>. If not
95dcc0f8e80cc8c9278c904c3cd06dcc4a6d2d33Timo Sirainen specified, the default is port 53. This provides a
30b849c26358317b4e25b19ced4b7deb55f59c0aTimo Sirainen way of testing the lightweight resolver daemon with a
47e9fdee55c2074425cf0316f4f64fbbb790301cTimo Sirainen name server that listens for queries on a non-standard
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen Write memory usage statistics to <code class="filename">stdout</code>
24ff040448e018738515f7bfcc6f1a6e5d08c10dSergey Kitov<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
24ff040448e018738515f7bfcc6f1a6e5d08c10dSergey Kitov This option is mainly of interest to BIND 9 developers
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen and may be removed or changed in a future release.