Operating System - HP-UX
1854683 Members
5195 Online
104102 Solutions
New Discussion

How to define TCP/IP outbound ports

 
SOLVED
Go to solution
A.Vishwanath_2
Advisor

How to define TCP/IP outbound ports

Dear All,

Can you please help me in defineing the TCP/IP Outbound ports in HP-UX11i v2 (11.23) on IA64. Is there any way to do this.

In TRU64 Unix we can define in kernel the minimum starting port number.

TIA
Cheers,
Vishwanath A
3 REPLIES 3
Hemmetter
Esteemed Contributor
Solution

Re: How to define TCP/IP outbound ports

Hi Vishwanath

This is the Command that you're searching for:

# /usr/bin/ndd -set /dev/tcp tcp_smallest_anon_port 50001
# /usr/bin/ndd -set /dev/tcp tcp_largest_anon_port 61000
# /usr/bin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port

The file to make it persistent is:
/etc/rc.config.d/nddconf

rgds
HGH
A.Vishwanath_2
Advisor

Re: How to define TCP/IP outbound ports

Thanks HGH i was looking for the same.
rick jones
Honored Contributor

Re: How to define TCP/IP outbound ports

If you have an application that wants to churn through a large number of ports - say lots of connection establishment and tear-down - you might want to consider two alternatives:

1) Use the connections longer so create/destroy fewer at a time

2) Have the application make explicit bind() calls to select port numbers. For example, a full set of port numbers in the range of 5000 to 65535. Stuff like netperf TCP_CRR and SPECweb do that.

The nice thing about option 1 is you will save CPU overhead on the TCP connection setup and teardown.

The nice thing about option 2 is you will not depend on the systems' ndd settings.
there is no rest for the wicked yet the virtuous have no pillows