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