Re: how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port (385 Views)
Reply
Occasional Visitor
azuberi
Posts: 1
Registered: ‎07-21-2013
Message 1 of 4 (417 Views)
Accepted Solution

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

HP Pro
Dave Olker
Posts: 1,432
Registered: ‎10-10-2002
Message 2 of 4 (407 Views)

Re: how set Kernel parameter for tcp_smallest_anon_port, udp_smallest_anon_port

How about after "ndd -c"?

Dave
HP Pro
Dave Olker
Posts: 1,432
Registered: ‎10-10-2002
Message 3 of 4 (406 Views)

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
Bill Hassell
Posts: 14,226
Registered: ‎05-29-2000
Message 4 of 4 (385 Views)

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.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.