Messages in this thread | | | Date | Wed, 13 Jul 2005 22:49:26 +0200 | From | Rafi Kosot <> | Subject | Aliased interfaces and binded sockets |
| |
I have a few aliased interfaces defined on my eth device (eth0:0, eth0:1, etc.) each alias has a different ip address. I noticed, that when binding a socket to an ip address (with port=0 - "don't care"), for outgoing connection, the port number allocated to the different ip address are distinct (i.e. no overlap). More than that - when the number of connection exceeds ~60K (in total over all the aliased interfaces) I get an error EADDRINUSE, though on each one of the aliased interfaces the number of connections is less than 10,000. It seems like all the aliased interfaces are actually considered as a single interface! I looked for the problem in inet section of the kernel, specifically the function tcp_v4_get_port(..), which is responsible for port allocation when binding with port=0. Ss far as I understand the ports are allocated regardless of the interface involved. In other words - only 64K tcp enpoints are possible, over all interfaces. Is this true? Has someone noticed the phenomena? Is it possible to bind more than 64K ports over different aliased interfaces? (Just for the record, I used ulimit -n 128000 so there's no ulimit problem here).
thanks, Rafi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |