Merge from vendor branch NTPD:
[dragonfly.git] / contrib / bind-9.2.4rc7 / bin / named / lwresd.8
1 .\" Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000, 2001  Internet Software Consortium.
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 .\" AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 .\" PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .\" $Id: lwresd.8,v 1.13.2.2 2004/06/03 05:21:13 marka Exp $
17 .\"
18 .TH "LWRESD" "8" "June 30, 2000" "BIND9" ""
19 .SH NAME
20 lwresd \- lightweight resolver daemon
21 .SH SYNOPSIS
22 .sp
23 \fBlwresd\fR [ \fB-C \fIconfig-file\fB\fR ]  [ \fB-d \fIdebug-level\fB\fR ]  [ \fB-f\fR ]  [ \fB-g\fR ]  [ \fB-i \fIpid-file\fB\fR ]  [ \fB-n \fI#cpus\fB\fR ]  [ \fB-P \fIport\fB\fR ]  [ \fB-p \fIport\fB\fR ]  [ \fB-s\fR ]  [ \fB-t \fIdirectory\fB\fR ]  [ \fB-u \fIuser\fB\fR ]  [ \fB-v\fR ] 
24 .SH "DESCRIPTION"
25 .PP
26 \fBlwresd\fR is the daemon providing name lookup
27 services to clients that use the BIND 9 lightweight resolver
28 library. It is essentially a stripped-down, caching-only name
29 server that answers queries using the BIND 9 lightweight
30 resolver protocol rather than the DNS protocol.
31 .PP
32 \fBlwresd\fR listens for resolver queries on a
33 UDP port on the IPv4 loopback interface, 127.0.0.1. This
34 means that \fBlwresd\fR can only be used by
35 processes running on the local machine. By default UDP port
36 number 921 is used for lightweight resolver requests and
37 responses.
38 .PP
39 Incoming lightweight resolver requests are decoded by the
40 server which then resolves them using the DNS protocol. When
41 the DNS lookup completes, \fBlwresd\fR encodes
42 the answers in the lightweight resolver format and returns
43 them to the client that made the request.
44 .PP
45 If \fI/etc/resolv.conf\fR contains any
46 \fBnameserver\fR entries, \fBlwresd\fR
47 sends recursive DNS queries to those servers. This is similar
48 to the use of forwarders in a caching name server. If no
49 \fBnameserver\fR entries are present, or if
50 forwarding fails, \fBlwresd\fR resolves the
51 queries autonomously starting at the root name servers, using
52 a built-in list of root server hints.
53 .SH "OPTIONS"
54 .TP
55 \fB-C \fIconfig-file\fB\fR
56 Use \fIconfig-file\fR as the
57 configuration file instead of the default,
58 \fI/etc/resolv.conf\fR.
59 .TP
60 \fB-d \fIdebug-level\fB\fR
61 Set the daemon's debug level to \fIdebug-level\fR.
62 Debugging traces from \fBlwresd\fR become
63 more verbose as the debug level increases.
64 .TP
65 \fB-f\fR
66 Run the server in the foreground (i.e. do not daemonize).
67 .TP
68 \fB-g\fR
69 Run the server in the foreground and force all logging
70 to \fIstderr\fR.
71 .TP
72 \fB-n \fI#cpus\fB\fR
73 Create \fI#cpus\fR worker threads
74 to take advantage of multiple CPUs. If not specified,
75 \fBlwresd\fR will try to determine the
76 number of CPUs present and create one thread per CPU.
77 If it is unable to determine the number of CPUs, a
78 single worker thread will be created.
79 .TP
80 \fB-P \fIport\fB\fR
81 Listen for lightweight resolver queries on port
82 \fIport\fR. If
83 not specified, the default is port 921.
84 .TP
85 \fB-p \fIport\fB\fR
86 Send DNS lookups to port \fIport\fR. If not
87 specified, the default is port 53. This provides a
88 way of testing the lightweight resolver daemon with a
89 name server that listens for queries on a non-standard
90 port number.
91 .TP
92 \fB-s\fR
93 Write memory usage statistics to \fIstdout\fR
94 on exit.
95 .sp
96 .RS
97 .B "Note:"
98 This option is mainly of interest to BIND 9 developers
99 and may be removed or changed in a future release.
100 .RE
101 .sp
102 .TP
103 \fB-t \fIdirectory\fB\fR
104 \fBchroot()\fR to \fIdirectory\fR after
105 processing the command line arguments, but before
106 reading the configuration file.
107 .sp
108 .RS
109 .B "Warning:"
110 This option should be used in conjunction with the
111 \fB-u\fR option, as chrooting a process
112 running as root doesn't enhance security on most
113 systems; the way \fBchroot()\fR is
114 defined allows a process with root privileges to
115 escape a chroot jail.
116 .RE
117 .sp
118 .TP
119 \fB-u \fIuser\fB\fR
120 \fBsetuid()\fR to \fIuser\fR after completing
121 privileged operations, such as creating sockets that
122 listen on privileged ports.
123 .TP
124 \fB-v\fR
125 Report the version number and exit.
126 .SH "FILES"
127 .TP
128 \fB\fI/etc/resolv.conf\fB\fR
129 The default configuration file.
130 .TP
131 \fB\fI/var/run/lwresd.pid\fB\fR
132 The default process-id file.
133 .SH "SEE ALSO"
134 .PP
135 \fBnamed\fR(8),
136 \fBlwres\fR(3),
137 \fBresolver\fR(5).
138 .SH "AUTHOR"
139 .PP
140 Internet Systems Consortium