netdev
[Top] [All Lists]

Re: Opening more than 65000 sockets

To: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Subject: Re: Opening more than 65000 sockets
From: Sridhar Samudrala <sri@xxxxxxxxxx>
Date: Fri, 29 Mar 2002 11:08:18 -0800 (PST)
Cc: Yan-Fa Li <yanfali@xxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <3CA4A4EE.3030706@candelatech.com>
Sender: owner-netdev@xxxxxxxxxxx
On Fri, 29 Mar 2002, Ben Greear wrote:

> 
> 
> Yan-Fa Li wrote:
> 
> > It fails in the connect() call.  I get EAGAIN messages.
> > They are TCP socekts.  I have my file-max at 1 Million
> > files, and ulimit the same.
> > 
> >>Port space is unique for a protocol (i.e.: TCP or UDP)
> >>across a host, independent of interfaces.
> >>
> 
> 
> That really looks like a bug or mis-feature to me.  Why
> would we want this limitation?  What would be the problems
> with fixing it to be per-local-interface?

you can use the socket option SO_REUSEADDR to bind the same port to 
multiple sockets, as long as each bind specifies a different local IP
address.
In this way the port space becomes unique for each local ip address. 

Thanks
Sridhar


<Prev in Thread] Current Thread [Next in Thread>