Ephemeral ports

  • Thread starter Thread starter Karthik Balaguru
  • Start date Start date
K

Karthik Balaguru

Hi,
While looking for some valid port configurations,
i came across that in Solaris 2.2 by default the
ephemeral ports for TCP and UDP start at 32768.
Just eager to know the reason of why does it
start at 32768 (2 to the power of 15) ?
And i wonder why does it not follow the IANA range ?

Interestingly, many linux kernels also use the
same and why do not they stick towards IANA range ?

BSD and Windows stick towards 1024 to 4999
and 1025 to 5000 respectively, while Vista and
FreeBSD stick towards IANA range !

Any ideas ?

Thx in advans,
Karthik Balaguru
 
Hi,
While looking for some valid port configurations,
i came across that in Solaris 2.2 by default the
ephemeral ports for TCP and UDP start at 32768.
Just eager to know the reason of why does it
start at 32768 (2 to the power of 15) ?
And i wonder why does it not follow the IANA range ?

It is half way between all the 0-65535 ports there are. An nice
generalized setting.
Interestingly, many linux kernels also use the
same and why do not they stick towards IANA range ?

Depends also how you use the box.
BSD and Windows stick towards 1024 to 4999
and 1025 to 5000 respectively, while Vista and
FreeBSD stick towards IANA range !

Windows is an abortion. You should never use a outgoing source port
less than 1024 to avoid problems with starting up reserved services.
Unless you are a "system" services program.

For example, say I want to start Apache with SSL. But some dumb user
process is source porting 443. I have to find the dumb process and kill
it to avoid the port conflict. Real dumb move on Micrsoft's network
illiterate programers. Hell, Micrsoft even uses reserved port 0. If
you like hacking Microsoft, you know of port 0.

Some believe, and I concur, Microsoft did this to be a awkward shit.
Knowing most firwalls of the time would block all services below 1024,
and would trip out on a source port below 1024. As services below 1024
are supposted to be reserved ports for system use only. Not clients
using temporary ports.

In xNIX, ports 1-1023 are privelged ports. And should only be used for
what they were intended for and nothing else.
Any ideas ?

Just know how each works, and work with it.
 
Hi,
While looking for some valid port configurations,
i came across that in Solaris 2.2 by default the
ephemeral ports for TCP and UDP start at 32768.
Just eager to know the reason of why does it
start at 32768 (2 to the power of 15) ?
And i wonder why does it not follow the IANA range ?

Interestingly, many linux kernels also use the
same and why do not they stick towards IANA range ?

BSD and Windows stick towards 1024 to 4999
and 1025 to 5000 respectively, while Vista and
FreeBSD stick towards IANA range !

Any ideas ?

Solaris systems are often used for servers with hundreds of thousands
of network connections. Hence it is also often used for testing these
servers supporting a million or so network connections. By doubling
the number of ephemeral ports available, you can create twice as many
connections from a testing system to the server per IP address.
Solaris allows the tcp_smallest_anon_port (and tcp_largest_anon_port)
to be changed whilst system is running, and on testing systems, the
tcp_smallest_anon_port is sometimes lowered to make even more anon/
ephemeral ports available. Same can be done for UDP.
 
Hi,
While looking for some valid port configurations,
i came across that in Solaris 2.2 by default the
ephemeral ports for TCP and UDP start at 32768.
Just eager to know the reason of why does it
start at 32768 (2 to the power of 15) ?
And i wonder why does it not follow the IANA range ?

Two reasons. First, there aren't enough low ports in cases where
applications make large numbers of outgoing TCP connections like web
crawlers do. Second, there tend to be a lot of quasi-reserved ports
below 32,768 (such as 6666, 7000, 8000, 8080, and many others) and it
could cause some inconvenience if these ports were used accidentally.

DS
 
Back
Top