nfsd

NFS server daemon

Syntax:



nfsd [-r] [-t msk,mtch,hostadr1,hostadr2,...]
     [-u msk,mtch,num_daemons] [num_daemons]

Options:

-r
Register the NFS service with portmap without creating any daemons. If -t or -u are also given, reregister NFS if the portmap server is restarted.
-t [msk,mtch,hostadr1,hostadr2,...]
Serve TCP NFS clients.
-u [msk,mtch,num_daemons]
Serve UDP NFS clients.

Description:

The nfsd utility starts daemon processes to service NFS requests from client machines. Each daemon process listens for service requests at the port indicated in the NFS server specification (see Network File System Protocol Specification, RFC 1094).

The options -t and -u let you specify which transport protocols the server machine will service. The options take the following arguments:

msk,mtch
These arguments let you restrict NFS services to a subset of the host addresses. The utility applies these arguments to the client host address as follows:


	if (( host_address & msk ) == mtch )
		- service the client request
	else
		- drop the request
hostadr1, hostadr2,...
(-t only) This argument lets you specify zero or more specific host addresses to be accepted in addition to the addresses that pass the msk,mtch test above. For the internet domain, specify msk, mtch, and hostadr in Internet dot notation.
num_daemons
(for UDP transport only) This argument lets you specify how many daemons to run.

If you don't specify -t or -u, nfsd starts num_daemons daemons for UDP; the daemons will accept requests from all clients. If you don't specify num_daemons, nfsd starts one daemon.

Examples:

Serve UDP and TCP clients. For UDP, run two daemons that accept requests from any client on subnet 131.104.48. For TCP, accept connections from any client on network 131.104 and from the client with the address 131.102.31.2:

nfsd -u 255.255.255.0,131.104.48.0,2 -t \
        255.255.0.0,131.104.0.0,131.102.31.2

Serve UDP and TCP clients. For UDP, run four daemons that accept requests from clients with addresses in the range 131.104.0.x to 131.104.15.x. For TCP, accept connections from any client:

nfsd -u 255.255.240.0,131.104.0.0,4 -t 0,0

Serve any UDP client with four daemons:

nfsd -u 0,0,4

Same as above:

nfsd 4

Caveats:

The address restrictions you can specify here for client hosts are unrelated to the mount restrictions specified in /etc/exports for mountd.

See also:

mountd, nfsstat, portmap

Network File System Protocol Specification (RFC 1094)