1834814 Members
2858 Online
110070 Solutions
New Discussion

maximum socket number

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

maximum socket number

Can anyone direct me to where I can find info on the maximum allowable number for a socket, not maximum number of sockets ?
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: maximum socket number

Shalom,

That is controlled with ndd or /etc/rc.config.d/nddconf

If you run ndd -help

You will see parameters for the maximum udp dockets. This will if changed be able to permit you to change the number that free udp sockets start at.

The default is 20,000 for HP-UX 11.11 (approximately) and can be changed to leave more free udp sockets.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
spex
Honored Contributor

Re: maximum socket number

Hi Tim,

The maximum TCP port number is (2^16)-1 or 65535 on HP-UX and a host of other operating systems.

PCS
Tim Nelson
Honored Contributor

Re: maximum socket number

Thanks Steven,

I see some settings for smallest port number to use but not largest.

I will keep reading.

Tim Nelson
Honored Contributor

Re: maximum socket number

Thanks SPEX,

16 bits makes sense. Documented anywhere ?
spex
Honored Contributor
Solution

Re: maximum socket number

Tim,

Here's a link to the BSD Sockets Interface Programmer's Guide:
http://docs.hp.com/en/B2355-90136/ch01s01.html
Scroll down to "port".

I'm not sure that this is rigorous enough for you...

PCS
James R. Ferguson
Acclaimed Contributor

Re: maximum socket number

Hi Tim:

Perhaps you will find this of help:

http://www.iana.org/assignments/port-numbers

Regards!

...JRF...
Tim Nelson
Honored Contributor

Re: maximum socket number

Thanks Guys !! This works..
rick jones
Honored Contributor

Re: maximum socket number

Out of curiousity, why do you ask? Are you trying to find the limit on the number of connections between a pair of IP addresses or something?
there is no rest for the wicked yet the virtuous have no pillows
Tim Nelson
Honored Contributor

Re: maximum socket number

Apologize for not replying. Email notifications must have confused.

Reason: An application admin wanted to know what the max was to pick for an application port.

Tim Nelson
Honored Contributor

Re: maximum socket number

The above information answered the question.
rick jones
Honored Contributor

Re: maximum socket number

The theoretical maximum number for a socket is probably MAX_INT since a socket is simply a file descriptor which is IIRC an "int."

A _port_ number as already described, is for TCP and UDP at least, a 16 bit quantity. I cannot remember if SCTP kept a 16 bit port number or if it increased the size of that field.

While the TCP or UDP endpoints associated with a socket may be bound to a given port, a socket is not a port, and a port is not a socket.
there is no rest for the wicked yet the virtuous have no pillows