xref: /netbsd-src/usr.sbin/nfsd/nfsd.8 (revision 5f7096188587a2c7c95fa3c69b78e1ec9c7923d0)
1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"	from: @(#)nfsd.8	5.9 (Berkeley) 8/5/91
33.\"	$Id: nfsd.8,v 1.4 1993/08/01 07:38:43 mycroft Exp $
34.\"
35.Dd August 5, 1991
36.Dt NFSD 8
37.Os
38.Sh NAME
39.Nm nfsd
40.Nd remote
41.Tn NFS
42server
43.Sh SYNOPSIS
44.Nm nfsd
45.Op Fl r
46.Bk -words
47.Op Fl t Ar msk,mtch,hostadr1,hostadr2,...
48.Ek
49.Bk -words
50.Op Fl u Ar msk,mtch,numprocs
51.Ek
52.Op Ar numprocs
53.Sh DESCRIPTION
54.Nm Nfsd
55runs on a server machine to service
56.Tn NFS
57requests from client machines.
58At least one
59.Nm nfsd
60must be running for a machine to operate as a server.
61The options
62.Fl u
63and
64.Fl t
65are used to indicate which transport protocols are to be served.
66.Pp
67Options available to
68.Nm nfsd :
69.Bl -tag -width Ds
70.It Fl r
71Register the
72.Tn NFS
73service with
74.Xr portmap 8
75without creating any servers. This option can be used along with the
76.Fl u
77or
78.Fl t
79options to re-register NFS if the portmap server is restarted.
80.It Fl t
81Serve
82.Tn TCP NFS
83clients.
84.It Fl u
85Serve
86.Tn UDP NFS
87clients.
88.El
89.Pp
90The following arguments to the
91.Fl u
92or
93.Fl t
94options are used to specify parameters for service using the respective
95protocol:
96.Bl -tag -width Ds
97.It Ar msk , mtch
98These arguments permit restriction of
99.Tn NFS
100services
101to a subset of the host addresses. The
102.Ar msk
103and
104.Ar mtch
105are applied to the client host address as follows:
106.Pp
107.Bd -filled -offset indent -compact
108if ((
109.Ar host_address No \&& Em msk
110) ==
111.Ar mtch
112)
113.br
114	\- service the client request
115.br
116else
117.br
118	\- drop the request
119.Ed
120.It Ar hostadr1 , ...
121You may also specify zero or more specific host addresses to be accepted
122as well as ones that pass the
123.Ar msk , mtch
124test above.
125This may only be done for transport protocols that are connection based, such
126as
127.Tn TCP .
128For the internet domain,
129.Ar msk , mtch
130and
131.Ar hostadrs
132are specified in internet
133.Em dot
134notation.
135.It Ar numprocs
136Specifies how many servers to fork off. This may only be specified for
137non-connection based protocols such as
138.Tn UDP .
139.El
140.Pp
141If neither
142.Fl u
143or
144.Fl t
145are specified,
146.Ar numprocs
147servers for
148.Tn UDP
149accepting requests from all clients are started.
150If
151.Ar numprocs
152is not specified, it defaults to 1.
153.Pp
154For example:
155.Bd -literal
156nfsd \-u 255.255.255.0,131.104.48.0,4 \-t \e
157	255.255.0.0,131.104.0.0,131.102.31.2
158.Ed
159.Bl -item -offset indent
160.It
161Serves
162.Tn UDP
163and
164.Tn TCP
165transports. For
166.Tn UDP ,
167it runs 4 daemons that accept requests
168from any client on subnet 131.104.48.
169For
170.Tn TCP ,
171it accepts connections from any client on network 131.104
172plus the client with the address 131.102.31.2.
173.El
174.Bd -literal
175nfsd \-u 255.255.240.0,131.104.0.0,6 \-t 0,0
176.Ed
177.Bl -item -offset indent
178.It
179Serves
180.Tn UDP
181and
182.Tn TCP
183transports.
184For
185.Tn UDP ,
186it runs 6 daemons that accept requests from clients with
187addresses in the range 131.104.0.x - 131.104.15.x.
188For
189.Tn TCP ,
190it accepts connections from any client.
191.El
192.Pp
193.Li nfsd \-u 0,0,4
194.Bl -item -offset indent
195.It
196Serves any
197.Tn UDP
198client with 4 servers, only.
199.El
200.Pp
201.Li nfsd 4
202.Bl -item -offset indent
203.It
204Serves any
205.Tn UDP
206client with 4 servers, only. (Compatibility)
207.El
208.Pp
209A server should typically run enough daemons to handle
210the maximum level of concurrency from its clients,
211typically four to six.
212.Pp
213.Nm Nfsd
214listens for service requests at the port indicated in the
215.Tn NFS
216server specification; see
217.%T "Network File System Protocol Specification" ,
218RFC1094.
219.Sh SEE ALSO
220.Xr nfsstat 1 ,
221.Xr nfssvc 2 ,
222.Xr mountd 8 ,
223.Xr portmap 8
224.Sh BUGS
225The client host address restrictions specified here are unrelated to
226the mount restrictions specified in
227.Pa /etc/exports
228for
229.Xr mountd 8 .
230.Sh HISTORY
231The
232.Nm
233command is
234.Ud .
235