I ask because I am running some performance testing applications creating very many TCP connections/s and even with the ip_local_port_range at its maximum 1024 65535 I frequently run out of local port numbers causing new outgoing connections to fail.
I can obviously modify this in the application by manually binding to different addresses to get around this, but I wonder if it can be solved by routing somehow to simplify this. Binding is not always trivial as it is a bit hard to know which IP address is most suitable at the moment due to the dynamics of the application and the delay induced by TIME_WAIT before a previously used port becomes free.
Running Fedora Core 2 / 2.6.8-1.521.
From reading the kernel source it seems the local port assignment functionhas much to ask, only assigning a source port unless that source port is not used by any connection on the system irregardless of the source IP. Is this really true? If so then any applications rapidly creating new connections is basically forced to do manual address:port assignments.
Regards Henrik - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html