The rpcbind is a utility that converts RPC program numbers into universal addresses.
It must be running on the host to be able to make RPC calls. We will dive into RPCbind today to see how it works.
Table of Contents
Remote Procedure Call (RPC) is an inter-process communication technique to allow client and server software to communicate on a network. The RPC protocol is based on a client/server model.
The client makes a procedure call that appears to be local but is actually run on a remote computer. During this process, the procedure call arguments are bundled and passed through the network to the server. The arguments are then unpacked and run on the server.
The result is again bundled and passed back to the client, where it is converted to a return value for the client’s procedure call.
What is Rpcbind?
Rpcbind accepts port reservations from local RPC services. These ports are then made available (or advertised) so the corresponding remote RPC services can access them. The rpcbind service responds to requests for RPC services and sets up connections to the requested RPC service.
For example, NFSv3 is an RPC service. We will discuss more details later.
Tips For RPCbind
When a client wishes to make an RPC call to a given program number, it first contacts rpcbind on the server machine to determine the address where RPC requests should be sent.
- It tells rpcbind the address at which it is listening, and the RPC program numbers it is prepared to serve.
- It checks that certain name-to-address translation-calls function correctly.
- The rpcbind utility should be started before any other RPC service.
- The rpcbind utility can only be started by the super-user.
Check RPCbind on Linux
We can use the following commands to check Rpcbind is running or not.
systemctl status rpcbind
We can use rpcinfo command to check if the RPC service is registered or not. Normally this command will respond with all the registered RPC services running on the server.
The listing displays the program number, version, protocol, port, and service name. One of those listed is the mountd service:
program vers proto port service
100005 1 udp 32784 mountd
We can also use rpcinfo to unregister an RPC service. When used with the –d option, we can delete registration for a service. For example, xxxx is running on the local system. we could unregister it as follows: rpcinfo -d xxxx 1.