Portmap

From Wikipedia, the free encyclopedia

Portmap is server software running under Unix-like systems that converts RPC program numbers into DARPA 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.

Normally portmap forks and dissociates itself from the terminal like any other daemon. Portmap then logs errors using syslog.

The portmapper service first appeared in BSD 4.3 and has only been used extensively by NIS, NFS, and FAM so far.

Contents

[edit] 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

[edit] See also

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). Also see the inetd system for a method of causing services associated with a port to launch only as needed--when new requests arrive.

[edit] References

[edit] External links

In other languages