8.8. NFS and rpcbind
The following section only applies to NFSv3 implementations that require the
rpcbindservice for backward compatibility.
For information on how to configure an NFSv4-only server, which does not need
rpcbind, see Section 8.6.7, “Configuring an NFSv4-only Server”.
rpcbind utility maps RPC services to the ports on which they listen. RPC processes notify
rpcbindwhen they start, registering the ports they are listening on and the RPC program numbers they expect to serve. The client system then contacts
rpcbindon the server with a particular RPC program number. The
rpcbindservice redirects the client to the proper port number so it can communicate with the requested service.
Because RPC-based services rely on
rpcbindto make all connections with incoming client requests,
rpcbindmust be available before any of these services start.
rpcbindservice uses TCP wrappers for access control, and access control rules for
rpcbindaffect all RPC-based services. Alternatively, it is possible to specify access control rules for each of the NFS RPC daemons. The
rpc.statdcontain information regarding the precise syntax for these rules.
8.8.1. Troubleshooting NFS and
rpcbind provides coordination between RPC services and the port numbers used to communicate with them, it is useful to view the status of current RPC services using
rpcbindwhen troubleshooting. The
rpcinfocommand shows each RPC-based service with port numbers, an RPC program number, a version number, and an IP protocol type (TCP or UDP).
To make sure the proper NFS RPC-based services are enabled for
rpcbind, use the following command:
rpcinfo -p command output
The following is sample output from this command:
program vers proto port service 100021 1 udp 32774 nlockmgr 100021 3 udp 32774 nlockmgr 100021 4 udp 32774 nlockmgr 100021 1 tcp 34437 nlockmgr 100021 3 tcp 34437 nlockmgr 100021 4 tcp 34437 nlockmgr 100011 1 udp 819 rquotad 100011 2 udp 819 rquotad 100011 1 tcp 822 rquotad 100011 2 tcp 822 rquotad 100003 2 udp 2049 nfs 100003 3 udp 2049 nfs 100003 2 tcp 2049 nfs 100003 3 tcp 2049 nfs 100005 1 udp 836 mountd 100005 1 tcp 839 mountd 100005 2 udp 836 mountd 100005 2 tcp 839 mountd 100005 3 udp 836 mountd 100005 3 tcp 839 mountd
If one of the NFS services does not start up correctly,
rpcbindwill be unable to map RPC requests from clients for that service to the correct port. In many cases, if NFS is not present in
rpcinfooutput, restarting NFS causes the service to correctly register with
rpcbindand begin working.
For more information and a list of options on
rpcinfo, see its