Connected: An Internet Encyclopedia
RPC Protocol Overview

Top: Connected: An Internet Encyclopedia
Up: Topics
Up: Functions
Up: Session Management

Search: |  | Search Depth: |
Search Type: | String RegEx | Search Options: | NoCase WholeWord

### RPC Protocol Overview

The Remote Procedure Call (RPC) protocol, documented in RFC 1831, is designed to augment IP in a different way than TCP. While TCP is targeted at the transfer of large data streams (such as a file download), RPC is designed for network programing, allowing a program to make a subroutine call on a remote machine. The most important application of RPC is the NFS file sharing protocol.

The key features of RPC are:

- Request-reply. RPC is a request-reply protocol, and can exhibit the "ping-pong" behavior typical of such protocols. This is not fundamental to RPC's design (since multiple requests can be outstanding, and replys can come in any order), but most programs will issue a single RPC request, and then block awaiting a reply.

- UDP or TCP transport. RPC actually operates over UDP or TCP. RPC/UDP is a connection-less, stateless protocol. RPC/TCP is slower, but provides a reliable, stateful connection.

- Standardized data representation. RPC encodes its data using the eXternal Data Representation (XDR) protocol, documented in RFC 1832, which standardizes the format of integers, floating point numbers, and strings, permitting different types of computers to enhance information seamlessly.

- Authentication. RPC provides support for authenticating the calling program on one machine to the target subroutine on the other. Authentication can operate in several different modes. During NFS operations, authentication usually takes the form of relaying UNIX user and group IDs to the file server for permission checking.

#### RPC Service Rendevous

Both TCP and UDP rely on well-known port numbers to perform service rendevous. For example, TCP TELNET service is available on port 21, FTP on port 23, SNMP on port 25, and so on. Connecting to TCP and UDP services simply requires connecting to the right port number.

RPC introduces another step in this process, to divorce services from being tied to a given port number. It does so using a special RPC service called PORTMAP or RPCBIND. These binding protocols, documented in RFC 1833 and often refered to as the portmapper, are unique among RPC services since they have an assigned port of their own (port 111). Other RPC services, running on any port number, can register themselves using an RPC call to port 111. The portmapper offers other RPC calls to permit service lookup.

The most important consequence of this design is that the portmapper must be the first RPC program started, and must remain in constant operation.

Connected: An Internet Encyclopedia
RPC Protocol Overview