add getopt(3); always display program name on error (use fatal());
[unix-history] / usr / src / sbin / nfsd / nfsd.8
CommitLineData
7dd5dab1
KM
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
3.\"
7167345e 4.\" %sccs.include.redist.man%
7dd5dab1 5.\"
7167345e 6.\" @(#)nfsd.8 5.6 (Berkeley) %G%
7dd5dab1
KM
7.\"
8.TH NFSD 8 ""
9.UC 7
10.SH NAME
11nfsd \- remote NFS server
12.SH SYNOPSIS
7167345e 13.B nfsd
1b3a818d 14[
7a094649
KM
15.B \-u
16.I msk,mtch,numprocs
17]
1b3a818d 18[
7a094649
KM
19.B \-t
20.I msk,mtch,hostadr1,hostadr2,...
21]
22[
23.I numprocs
24]
7dd5dab1
KM
25.SH DESCRIPTION
26.I Nfsd
1b3a818d 27runs on a server machine to service
7dd5dab1 28.SM NFS
1b3a818d
KM
29requests from client machines.
30At least one
31.I nfsd
32must be running for a machine to operate as a server.
1b3a818d 33The options
7a094649 34.B \-u
1b3a818d 35and
7a094649
KM
36.B \-t
37are used to indicate which transport protocols are to be served.
38.TP
39.B \-u
40Serve UDP NFS clients.
41.TP
42.B \-t
43Serve TCP NFS clients.
44.TP
45.I "msk, mtch"
46These arguments permit restriction of NFS services
47to a subset of the host addresses. The
48.I msk
1b3a818d 49and
7a094649
KM
50.I mtch
51are applied to the client host address as follows:
1b3a818d 52.sp
7a094649
KM
53if ((
54.I host_address
55&
56.I msk
57) ==
58.I mtch
59)
60.br
61 - service the client request
1b3a818d 62.br
7a094649
KM
63else
64.br
65 - drop the request
66.TP
67.I hostadr1,...
68You may also specify zero or more specific host addresses to be accepted
69as well as ones that pass the
70.I msk, mtch
71test above.
72This may only be done for transport protocols that are connection based, such
73as TCP.
74For the internet domain,
75.I msk, mtch
76and
77.I hostadrs'
78are specified in internet
79.I dot
80notation.
81.TP
82.I numprocs
83Specifies how many servers to fork off. This may only be specified for
84non-connection based protocols such as UDP.
85.LP
86If neither
87.I \-u
88or
89.I \-t
90are specified,
91.I numprocs
92servers for UDP accepting requests from all clients are started.
93If
94.I numprocs
95is not specified, it defaults to 1.
96.LP
97For example:
1b3a818d 98.sp
7167345e 99nfsd \-u 255.255.255.0,131.104.48.0,4 \-t 255.255.0.0,131.104.0.0,131.102.31.2
7a094649
KM
100.IP "- "
101Serves UDP and TCP transports. For UDP,
102it runs 4 daemons that accept requests
103from any client on subnet 131.104.48.
104For TCP, it accepts connections from any client on network 131.104
105plus the client with the address 131.102.31.2.
106.LP
7167345e 107nfsd \-u 255.255.240.0,131.104.0.0,6 \-t 0,0
7a094649
KM
108.IP "- "
109Serves UDP and TCP transports.
110For UDP, it runs 6 daemons that accept requests from clients with
111addresses in the range 131.104.0.x - 131.104.15.x.
112For TCP, it accepts connections from any client.
113.LP
7167345e 114nfsd \-u 0,0,4
7a094649
KM
115.IP "- "
116Serves any UDP client with 4 servers, only.
117.LP
7167345e 118nfsd 4
7a094649
KM
119.IP "- "
120Serves any UDP client with 4 servers, only. (Compatibility)
121.LP
122A server should typically run enough daemons to handle
123the maximum level of concurrency from its clients,
124typically four to six.
1b3a818d 125.PP
7dd5dab1
KM
126.I Nfsd
127listens for service requests at the port indicated in the
128.SM NFS
129server specification; see
1b3a818d 130``Network File System Protocol Specification, RFC1094''
7dd5dab1
KM
131.SH SEE ALSO
132.IR nfsstat (1),
8d25ae69 133.IR nfssvc (2),
7dd5dab1
KM
134.IR mountd (8),
135.IR portmap (8)
7a094649
KM
136.SH BUGS
137The client host address restrictions specified here are unrelated to
138the mount restrictions specified in /etc/exports for
139.IR mountd (8).