- Portmap
The port mapper ("rpc.portmap" or just "portmap") is a service that runs on nodes on the
Internet for the purpose of mapping an ONC RPC program number tothe network address of the server that listens for the program number.Standard implementations
Portmap is server software running under
Unix-like systems that converts RPC program numbers intoDARPA protocol port numbers. Its design objective was to minimize the number of ports in use, but this never happened as it never had wide adoption. It must be running in order to make RPC calls.When an RPC server is started, it will tell portmap what port number it is listening to, and what RPC program numbers it is prepared to serve. When a client wishes to make an RPC call to a given program number, it will first contact portmap on the server machine to determine the port number where RPC packets should be sent.
Portmap must be started before any RPC servers are invoked.
The portmapper service first appeared in
BSD 4.3 and has only been used extensively by NIS, NFS, and FAM so far.Example portmap instance
This shows the different programs and their versions, and which ports they use. For example, it shows that NFS is running, both version 2 and 3, and can be reached at TCP port 2049 or UDP port 2049, depending on what transport protocol the client wants to use.
$ rpcinfo -p program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100003 2 udp 2049 nfs 100003 3 udp 2049 nfs 100003 4 udp 2049 nfs 100003 2 tcp 2049 nfs 100003 3 tcp 2049 nfs 100003 4 tcp 2049 nfs 100024 1 udp 32770 status 100021 1 udp 32770 nlockmgr 100021 3 udp 32770 nlockmgr 100021 4 udp 32770 nlockmgr 100024 1 tcp 32769 status 100021 1 tcp 32769 nlockmgr 100021 3 tcp 32769 nlockmgr 100021 4 tcp 32769 nlockmgr 100005 1 udp 644 mountd 100005 1 tcp 645 mountd 100005 2 udp 644 mountd 100005 2 tcp 645 mountd 100005 3 udp 644 mountd 100005 3 tcp 645 mountd
Alternative approach
On UNIX and Linux systems see the /etc/services file for the list port numbers and their associated protocol names or services (well known port numbers are assigned within the range of 0 to 1023 via IANA). See: "
List of TCP and UDP port numbers ".In such static port-mapping methods
Super-server s, such asinetd , may be used as a method of causing services associated with a port to launch only as needed, when new requests arrive.See also
*
File alteration monitor
* Network File System
*Network Information Service
*Remote procedure call
*TCP Wrappers References
*Ethan McCallum [http://www.linuxdevcenter.com/pub/a/linux/2004/12/16/fam.html The Watchful Eye of FAM] Linuxdevcenter article 12/16/2004
External links
*
*RFC 1833 - the specification of the ONC RPC port mapping protocol.
Wikimedia Foundation. 2010.