2 - Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000-2003 Internet Software Consortium.
5 - Permission to use, copy, modify, and/or distribute this software for any
6 - purpose with or without fee is hereby granted, provided that the above
7 - copyright notice and this permission notice appear in all copies.
9 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 - PERFORMANCE OF THIS SOFTWARE.
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
22 <link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
23 <link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
24 <link rel="prev" href="man.named.conf.html" title="named.conf">
25 <link rel="next" href="man.named-journalprint.html" title="named-journalprint">
27 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
28 <div class="navheader">
29 <table width="100%" summary="Navigation header">
30 <tr><th colspan="3" align="center"><span class="application">lwresd</span></th></tr>
32 <td width="20%" align="left">
33 <a accesskey="p" href="man.named.conf.html">Prev</a> </td>
34 <th width="60%" align="center">Manual pages</th>
35 <td width="20%" align="right"> <a accesskey="n" href="man.named-journalprint.html">Next</a>
41 <div class="refentry">
42 <a name="man.lwresd"></a><div class="titlepage"></div>
43 <div class="refnamediv">
45 <p><span class="application">lwresd</span> — lightweight resolver daemon</p>
47 <div class="refsynopsisdiv">
49 <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>
51 <div class="refsection">
52 <a name="id-1.14.18.7"></a><h2>DESCRIPTION</h2>
53 <p><span class="command"><strong>lwresd</strong></span>
54 is the daemon providing name lookup
55 services to clients that use the BIND 9 lightweight resolver
56 library. It is essentially a stripped-down, caching-only name
57 server that answers queries using the BIND 9 lightweight
58 resolver protocol rather than the DNS protocol.
60 <p><span class="command"><strong>lwresd</strong></span>
61 listens for resolver queries on a
62 UDP port on the IPv4 loopback interface, 127.0.0.1. This
63 means that <span class="command"><strong>lwresd</strong></span> can only be used by
64 processes running on the local machine. By default, UDP port
65 number 921 is used for lightweight resolver requests and
69 Incoming lightweight resolver requests are decoded by the
70 server which then resolves them using the DNS protocol. When
71 the DNS lookup completes, <span class="command"><strong>lwresd</strong></span> encodes
72 the answers in the lightweight resolver format and returns
73 them to the client that made the request.
76 If <code class="filename">/etc/resolv.conf</code> contains any
77 <code class="option">nameserver</code> entries, <span class="command"><strong>lwresd</strong></span>
78 sends recursive DNS queries to those servers. This is similar
79 to the use of forwarders in a caching name server. If no
80 <code class="option">nameserver</code> entries are present, or if
81 forwarding fails, <span class="command"><strong>lwresd</strong></span> resolves the
82 queries autonomously starting at the root name servers, using
83 a built-in list of root server hints.
86 <div class="refsection">
87 <a name="id-1.14.18.8"></a><h2>OPTIONS</h2>
88 <div class="variablelist"><dl class="variablelist">
89 <dt><span class="term">-4</span></dt>
91 Use IPv4 only even if the host machine is capable of IPv6.
92 <code class="option">-4</code> and <code class="option">-6</code> are mutually
95 <dt><span class="term">-6</span></dt>
97 Use IPv6 only even if the host machine is capable of IPv4.
98 <code class="option">-4</code> and <code class="option">-6</code> are mutually
101 <dt><span class="term">-c <em class="replaceable"><code>config-file</code></em></span></dt>
103 Use <em class="replaceable"><code>config-file</code></em> as the
104 configuration file instead of the default,
105 <code class="filename">/etc/lwresd.conf</code>.
107 <code class="option">-c</code> can not be used with <code class="option">-C</code>.
109 <dt><span class="term">-C <em class="replaceable"><code>config-file</code></em></span></dt>
111 Use <em class="replaceable"><code>config-file</code></em> as the
112 configuration file instead of the default,
113 <code class="filename">/etc/resolv.conf</code>.
114 <code class="option">-C</code> can not be used with <code class="option">-c</code>.
116 <dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
118 Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
119 Debugging traces from <span class="command"><strong>lwresd</strong></span> become
120 more verbose as the debug level increases.
122 <dt><span class="term">-f</span></dt>
124 Run the server in the foreground (i.e. do not daemonize).
126 <dt><span class="term">-g</span></dt>
128 Run the server in the foreground and force all logging
129 to <code class="filename">stderr</code>.
131 <dt><span class="term">-i <em class="replaceable"><code>pid-file</code></em></span></dt>
133 Use <em class="replaceable"><code>pid-file</code></em> as the
134 PID file instead of the default,
135 <code class="filename">/var/run/lwresd/lwresd.pid</code>.
137 <dt><span class="term">-m <em class="replaceable"><code>flag</code></em></span></dt>
139 Turn on memory usage debugging flags. Possible flags are
140 <em class="replaceable"><code>usage</code></em>,
141 <em class="replaceable"><code>trace</code></em>,
142 <em class="replaceable"><code>record</code></em>,
143 <em class="replaceable"><code>size</code></em>, and
144 <em class="replaceable"><code>mctx</code></em>.
145 These correspond to the ISC_MEM_DEBUGXXXX flags described in
146 <code class="filename"><isc/mem.h></code>.
148 <dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
150 Create <em class="replaceable"><code>#cpus</code></em> worker threads
151 to take advantage of multiple CPUs. If not specified,
152 <span class="command"><strong>lwresd</strong></span> will try to determine the
153 number of CPUs present and create one thread per CPU.
154 If it is unable to determine the number of CPUs, a
155 single worker thread will be created.
157 <dt><span class="term">-P <em class="replaceable"><code>port</code></em></span></dt>
159 Listen for lightweight resolver queries on port
160 <em class="replaceable"><code>port</code></em>. If
161 not specified, the default is port 921.
163 <dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
165 Send DNS lookups to port <em class="replaceable"><code>port</code></em>. If not
166 specified, the default is port 53. This provides a
167 way of testing the lightweight resolver daemon with a
168 name server that listens for queries on a non-standard
171 <dt><span class="term">-s</span></dt>
174 Write memory usage statistics to <code class="filename">stdout</code>
177 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
178 <h3 class="title">Note</h3>
180 This option is mainly of interest to BIND 9 developers
181 and may be removed or changed in a future release.
185 <dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
188 to <em class="replaceable"><code>directory</code></em> after
189 processing the command line arguments, but before
190 reading the configuration file.
192 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
193 <h3 class="title">Warning</h3>
195 This option should be used in conjunction with the
196 <code class="option">-u</code> option, as chrooting a process
197 running as root doesn't enhance security on most
198 systems; the way <code class="function">chroot(2)</code> is
199 defined allows a process with root privileges to
200 escape a chroot jail.
204 <dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
206 to <em class="replaceable"><code>user</code></em> after completing
207 privileged operations, such as creating sockets that
208 listen on privileged ports.
210 <dt><span class="term">-v</span></dt>
212 Report the version number and exit.
216 <div class="refsection">
217 <a name="id-1.14.18.9"></a><h2>FILES</h2>
218 <div class="variablelist"><dl class="variablelist">
219 <dt><span class="term"><code class="filename">/etc/resolv.conf</code></span></dt>
221 The default configuration file.
223 <dt><span class="term"><code class="filename">/var/run/lwresd.pid</code></span></dt>
225 The default process-id file.
229 <div class="refsection">
230 <a name="id-1.14.18.10"></a><h2>SEE ALSO</h2>
231 <p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
232 <span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
233 <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
237 <div class="navfooter">
239 <table width="100%" summary="Navigation footer">
241 <td width="40%" align="left">
242 <a accesskey="p" href="man.named.conf.html">Prev</a> </td>
243 <td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
244 <td width="40%" align="right"> <a accesskey="n" href="man.named-journalprint.html">Next</a>
248 <td width="40%" align="left" valign="top">
249 <code class="filename">named.conf</code> </td>
250 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
251 <td width="40%" align="right" valign="top"> <span class="application">named-journalprint</span>
256 <p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.9.9-P4 (Extended Support Version)</p>