• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • Last Modified:

solaris ports usage

   I notice that application on solaris uses very
high port number, like 35000, when it tries to talk to the server.  I have an application running on port 1461,
when the client send a request to the server,
its destination port is 1461, and the source port
is 45009, which 45009 so big?  Is there a range
of ports that solaris uses?

thanks in advance
  • 4
1 Solution
Ports go from 0 to 65535.  Anything below 1024 is considered "reserved", and you must be running as root to listen on those ports...
siunixAuthor Commented:
why does the apps use big port like 45000?
It is arbitrary.  An application can use any port it wants (above 1024), so developers tend to choose large number that probably won't conflict with other applications.

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

developers tend to use socket() call to get a free socket/port for the system, its number is random if not explicitely requested. See man socket, man connect.
That's only true for a client program, of course :)

A server type program wouldn't function very well if the clients didn't know where to find it...
Has your question been answered?  If so, please accept one of the above comments as an answer and close this question.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now