what is port number work on internet

If there have incoming message form the internet. How does port mumber determine which service they sould handle with.
Who is Participating?
Lee W, MVPTechnology and Business Process AdvisorCommented:
Your computer hear any incoming messages from the internet UNLESS there's something on your computer listening for that message.  The messages are addressed to a specific port.  If there's no program listening for information on that port, then your computer ignores the message.

Think of it like 65000 phone numbers (there are Roughly 65000 ports).  If you call a port and someone isn't there to answer the phone, it just rings and rings (assume no answering machine).
Port numbers do not determine the service, the service determines which port it is using.  There are well know ports, like port 80 & 443 for http and https.  But in reality any service can listen on any port that it can be configured for, so you can "listen" for http traffic on port 8080 if you configure you web service to do so.
Irwin SantosComputer Integration SpecialistCommented:

View that link for what most common ports are used for.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

You can look at irwin's link, it's a good one. But as far as a lot of things go, GENERALLY the port that programs send traffic to are already agreed upon such as 80 for http traffic, 443 for https, 21 for ftp, 53 for dns, etc. Think of these as agreed upon guidelines. However, that doesn't mean that port is the only one the server is allowed to listen in on. You can configure many servers to use a different port, as long as the client knows to look at that port instead.

Example: www.foo.com uses port 8080 for web traffic instead of 80... so the client needs to know to go to http://www.foo.com:8080 instead of just http://www.foo.com .. why? when you type in a web address without a port number, the browser will assume to go to port 80. It's more or less a defined standard that's not followed 100% of the time.

When you have a server, you define the port you want to "listen" for traffic of a particular type. But if you do not define one and set up a given service, the standard port for the service you've set up will be the listening one.

These standards are also used by software companies to make life easier for users. They will give you the flexibility to specify a port number if you have to, but by default they'll assume the defined standard port for the given service. Think of it like me calling you at your home number unless you tell me to call you at a another number.

Make sense?
Hello teera,

http://www.iana.org (Internet Assigned Numbers Authority) is a good start for this kind of information.  In particular: http://www.iana.org/assignments/port-numbers.

A program has to listen on a specific port (or range of ports), otherwise that port is like knocking on the door of an empty house.  Programs that use 'well-known' ports, tend to take their port numbers from this file.


the same file is /etc/services (much more sensible!).

So if you changed the line beginning "telnet" from, "telnet 23/tcp" to "telnet 10023/tcp", your telnet server (depending on what it is) would listen on port 10023 by default.  As most telnet server's allow you to manually specify a port that will override this setting, it may be a bad example - but you know what I mean I hope!

Steve :)
Dushan De SilvaTechnology ArchitectCommented:
sommand line type


BR Dushan
Irwin SantosComputer Integration SpecialistCommented:
cool. thank you!
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.

All Courses

From novice to tech pro — start learning today.