Aliased interfaces and binded sockets

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

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux