From: Rafi Kosot <rafi972@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Aliased interfaces and binded sockets
Date: Wed, 13 Jul 2005 22:49:26 +0200 [thread overview]
Message-ID: <658687d305071313494faeb53f@mail.gmail.com> (raw)
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
reply other threads:[~2005-07-13 20:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=658687d305071313494faeb53f@mail.gmail.com \
--to=rafi972@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox