Operating System - HP-UX
1745793 Members
3777 Online
108722 Solutions
New Discussion

how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port

 
SOLVED
Go to solution
azuberi
Occasional Visitor

how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port

How to set kernel Parameter

tcp_smallest_anon_port 9000
tcp_largest_anon_port 65500
udp_smallest_anon_port 9000
udp_largest_anon_port 65500

 

I edited /etc/rc.config.d/nddconf file as follows but still show old value

 

TRANSPORT_NAME[0]=tcp
NDD_NAME[0]=tcp_largest_anon_port
NDD_VALUE[0]=65500
#
TRANSPORT_NAME[1]=tcp
NDD_NAME[1]=tcp_smallest_anon_port
NDD_VALUE[1]=9000
#
TRANSPORT_NAME[0]=udp
NDD_NAME[0]=udp_largest_anon_port
NDD_VALUE[0]=65500
#
TRANSPORT_NAME[1]=udp
NDD_NAME[1]=udp_smallest_anon_port
NDD_VALUE[1]=9000

3 REPLIES 3
Dave Olker
HPE Pro

Re: how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port

How about after "ndd -c"?

Dave
I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Dave Olker
HPE Pro
Solution

Re: how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port

Also you need to renumber the entries so they are unique. There are 4 entries so they should be 0,1,2,3 and not 0,1,0,1.

Dave
I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Bill Hassell
Honored Contributor

Re: how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port

To expand on Dave's comments, the items in nddconf are enumerated as simple shell arrays. There are dozens of ndd pararmeters, so the method chosen to set the values is with arrays. In your example, the first two parameters [0] and [1] were replaced by the values in the last two [0] and [1] value sets. Each unique requires a new index such as [2] and [3]. 

 

VERY IMPORTANT: Do NOT save any previous files in /etc/rc.config.d such as nddconf.old or nddconf.prev. These files will also be run as part of bootup and since they are sorted alphabetically later, these old values replace the new values. Always store previous copies of files in /etc/rc.config.d/old (create this directory). The startup scripts will not run anything in the old directory.



Bill Hassell, sysadmin