man.lwresd.html revision 5347c0fcb04eaea19d9f39795646239f487c6207
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley - Copyright (C) 2000-2015 Internet Systems Consortium, Inc. ("ISC")
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley - This Source Code Form is subject to the terms of the Mozilla Public
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley - License, v. 2.0. If a copy of the MPL was not distributed with this
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley - file, You can obtain one at http://mozilla.org/MPL/2.0/.
15a44745412679c30a6d022733925af70a38b715David Lawrence<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
15a44745412679c30a6d022733925af70a38b715David Lawrence<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
15a44745412679c30a6d022733925af70a38b715David Lawrence<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
15a44745412679c30a6d022733925af70a38b715David Lawrence<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
15a44745412679c30a6d022733925af70a38b715David Lawrence<link rel="prev" href="man.dnssec-verify.html" title="dnssec-verify">
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<link rel="next" href="man.named.html" title="named">
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<tr><th colspan="3" align="center"><span class="application">lwresd</span></th></tr>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<a accesskey="p" href="man.dnssec-verify.html">Prev</a>�</td>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<td width="20%" align="right">�<a accesskey="n" href="man.named.html">Next</a>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<a name="man.lwresd"></a><div class="titlepage"></div>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<p><span class="application">lwresd</span> — lightweight resolver daemon</p>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<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>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<p><span class="command"><strong>lwresd</strong></span>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence is the daemon providing name lookup
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley services to clients that use the BIND 9 lightweight resolver
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley library. It is essentially a stripped-down, caching-only name
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley server that answers queries using the BIND 9 lightweight
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley resolver protocol rather than the DNS protocol.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<p><span class="command"><strong>lwresd</strong></span>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley listens for resolver queries on a
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley UDP port on the IPv4 loopback interface, 127.0.0.1. This
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley means that <span class="command"><strong>lwresd</strong></span> can only be used by
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley processes running on the local machine. By default, UDP port
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley number 921 is used for lightweight resolver requests and
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Incoming lightweight resolver requests are decoded by the
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley server which then resolves them using the DNS protocol. When
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley the DNS lookup completes, <span class="command"><strong>lwresd</strong></span> encodes
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley the answers in the lightweight resolver format and returns
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley them to the client that made the request.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley If <code class="filename">/etc/resolv.conf</code> contains any
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <code class="option">nameserver</code> entries, <span class="command"><strong>lwresd</strong></span>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley sends recursive DNS queries to those servers. This is similar
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley to the use of forwarders in a caching name server. If no
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <code class="option">nameserver</code> entries are present, or if
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley forwarding fails, <span class="command"><strong>lwresd</strong></span> resolves the
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley queries autonomously starting at the root name servers, using
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley a built-in list of root server hints.
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff<div class="variablelist"><dl class="variablelist">
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff Use IPv4 only even if the host machine is capable of IPv6.
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff <code class="option">-4</code> and <code class="option">-6</code> are mutually
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Use IPv6 only even if the host machine is capable of IPv4.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <code class="option">-4</code> and <code class="option">-6</code> are mutually
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term">-c <em class="replaceable"><code>config-file</code></em></span></dt>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Use <em class="replaceable"><code>config-file</code></em> as the
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley configuration file instead of the default,
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <code class="option">-c</code> can not be used with <code class="option">-C</code>.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term">-C <em class="replaceable"><code>config-file</code></em></span></dt>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Use <em class="replaceable"><code>config-file</code></em> as the
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley configuration file instead of the default,
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <code class="option">-C</code> can not be used with <code class="option">-c</code>.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Debugging traces from <span class="command"><strong>lwresd</strong></span> become
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley more verbose as the debug level increases.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Run the server in the foreground (i.e. do not daemonize).
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Run the server in the foreground and force all logging
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term">-i <em class="replaceable"><code>pid-file</code></em></span></dt>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Use <em class="replaceable"><code>pid-file</code></em> as the
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley PID file instead of the default,
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff <code class="filename">/var/run/lwresd/lwresd.pid</code>.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term">-m <em class="replaceable"><code>flag</code></em></span></dt>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Turn on memory usage debugging flags. Possible flags are
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <em class="replaceable"><code>record</code></em>,
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <em class="replaceable"><code>size</code></em>, and
c1a2cfef7f9156ffd15ded6cca6429a174319cc1Michael Graff <em class="replaceable"><code>mctx</code></em>.
c1a2cfef7f9156ffd15ded6cca6429a174319cc1Michael Graff These correspond to the ISC_MEM_DEBUGXXXX flags described in
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff Create <em class="replaceable"><code>#cpus</code></em> worker threads
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley to take advantage of multiple CPUs. If not specified,
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley <span class="command"><strong>lwresd</strong></span> will try to determine the
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley number of CPUs present and create one thread per CPU.
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley If it is unable to determine the number of CPUs, a
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley single worker thread will be created.
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley<dt><span class="term">-P <em class="replaceable"><code>port</code></em></span></dt>
c1a2cfef7f9156ffd15ded6cca6429a174319cc1Michael Graff Listen for lightweight resolver queries on port
c1a2cfef7f9156ffd15ded6cca6429a174319cc1Michael Graff <em class="replaceable"><code>port</code></em>. If
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley not specified, the default is port 921.
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff Send DNS lookups to port <em class="replaceable"><code>port</code></em>. If not
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley specified, the default is port 53. This provides a
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley way of testing the lightweight resolver daemon with a
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley name server that listens for queries on a non-standard
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley port number.
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley Write memory usage statistics to <code class="filename">stdout</code>
c1a2cfef7f9156ffd15ded6cca6429a174319cc1Michael Graff<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley This option is mainly of interest to BIND 9 developers
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley and may be removed or changed in a future release.
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley to <em class="replaceable"><code>directory</code></em> after
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley processing the command line arguments, but before
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley reading the configuration file.
c1a2cfef7f9156ffd15ded6cca6429a174319cc1Michael Graff<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley This option should be used in conjunction with the
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley <code class="option">-u</code> option, as chrooting a process
065273f52a2da0caa45123c70c6eeef4a7be7337Bob Halley running as root doesn't enhance security on most
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff systems; the way <code class="function">chroot(2)</code> is
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley defined allows a process with root privileges to
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley escape a chroot jail.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley to <em class="replaceable"><code>user</code></em> after completing
c1a2cfef7f9156ffd15ded6cca6429a174319cc1Michael Graff privileged operations, such as creating sockets that
c1a2cfef7f9156ffd15ded6cca6429a174319cc1Michael Graff listen on privileged ports.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley Report the version number and exit.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<div class="variablelist"><dl class="variablelist">
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term"><code class="filename">/etc/resolv.conf</code></span></dt>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley The default configuration file.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<dt><span class="term"><code class="filename">/var/run/lwresd.pid</code></span></dt>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley The default process-id file.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<a accesskey="p" href="man.dnssec-verify.html">Prev</a>�</td>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<td width="40%" align="right">�<a accesskey="n" href="man.named.html">Next</a>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<span class="application">dnssec-verify</span>�</td>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<td width="40%" align="right" valign="top">�<span class="application">named</span>
dbef4f7fb77908f76dc5e4d9e20c184388d4610aBob Halley<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.11.0b2</p>