xref: /original-bsd/sbin/nfsd/nfsd.8 (revision d4efd688)
1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)nfsd.8	5.9 (Berkeley) 08/05/91
7.\"
8.Dd
9.Dt NFSD 8
10.Os
11.Sh NAME
12.Nm nfsd
13.Nd remote
14.Tn NFS
15server
16.Sh SYNOPSIS
17.Nm nfsd
18.Op Fl r
19.Bk -words
20.Op Fl t Ar msk,mtch,hostadr1,hostadr2,...
21.Ek
22.Bk -words
23.Op Fl u Ar msk,mtch,numprocs
24.Ek
25.Op Ar numprocs
26.Sh DESCRIPTION
27.Nm Nfsd
28runs on a server machine to service
29.Tn NFS
30requests from client machines.
31At least one
32.Nm nfsd
33must be running for a machine to operate as a server.
34The options
35.Fl u
36and
37.Fl t
38are used to indicate which transport protocols are to be served.
39.Pp
40Options available to
41.Nm nfsd :
42.Bl -tag -width Ds
43.It Fl r
44Register the
45.Tn NFS
46service with
47.Xr portmap 8
48without creating any servers. This option can be used along with the
49.Fl u
50or
51.Fl t
52options to re-register NFS if the portmap server is restarted.
53.It Fl t
54Serve
55.Tn TCP NFS
56clients.
57.It Fl u
58Serve
59.Tn UDP NFS
60clients.
61.El
62.Pp
63The following arguments to the
64.Fl u
65or
66.Fl t
67options are used to specify parameters for service using the respective
68protocol:
69.Bl -tag -width Ds
70.It Ar msk , mtch
71These arguments permit restriction of
72.Tn NFS
73services
74to a subset of the host addresses. The
75.Ar msk
76and
77.Ar mtch
78are applied to the client host address as follows:
79.Pp
80.Bd -filled -offset indent -compact
81if ((
82.Ar host_address No \&& Em msk
83) ==
84.Ar mtch
85)
86.br
87	\- service the client request
88.br
89else
90.br
91	\- drop the request
92.Ed
93.It Ar hostadr1 , ...
94You may also specify zero or more specific host addresses to be accepted
95as well as ones that pass the
96.Ar msk , mtch
97test above.
98This may only be done for transport protocols that are connection based, such
99as
100.Tn TCP .
101For the internet domain,
102.Ar msk , mtch
103and
104.Ar hostadrs
105are specified in internet
106.Em dot
107notation.
108.It Ar numprocs
109Specifies how many servers to fork off. This may only be specified for
110non-connection based protocols such as
111.Tn UDP .
112.El
113.Pp
114If neither
115.Fl u
116or
117.Fl t
118are specified,
119.Ar numprocs
120servers for
121.Tn UDP
122accepting requests from all clients are started.
123If
124.Ar numprocs
125is not specified, it defaults to 1.
126.Pp
127For example:
128.Bd -literal
129nfsd \-u 255.255.255.0,131.104.48.0,4 \-t \e
130	255.255.0.0,131.104.0.0,131.102.31.2
131.Ed
132.Bl -item -offset indent
133.It
134Serves
135.Tn UDP
136and
137.Tn TCP
138transports. For
139.Tn UDP ,
140it runs 4 daemons that accept requests
141from any client on subnet 131.104.48.
142For
143.Tn TCP ,
144it accepts connections from any client on network 131.104
145plus the client with the address 131.102.31.2.
146.El
147.Bd -literal
148nfsd \-u 255.255.240.0,131.104.0.0,6 \-t 0,0
149.Ed
150.Bl -item -offset indent
151.It
152Serves
153.Tn UDP
154and
155.Tn TCP
156transports.
157For
158.Tn UDP ,
159it runs 6 daemons that accept requests from clients with
160addresses in the range 131.104.0.x - 131.104.15.x.
161For
162.Tn TCP ,
163it accepts connections from any client.
164.El
165.Pp
166.Li nfsd \-u 0,0,4
167.Bl -item -offset indent
168.It
169Serves any
170.Tn UDP
171client with 4 servers, only.
172.El
173.Pp
174.Li nfsd 4
175.Bl -item -offset indent
176.It
177Serves any
178.Tn UDP
179client with 4 servers, only. (Compatibility)
180.El
181.Pp
182A server should typically run enough daemons to handle
183the maximum level of concurrency from its clients,
184typically four to six.
185.Pp
186.Nm Nfsd
187listens for service requests at the port indicated in the
188.Tn NFS
189server specification; see
190.%T "Network File System Protocol Specification" ,
191RFC1094.
192.Sh SEE ALSO
193.Xr nfsstat 1 ,
194.Xr nfssvc 2 ,
195.Xr mountd 8 ,
196.Xr portmap 8
197.Sh BUGS
198The client host address restrictions specified here are unrelated to
199the mount restrictions specified in
200.Pa /etc/exports
201for
202.Xr mountd 8 .
203.Sh HISTORY
204The
205.Nm
206command is
207.Ud .
208