checkpoint of hacking for mail.cs.berkeley.edu
[unix-history] / usr / src / sbin / nfsd / nfsd.8
CommitLineData
665935df 1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
7dd5dab1
KM
2.\" All rights reserved.
3.\"
665935df 4.\" %sccs.include.redist.roff%
7dd5dab1 5.\"
665935df 6.\" @(#)nfsd.8 5.9 (Berkeley) %G%
7dd5dab1 7.\"
665935df
CL
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
1b3a818d 28runs on a server machine to service
665935df 29.Tn NFS
1b3a818d
KM
30requests from client machines.
31At least one
665935df 32.Nm nfsd
1b3a818d 33must be running for a machine to operate as a server.
1b3a818d 34The options
665935df 35.Fl u
1b3a818d 36and
665935df 37.Fl t
7a094649 38are used to indicate which transport protocols are to be served.
665935df
CL
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
7d52935b 52options to re-register NFS if the portmap server is restarted.
665935df
CL
53.It Fl t
54Serve
55.Tn TCP NFS
56clients.
57.It Fl u
58Serve
59.Tn UDP NFS
60clients.
61.El
62.Pp
7d52935b 63The following arguments to the
665935df 64.Fl u
7d52935b 65or
665935df 66.Fl t
7d52935b
MK
67options are used to specify parameters for service using the respective
68protocol:
665935df
CL
69.Bl -tag -width Ds
70.It Ar msk , mtch
71These arguments permit restriction of
72.Tn NFS
73services
7a094649 74to a subset of the host addresses. The
665935df 75.Ar msk
1b3a818d 76and
665935df 77.Ar mtch
7a094649 78are applied to the client host address as follows:
665935df
CL
79.Pp
80.Bd -filled -offset indent -compact
7a094649 81if ((
665935df 82.Ar host_address No \&& Em msk
7a094649 83) ==
665935df 84.Ar mtch
7a094649
KM
85)
86.br
665935df 87 \- service the client request
1b3a818d 88.br
7a094649
KM
89else
90.br
665935df
CL
91 \- drop the request
92.Ed
93.It Ar hostadr1 , ...
7a094649
KM
94You may also specify zero or more specific host addresses to be accepted
95as well as ones that pass the
665935df 96.Ar msk , mtch
7a094649
KM
97test above.
98This may only be done for transport protocols that are connection based, such
665935df
CL
99as
100.Tn TCP .
7a094649 101For the internet domain,
665935df 102.Ar msk , mtch
7a094649 103and
665935df 104.Ar hostadrs
7a094649 105are specified in internet
665935df 106.Em dot
7a094649 107notation.
665935df 108.It Ar numprocs
7a094649 109Specifies how many servers to fork off. This may only be specified for
665935df
CL
110non-connection based protocols such as
111.Tn UDP .
112.El
113.Pp
7a094649 114If neither
665935df 115.Fl u
7a094649 116or
665935df 117.Fl t
7a094649 118are specified,
665935df
CL
119.Ar numprocs
120servers for
121.Tn UDP
122accepting requests from all clients are started.
7a094649 123If
665935df 124.Ar numprocs
7a094649 125is not specified, it defaults to 1.
665935df 126.Pp
7a094649 127For example:
665935df
CL
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 ,
7a094649
KM
140it runs 4 daemons that accept requests
141from any client on subnet 131.104.48.
665935df
CL
142For
143.Tn TCP ,
144it accepts connections from any client on network 131.104
7a094649 145plus the client with the address 131.102.31.2.
665935df
CL
146.El
147.Bd -literal
7167345e 148nfsd \-u 255.255.240.0,131.104.0.0,6 \-t 0,0
665935df
CL
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
7a094649 160addresses in the range 131.104.0.x - 131.104.15.x.
665935df
CL
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
7a094649
KM
182A server should typically run enough daemons to handle
183the maximum level of concurrency from its clients,
184typically four to six.
665935df
CL
185.Pp
186.Nm Nfsd
7dd5dab1 187listens for service requests at the port indicated in the
665935df 188.Tn NFS
7dd5dab1 189server specification; see
665935df
CL
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
7a094649 198The client host address restrictions specified here are unrelated to
665935df
CL
199the mount restrictions specified in
200.Pa /etc/exports
201for
202.Xr mountd 8 .
203.Sh HISTORY
204The
205.Nm
206command is
207.Ud .