Greetings,

Many people say the maximum number of client ports is 64K. However, TCP 
connections only require unique sockets, which are defined as...

local_IP:local_port -> remote_ip:remote_port

Theoretically, it is possible for a client process to keep using the same local 
source port, as long as the connections are to a unique destinations. For 
example on a local machine, the following connections should be possible...

192.168.5.100:1400 -> 192.168.5.200:3306
192.168.5.100:1400 -> 192.168.5.201:3306
192.168.5.100:1400 -> 192.168.5.202:3306
192.168.5.100:1400 -> 192.168.5.203:3306

I've seen this demonstrated successfully here:

https://serverfault.com/questions/326819/does-the-tcp-source-port-have-to-be-unique-per-host

As someone on that page pointed out, while it is possible, it does not commonly 
occur in practice "because most TCP APIs don't provide a way to create more 
than one connection with the same source port, unless they have different 
source IP addresses." This leads to the 64K maximum client port range, but it 
is really a limitation of the APIs, not TCP.

So how does tomcat handle things? Is it limited to a maximum 64K client source 
ports, or is it 64K per destination, as it should be?

--Eric


Disclaimer : This email and any files transmitted with it are confidential and 
intended solely for intended recipients. If you are not the named addressee you 
should not disseminate, distribute, copy or alter this email. Any views or 
opinions presented in this email are solely those of the author and might not 
represent those of Physician Select Management. Warning: Although Physician 
Select Management has taken reasonable precautions to ensure no viruses are 
present in this email, the company cannot accept responsibility for any loss or 
damage arising from the use of this email or attachments.

Reply via email to