I'm stuck trying to setup more than 65536 outgoing TCP connections from a Linux (RedHat5) box.
I have already configured both outgoing and accepting boxes to allow enough file descriptors.
I don't believe there is a problem on the accepting side - I have multiple target boxes, each with multiple IP addresses and I'm using multiple ports.
On the outgoing side I don't believe I'm hitting a limit per IP address - I'm using multiple IP addresses and ports (I'm opening connections from ports 30,000 - 60,000 for each of several IP addresses).
Is there some Linux kernel tunable parameter I'm missing? Or some fundamental limit in TCP?
The failure is that my app for opening the connections is hanging in the connect() call.
Thanks for any help NickB
Here is a blog where somebody got > 1,000,000 outbounds from a box.
The TCP protocol only uses 16 bits for both destination and source port. There will be no way to have more than 65536 ports open at once - not even with Linux.
In this context, a "single interface" means a single network care with a single IP address assigned to it. Each outbound TCP connection is bound to a separate port, so your example is not possible.