Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

solaris ports usage

Posted on 2002-03-15
6
Medium Priority
?
427 Views
Last Modified: 2013-12-27
hi,
   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
0
Comment
Question by:siunix
  • 4
6 Comments
 
LVL 5

Expert Comment

by:nebeker
ID: 6869264
Ports go from 0 to 65535.  Anything below 1024 is considered "reserved", and you must be running as root to listen on those ports...
0
 

Author Comment

by:siunix
ID: 6869407
why does the apps use big port like 45000?
0
 
LVL 5

Accepted Solution

by:
nebeker earned 400 total points
ID: 6869419
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.

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 6869659
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.
0
 
LVL 5

Expert Comment

by:nebeker
ID: 6869705
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...
0
 
LVL 5

Expert Comment

by:nebeker
ID: 6887124
Has your question been answered?  If so, please accept one of the above comments as an answer and close this question.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month6 days, 11 hours left to enroll

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question