man.lwresd.html revision f0aad5341752aefe5059832f6cf3abc3283c6e16
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering - Copyright (C) 2000-2016 Internet Systems Consortium, Inc. ("ISC")
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering - This Source Code Form is subject to the terms of the Mozilla Public
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering - License, v. 2.0. If a copy of the MPL was not distributed with this
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering - file, You can obtain one at http://mozilla.org/MPL/2.0/.
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<link rel="prev" href="man.dnssec-verify.html" title="dnssec-verify">
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<link rel="next" href="man.named.html" title="named">
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<table width="100%" summary="Navigation header">
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek<tr><th colspan="3" align="center"><span class="application">lwresd</span></th></tr>
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek<a accesskey="p" href="man.dnssec-verify.html">Prev</a>�</td>
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek<th width="60%" align="center">Manual pages</th>
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering<td width="20%" align="right">�<a accesskey="n" href="man.named.html">Next</a>
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering<a name="man.lwresd"></a><div class="titlepage"></div>
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering<p><span class="application">lwresd</span> — lightweight resolver daemon</p>
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<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>
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<a name="id-1.14.18.7"></a><h2>DESCRIPTION</h2>
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<p><span class="command"><strong>lwresd</strong></span>
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering is the daemon providing name lookup
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering services to clients that use the BIND 9 lightweight resolver
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering library. It is essentially a stripped-down, caching-only name
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering server that answers queries using the BIND 9 lightweight
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering resolver protocol rather than the DNS protocol.
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering<p><span class="command"><strong>lwresd</strong></span>
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering listens for resolver queries on a
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering UDP port on the IPv4 loopback interface, 127.0.0.1. This
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering means that <span class="command"><strong>lwresd</strong></span> can only be used by
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering processes running on the local machine. By default, UDP port
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering number 921 is used for lightweight resolver requests and
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering Incoming lightweight resolver requests are decoded by the
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering server which then resolves them using the DNS protocol. When
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering the DNS lookup completes, <span class="command"><strong>lwresd</strong></span> encodes
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering the answers in the lightweight resolver format and returns
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering them to the client that made the request.
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering If <code class="filename">/etc/resolv.conf</code> contains any
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering <code class="option">nameserver</code> entries, <span class="command"><strong>lwresd</strong></span>
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering sends recursive DNS queries to those servers. This is similar
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering to the use of forwarders in a caching name server. If no
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering <code class="option">nameserver</code> entries are present, or if
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering forwarding fails, <span class="command"><strong>lwresd</strong></span> resolves the
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek queries autonomously starting at the root name servers, using
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek a built-in list of root server hints.
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering<a name="id-1.14.18.8"></a><h2>OPTIONS</h2>
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering<div class="variablelist"><dl class="variablelist">
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering Use IPv4 only even if the host machine is capable of IPv6.
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering <code class="option">-4</code> and <code class="option">-6</code> are mutually
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering Use IPv6 only even if the host machine is capable of IPv4.
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering <code class="option">-4</code> and <code class="option">-6</code> are mutually
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering<dt><span class="term">-c <em class="replaceable"><code>config-file</code></em></span></dt>
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering Use <em class="replaceable"><code>config-file</code></em> as the
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering configuration file instead of the default,
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <code class="filename">/etc/lwresd.conf</code>.
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <code class="option">-c</code> can not be used with <code class="option">-C</code>.
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering<dt><span class="term">-C <em class="replaceable"><code>config-file</code></em></span></dt>
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering Use <em class="replaceable"><code>config-file</code></em> as the
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering configuration file instead of the default,
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <code class="filename">/etc/resolv.conf</code>.
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <code class="option">-C</code> can not be used with <code class="option">-c</code>.
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering<dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering Debugging traces from <span class="command"><strong>lwresd</strong></span> become
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering more verbose as the debug level increases.
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering Run the server in the foreground (i.e. do not daemonize).
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering Run the server in the foreground and force all logging
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering<dt><span class="term">-i <em class="replaceable"><code>pid-file</code></em></span></dt>
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering Use <em class="replaceable"><code>pid-file</code></em> as the
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering PID file instead of the default,
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <code class="filename">/var/run/lwresd/lwresd.pid</code>.
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering<dt><span class="term">-m <em class="replaceable"><code>flag</code></em></span></dt>
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering Turn on memory usage debugging flags. Possible flags are
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <em class="replaceable"><code>usage</code></em>,
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <em class="replaceable"><code>trace</code></em>,
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <em class="replaceable"><code>record</code></em>,
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <em class="replaceable"><code>size</code></em>, and
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering <em class="replaceable"><code>mctx</code></em>.
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering These correspond to the ISC_MEM_DEBUGXXXX flags described in
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering <code class="filename"><isc/mem.h></code>.
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering<dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering Create <em class="replaceable"><code>#cpus</code></em> worker threads
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering to take advantage of multiple CPUs. If not specified,
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering <span class="command"><strong>lwresd</strong></span> will try to determine the
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering number of CPUs present and create one thread per CPU.
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering If it is unable to determine the number of CPUs, a
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering single worker thread will be created.
a0ab566574303be1ca12cdb334f284cfd407caa5Lennart Poettering<dt><span class="term">-P <em class="replaceable"><code>port</code></em></span></dt>
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering Listen for lightweight resolver queries on port
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering <em class="replaceable"><code>port</code></em>. If
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering not specified, the default is port 921.
a0ab566574303be1ca12cdb334f284cfd407caa5Lennart Poettering<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
a0ab566574303be1ca12cdb334f284cfd407caa5Lennart Poettering Send DNS lookups to port <em class="replaceable"><code>port</code></em>. If not
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering specified, the default is port 53. This provides a
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering way of testing the lightweight resolver daemon with a
78edb35ab4f4227485cb9ec816b43c37e0d5e62aLennart Poettering name server that listens for queries on a non-standard
78edb35ab4f4227485cb9ec816b43c37e0d5e62aLennart Poettering Write memory usage statistics to <code class="filename">stdout</code>
78edb35ab4f4227485cb9ec816b43c37e0d5e62aLennart Poettering<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
78edb35ab4f4227485cb9ec816b43c37e0d5e62aLennart Poettering This option is mainly of interest to BIND 9 developers
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek and may be removed or changed in a future release.
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
78edb35ab4f4227485cb9ec816b43c37e0d5e62aLennart Poettering to <em class="replaceable"><code>directory</code></em> after
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek processing the command line arguments, but before
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek reading the configuration file.