Network File Services  «Prev  Next»

Lesson 3 Remote procedure calls
Objective Explain the relationship between remote procedure calls and NFS.

Remote Procedure Calls

Remote procedure calls (RPCs) enable NFS to transparently provide remote files to local computers. An RPC allows a client program to request a service from another computer without needing to know network details. Consequently, an RPC frees NFS from network-specific implementations and allows NFS to focus on providing network file access semantics.
File access semantics: When a file is opened, closed, read from, or written to, certain guidelines, or semantics must be in place. These semantics are "right-of-way" indicators, describing what happens when programs make conflicting requests. For example, a read/write semantic would define who has the right-of-way when one program reads from a file that is being written to by another program.
The following SlideShow illustrates how RPC enables an NFS client to mount and access remote filesystems.

Relationship between RPC and NFS

Question: What is the relationship between Remote Procedure Calls and Network File Systems?
Remote Procedure Calls (RPC) and Network File Systems (NFS) are two related technologies that are often used together to enable remote access to files and services over a network. NFS is a file system protocol that allows files and directories to be shared over a network, and enables remote clients to access files and directories on a server as if they were local. NFS provides a set of operations that clients can use to access files and directories, such as read, write, and create.
RPC is a protocol that allows applications to make remote procedure calls to a server over a network, and enables remote clients to access services and resources on a server as if they were local. RPC provides a mechanism for marshalling and unmarshalling data and arguments across a network, and allows clients to invoke procedures on a server and receive responses. The relationship between RPC and NFS is that NFS uses RPC as its underlying transport protocol to communicate between clients and servers. When a client sends an NFS request to a server, the request is encapsulated in an RPC message and sent over the network to the server. The server then processes the request, generates a response, and sends the response back to the client in another RPC message.
Overall, the combination of NFS and RPC allows remote clients to access files and directories on a server over a network, and provides a transparent and efficient way to share resources and collaborate across multiple systems and users.
1) RPC 1 2) RPC 2 3) RPC 3 4) RPC 4 5) RPC 5 6) RPC 6 7) RPC 7 8) RPC 8

Remote Procedure Call Process

The NFS daemon (rpc.nfsd) and RPC mounter (rpc.mountd) do not need to run on the NFS client. Save some system memory and turn them off.

Listing registered RPC programs

When an RPC program such as rpc.nfsd or rpc.mountd starts, it must register itself with the portmapper program, portmap. The rpcinfo command, with the -p parameter, lists all registered RPC programs.
For example, to list all registered programs on your local system, use rpcinfo -p. To list all registered programs on a remote server, supply the hostname: rpcinfo -p

In the next lesson, you will learn how to configure a NFS server.

Nfs Rpc - Quiz

Before moving on to the next lesson, click the Quiz link below to answer some questions about NFS and RPC.
Nfs Rpc - Quiz