Take the 2-minute tour ×

What is the difference between the three port types; Well-known, Registered and Dynamic? Namely, the difference in usage and port numbers associated with each category.

Currently I understand the port ranges for each catergory are as follows:
Well-known: up to 1023.
Registered: between 1024 and 49151.
Dynamic: between 49152 and up to 65535.

share|improve this question

migrated from stackoverflow.com Apr 20 '12 at 4:13

This question came from our site for professional and enthusiast programmers.

1 Answer 1

There are some practical and some conventional differences.


  • On Unix and Unix-like systems, only the superuser can bind services to ports <1024. These ports are assigned by IETF [1] (well, IANA says [2] that they are assigned by IETF, and IETF says [1] that they are assigned by IANA, but they mean that IETF suggests the assignments and IANA keeps the authoritative list).


  • Ports 1024--49151 are available for registration at IANA for more common purposes since they are available for regular users to bind to. This is why they are used for e.g. game servers. The registration is an effort to try to avoid port clashes (which happens anyway, since not everyone thinks it's worth the trouble to register).
  • Ports 49152--65535 are explicitly not available for registration [2]. This ensures that they can be used by any application, after checking that they are not already in use. Since the 1024--49151 range can be registered, if an application would take the first available port in that range, a clash might occur when the registered application later would start up. Similarly, there is an advantage in being able to be "sure" (in theory) that a certain port corresponds to a certain service.

All these mentioned differences are specified through [2], but in practice as I mentioned not everyone adheres to the registered port assignments. You'll find almost none of the common game server ports (e.g. 27015 for Counter-strike, 6889 for Starcraft) listed, and there are in practice conventional system ports (411 for Direct Connect) that also are not registered. The superuser binding requirement on ports <1024 is also just an OS restriction.

IANA keeps the authoritative list on port number assignment [2].

share|improve this answer

Your Answer

