System Administration
Showing results for 
Search instead for 
Do you mean 

how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port

SOLVED
Go to Solution
Highlighted
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
HPE Pro

Re: how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port

How about after "ndd -c"?

Dave
HPE Pro

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
Honored Contributor 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.