Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.