Multiple source IP addresses & port assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible to allow the automatic source IP address assignment to select among a number of available IP addresses, not only a single one per route?

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 function
has 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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux