1834395 Members
1676 Online
110066 Solutions
New Discussion

questions about TCP port

 
SOLVED
Go to solution
eric ye
Occasional Contributor

questions about TCP port

1. What's the maximum number of TCP ports can be opened by the system?
2. Is the maximum number determined by some kernel parameter?
3. How to check the number of TCP ports being used currently?
4.How to check the timeout set of one TCP connection?
How to modify it?

Thanks for your help!
1 REPLY 1
S.K. Chan
Honored Contributor
Solution

Re: questions about TCP port

1) Can be up to thousands, the maximum number of TCP connection or ports depends on a few things (see 2).
2) It depends on the amount of physical RAM that you have. Kernel wise it depends on "nfile" and "maxfiles". Both kernels will determine the amount of available system and process file descriptors (because each TCP connection need a file descriptor).
nfile=maximum system file descriptors.
maxfiles=maximum file descriptor a single process can use.
3) Use "netstat -a|grep \^tcp|wc -l"
4) I know that on 11.x you can use "ndd" command to set the timeout value of TCP connection which will take effect immediately for new connection. Man "ndd" for details. I prefer to modify /etc/rc.config.d/nddconf and reboot afterwards..(for example ..)
TRANSPORT_NAME[0]=tcp
NDD_NAME[0]=tcp_ip_abort_interval
NDD_VALUE[0]=