An ONC RPC header contains a program number, version number, and procedure number to identify the call. Normally different RPC programs (services) are implemented by different processes, so the programs map to different TCP/UDP port numbers. If a single process implemented more than one开发者_StackOverflow RPC program, could it register and use the same port for all of them? It seems like the program number is sufficient to demultiplex to the correct service.
Are there any real-world examples of doing so?
It's absolutely legal and possible to run multiple services on the same TCP/UDP port number. Nevertheless, this is not a common practice. The one case which I know is dCache NFS server runs nfsd and mountd on the port 2049.
精彩评论