2005-02-16 10:05:11

by naveen a

[permalink] [raw]
Subject: Help needed in understanding allocation of ports in NFS

Hi,

I wanted some info related to port selection in NFS.

What happens when the port number is not specified in the command line swit=
ch or configuration=20
file for mountd and statd?

In man pages it is mentioned as statd/mountd will select the port from port=
mapper.=20

Can you please let me know how a port is allotted and the code path in sour=
ce.

What is the criteria for allocation of ports by portmapper ?

Please educate me on this.

Thanks
Naveen
--=20
India.com free e-mail - http://www.india.com.=20
Check out our value-added Premium features, such as an extra 20MB for mail =
storage, POP3, e-mail forwarding, and ads-free mailboxes!

Powered by Outblaze


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2005-02-17 22:08:10

by Dan Stromberg

[permalink] [raw]
Subject: Re: Help needed in understanding allocation of ports in NFS


Generally speaking, being RPC services, the portmapper (portmap or
rpcbind) are free to allocate whatever ports to these services they feel
like, and then client programs will contact the portmapper, give it the
RPC program number, protocol and version, and then the portmapper will
tell the client program which port to use.

However, I've gotten the impression that some NFS-related rpc services
always come up on the same ports in practice.

Still, if you want to combine NFS with a firewall, you likely either
want to allow anything from a list of hosts, or configure NFS to use
specific ports...

On Wed, 2005-02-16 at 18:04 +0800, naveen a wrote:
> Hi,
>
> I wanted some info related to port selection in NFS.
>
> What happens when the port number is not specified in the command line switch or configuration
> file for mountd and statd?
>
> In man pages it is mentioned as statd/mountd will select the port from portmapper.
>
> Can you please let me know how a port is allotted and the code path in source.
>
> What is the criteria for allocation of ports by portmapper ?
>
> Please educate me on this.
>
> Thanks
> Naveen


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2005-02-18 12:12:08

by Neil Horman

[permalink] [raw]
Subject: Re: Help needed in understanding allocation of ports in NFS

Dan Stromberg wrote:
> Generally speaking, being RPC services, the portmapper (portmap or
> rpcbind) are free to allocate whatever ports to these services they feel
> like, and then client programs will contact the portmapper, give it the
> RPC program number, protocol and version, and then the portmapper will
> tell the client program which port to use.
>
> However, I've gotten the impression that some NFS-related rpc services
> always come up on the same ports in practice.
>
> Still, if you want to combine NFS with a firewall, you likely either
> want to allow anything from a list of hosts, or configure NFS to use
> specific ports...
>
Some firewalls are available on the market (I think the cisco pix is
one) that snoop for portmap dump and getport transactions, and use the
information in them to dynamically open ports for services you wish to
allow. You can also use the ip_queue target in iptables to write some
extra intellegence into your linux firewall to do the same thing.
Neil

> On Wed, 2005-02-16 at 18:04 +0800, naveen a wrote:
>
>>Hi,
>>
>>I wanted some info related to port selection in NFS.
>>
>>What happens when the port number is not specified in the command line switch or configuration
>>file for mountd and statd?
>>
>>In man pages it is mentioned as statd/mountd will select the port from portmapper.
>>
>>Can you please let me know how a port is allotted and the code path in source.
>>
>>What is the criteria for allocation of ports by portmapper ?
>>
>>Please educate me on this.
>>
>>Thanks
>>Naveen


--
/***************************************************
*Neil Horman
*Software Engineer
*Red Hat, Inc.
*[email protected]
*gpg keyid: 1024D / 0x92A74FA1
*http://pgp.mit.edu
***************************************************/


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs