1831275 Members
2861 Online
110022 Solutions
New Discussion

NFS Port

 
SOLVED
Go to solution
alessandro_37
Advisor

NFS Port

Dear all,
i hope someone can help me...
I have the following server:
#uname -a
HP-UX dante B.11.00 E 9000/888 2140000702 8-user license

I have one questions:


1) How can I force the port number of the NFS (network file-system) services to have the same port setted on the next reboot?

Example: I want that actual service: "nlockmgr" remain setted on the next reboot on the port: 807,808,809,810,811,812.
My problem is that these ports change every reboot, but i wish that they do not change,I want that they remain the same one.

#rpcinfo -p
program vers proto port service
100000 4 tcp 111 rpcbind
100000 3 tcp 111 rpcbind
100000 2 tcp 111 rpcbind
100000 4 udp 111 rpcbind
100000 3 udp 111 rpcbind
100000 2 udp 111 rpcbind
100024 1 udp 801 status
100024 1 tcp 802 status
100021 1 tcp 807 nlockmgr
100021 1 udp 808 nlockmgr
100021 3 tcp 809 nlockmgr
100021 3 udp 810 nlockmgr
100021 4 tcp 811 nlockmgr
100021 4 udp 812 nlockmgr
100020 1 udp 4045 llockmgr
100020 1 tcp 4045 llockmgr
100021 2 tcp 813 nlockmgr
100068 2 udp 49175 cmsd
100068 3 udp 49175 cmsd
100068 4 udp 49175 cmsd
100068 5 udp 49175 cmsd
100083 1 tcp 49154 ttdbserver
390113 1 tcp 7937 nsrexec
100005 1 udp 838 mountd
100005 3 udp 838 mountd
100005 1 tcp 839 mountd
100005 3 tcp 839 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs

I hoope is clear...
thenks in advance Alessandro
6 REPLIES 6
Dave Olker
Neighborhood Moderator
Solution

Re: NFS Port

Hello Alessandro,

Your question is very clear. Unfortunately there is no way to accomplish this on HP-UX 11.0. The Network Lock Manager (nlockmgr), Network Status Monitor (status), and Mount (mountd) protocols are all designed to bind to any available port number in the non-reserved range and there is no way to "set" them to a specific port number.

In fact, looking at your rpcinfo output, it appears you haven't patched this system in a very long time, at least from an ONC perspective. Your daemons are all requesting ports in the reserved range (1-1024). We changed the behavior of these daemons to use non-reserved ports a long time ago. I believe the first patch that instituted non-reserved ports for 11.0 was PHNE_19620, which was released in November 1999.

If you install a recent ONC patch on this system you will find these daemons will start acquiring ports in the non-reserved range (48K-64K), however they will still use different ports each time they start.

We will be changing this behavior in a future OS release when we ship the ONC 2.3 KLM (Kernel Lock Manager) code. This code will allow the nlockmgr registration to always use port 4045.

Is there a specific reason why you want to specifically set the port numbers for NLM?

I hope this information helps.

Regards,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Sundar_7
Honored Contributor

Re: NFS Port

Alessandro,

I dont think I can offer a better explanation than Dave. :-).

As mentioned above, the daemons bind themselves to any port available in the dynamic port range.

Rpcbind will help the clients to get connected to the port a particular RPC service has registered itself.

NFS server daemon nfs always listens on UDP/2049.

-- Sundar.
Learn What to do ,How to do and more importantly When to do ?
Mark Bridgett
Occasional Advisor

Re: NFS Port

Did this issues ever get resolved? Dave's reply from quite some time ago seemed to imply a future HP-UX upgrade may support this but I can't find any evidence of this actually happening.

regards
Mark
Think first, beer later.
Dave Olker
Neighborhood Moderator

Re: NFS Port

> Did this issues ever get resolved?

The NFS lab is getting ready to release a patch for 11i v2 (11.23) that will allow you to configure fixed port numbers for rpc.lockd, rpc.statd and rpc.mountd. In other words, you could configure your system to always make mountd run on port 32000, lockd always run on 4045 and statd run on 32001.

This would then allow you to put an NFS server behind a firewall and only open up ports 111 (rpcbind), 2049 (nfsd) and the three other ports used by mountd, lockd, statd. This should greatly simplify the firewall configuration of HP-UX NFS servers.

I've given feedback to the lab that the same fix should be ported back to 11i v1 (11.11). The lab is considering that request now.

The 11i v2 patch should be coming out in the next couple of months. 11i v3 will have this capability when it releases.

Regards,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Mark Bridgett
Occasional Advisor

Re: NFS Port

Great thanks Dave.
Think first, beer later.
DJR
Advisor

Re: NFS Port

http://www2.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=PHNE_34662

( SR:8606391790 CR:JAGaf51922 )
The rpc.lockd, rpc.statd, and rpc.mountd daemons use random
ports for transport connections. This makes it difficult to
configure firewalls which require specific port numbers to
be used.

Resolution:
An interface is provided for assigning port numbers for the
rpc.lockd, rpc.statd, and rpc.mountd daemons. To assign port
numbers, add the following variables to the end of the
/etc/rc.config.d/nfsconf file:
LOCKD_PORT=
STATD_PORT=
MOUNTD_PORT=