Choosing a default port for a TCP/IP application

352565 pts.
Tags:
Port listening
TCP/IP
I’m developing an app that will listen in on a TCP/IP port. How do I choose the default port upon which it will listen? I hope to limit port conflicts when it is installed across our network.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You’ll want to look and see what ports are currently in use on the network. The simplest way is to use a network analyzer such as WireShark or, ideally OmniPeek (its ‘monitor’ mode is perfect for this since it doesn’t capture all packets) to see what’s running.

You can also look at your servers/workstations to see what’s running as well (netstat -an|more at a Windows command prompt). Usually the higher the port number, the less likely it is to be in use.

Here’s the official port number listing by IANA that’d be good to check as well:
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following