Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey, i want to know much about port numbers used by source (clients) and destination (servers). Can clients get any port number or is there are common way to give them port numbers? As an example if port number is less than 1024, can i say that this is 100% server port number.

this information is important for me specify the endpoints only with port numbers in our network.

share|improve this question
up vote 2 down vote accepted

No. Unless the client explicitly binds to a specific source port (uncommon), the port used by client applications is determined solely by the operating systems network stack. These are known as ephemeral ports. On Linux the range is commonly 32768 - 61000.

The ports 0 - 1023 are considered "well-known" ports, and are nearly universally* reserved for specific well-known servers. e.g. 80 - HTTP, 443 - HTTPS, 22 - SSH.

*Some are client ports, e.g. BOOTP

There are many "registered" ports in the range 1024 - 49151 although many OSes will allocate client ports out of a subset of this pool (e.g. Linux overlaps from 32768-49151).

For further information, Wikipedia has a full list of TCP and UDP port numbers.

share|improve this answer
is that possible to give me an official RFC or document about your claims so it will be better for me. Thanks +1 – Berkay Jan 19 '11 at 8:28
@Berkay: RFC 1700 - This and many others are listed in the Wikipedia article referenced above. – hobodave Jan 19 '11 at 17:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.