1823250 Members
3279 Online
109648 Solutions
New Discussion юеВ

nfs and rpc

 
SOLVED
Go to solution
Maaz
Valued Contributor

nfs and rpc

Again a stupid questions, plz accept appologies.

http is a tcp based protocol
dns is a udp based protocol
i.e normaly in tcp/ip world, almost all application layer protocols are either udp or tcp, ok, but nfs(also an application layer protocol, is'nt ?) is a RPC based protocol.

I wana know so whats the RPC is ? and why some applications(nfs, nis etc) works/rely on rpc, while other doesnt(like http, dns, ssh etc)

plz help
Regards
Maaz
6 REPLIES 6
Ivan Ferreira
Honored Contributor
Solution

Re: nfs and rpc

RPC is a powerful technique for constructing distributed, client-server based applications.

Normally you use RPC for data exchange between a server and a client. Anyway, this runs under tcp or udp protocols anyway.

A portmapper converts RPC program numbers into port numbers.

The portmap daemon converts RPC program numbers into Internet port numbers.

When an RPC server starts up, it registers with the portmap daemon. The server tells the daemon which port number it is listening to and which RPC program numbers it serves. Thus, the portmap daemon knows the location of every registered port on the host and which programs are available on each of these ports.

A client consults the portmap daemon only once for each program the client tries to call. The portmap daemon tells the client which port to send the call to. The client stores this information for future reference.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Vitaly Karasik_1
Honored Contributor

Re: nfs and rpc

you may read this article http://www.cs.cf.ac.uk/Dave/C/node33.html for in-depth RPC overview
john kingsley
Honored Contributor

Re: nfs and rpc

TCP & UDP are Transport Layer protocols.

RPC is a Session Layer protocol. It runs on above TCP & UDP.

NFS does run at the Application Layer. Most implementations of NFS can be configured to use either TCP or UDP. Originally NFS only used UDP, but most UNIX implementations of NFS these days are configured to use TCP. By default, redhat still uses UDP.

RPC are "Remote Procedure Calls". They allow a server to define procedures that can be called by programs running on client machines. RPC was developed by SUN and lot of the services that use RPCs (NIS, NFS) were also developed by SUN.
Maaz
Valued Contributor

Re: nfs and rpc

Millions of Thanks, Dear Mr Ivan Ferreira, Vitaly Karasik, and john kingsley for such a nice help ;)

Just a little more, plz dont mind ;(

>RPC is a powerful technique for constructing distributed, client-server based >applications

ssh(sshd and ssh client) is also a client-server program/app, but why ssh doesnt use RPC ? i.e sshd is running somewhere, and another part of software/app(ssh client) is running on another machine, so why ssh doesnt use RPC ?
http(http server, and web browser) is also a client-server program/app, but why http doesnt use RPC ?

Regards
Maaz
Vitaly Karasik_1
Honored Contributor

Re: nfs and rpc

probably it's because NFS is trying to implement local filesystem semantic for remote filesystem.

Ivan Ferreira
Honored Contributor

Re: nfs and rpc

"Sockets" are a pretty low-level network abstraction. You're required to deal with potentially difficult issues like controlling socket handle lifetime, binding address to sockets, resolving human-readable (?) names into address, connecting, etc. Also, the two most common protocols used by applications on the Internet (TCP and UDP) each have some nasty "gotchas" that can make their use challenging.

"RPC" is a higher level protocol. It's also somewhat protocol neutral -- As long as the client and server have some shared/common network protocol installed (and assuming their RPC implementations play nicely) then the two can communicate.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?