Using rpcinfo Command (with examples)
- Windows
- November 5, 2023
The rpcinfo command is a powerful tool for listing and calling programs via Remote Procedure Calls (RPC) on remote computers. It allows sysadmins to gather information about RPC programs registered on a local or remote machine and initiate RPC calls to specific programs.
Example 1: Listing programs registered on the local computer
rpcinfo
Motivation: This example is useful when you need to quickly get a list of programs registered on the local machine. It helps sysadmins identify the available RPC services without the need to connect to remote computers.
Explanation: The command without any options will list the programs registered on the local computer.
Example output:
program version netid address service owner
100000 4 tcp 0.0.0.0.0.111 portmapper superuser
100000 3 tcp 0.0.0.0.0.111 portmapper superuser
100000 2 tcp 0.0.0.0.0.111 portmapper superuser
100000 4 udp 0.0.0.0.0.111 portmapper superuser
100000 3 udp 0.0.0.0.0.111 portmapper superuser
100000 2 udp 0.0.0.0.0.111 portmapper superuser
Example 2: Listing programs registered on a remote computer
rpcinfo /p computer_name
Motivation: This example is helpful when you want to inspect the RPC programs registered on a remote computer. It allows sysadmins to gather information about RPC services running on remote machines without the need for direct access.
Explanation: The /p
option is used to list programs registered on the remote computer specified by computer_name
.
Example output:
program version netid address service owner
100000 4 tcp 192.168.1.100.111 portmapper superuser
100024 1 tcp 192.168.1.100.681 status superuser
100005 1 udp 192.168.1.100.749 mountd superuser
Example 3: Calling a specific program on a remote computer using TCP
rpcinfo /t computer_name program_name
Motivation: This example is useful when you want to initiate an RPC call to a specific program running on a remote computer using TCP. It allows sysadmins to test the functionality of RPC services and troubleshoot potential issues.
Explanation: The /t
option is used to instruct rpcinfo to perform the RPC call using TCP. computer_name
specifies the remote computer, and program_name
is the name of the program to call.
Example output:
program version netid address service owner
100024 1 tcp 192.168.1.100.681 status superuser
Example 4: Calling a specific program on a remote computer using UDP
rpcinfo /u computer_name program_name
Motivation: This example is beneficial when you need to perform an RPC call to a specific program on a remote computer using UDP. It allows sysadmins to test UDP-based RPC services and check if they are functioning correctly.
Explanation: The /u
option is used to specify the UDP transport protocol. computer_name
denotes the remote computer, and program_name
is the name of the program to call.
Example output:
program version netid address service owner
100005 1 udp 192.168.1.100.749 mountd superuser
The rpcinfo command provides sysadmins with a comprehensive set of options to list and interact with RPC programs on local and remote machines, making it a valuable tool for managing RPC services in a networked environment.