'when do we get PORTMAP procedure GETADDR and GETPORT

Can someone comment on how and at which level in portmap program version is decided. Actually in 2 different environments I am getting different Procedure and program version. in case 1 : I am getting Program version as 2 and procedure GETPORT in case 2 : I am getting Program version as 4 and procedure GETADDR.

How can I ensure that in every case GETPORT is called not GETADDR.



Solution 1:[1]

The small confusion comes from the fact that you use probably the same client that talk to two 'different' services to portmap, exposed as program with #100000, version 2 and rpcbind service, exposed as program #100000, version 4. To match the correct service the combination of program and the version is used. Thus, bough can share the same TPC/UDP port, but provide different services.

portmap

Returns TCP/UDP port number of registered program, like:

GETPORT {'program': '100003', 'version': 4} => 2049

rpcbind

Returns the universal addresses of registered program, like:

GETADDR {'program': '100003', 'version': 4, 'netid': 'tcp'} => 0.0.0.0.8.1

Typical rpcbind service support the portmap protocol as well.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 kofemann