2

Is the distinction between ports under and above port 1024 exists only in TCP and UDP protocols?

I want to know if in other protocols (i.e. not TCP and UDP) such a distinction between "root" and "non-root" users exists, respective to ports under and above port 1024.

3
  • 1
    What distinction you mean. If you talk about the distinction between privileged and unprivileged ports regarding the permissions needed for binding: this is a OS level concept and not a network concept, i.e. off-topic. From the perspective of the network protocols the ports below 1024 are not special at all. Jun 23, 2021 at 5:54
  • @SteffenUllrich I want to understand if in other protocols (i.e. not TCP and UDP) such a distinction between "root" and "non-root" users exists, respective to ports under and above port 1024. Jun 23, 2021 at 6:42
  • Again, this is off-topic here since it is a feature of the OS, not the network. But yes, such distinction exists. Access to raw sockets (which are for example needed to send ICMP messages like for ping) is restricted to privileged users too at least on UNIX like systems. Jun 23, 2021 at 10:57

1 Answer 1

2

Even TCP and UDP do not have such a distinction. Read the RFCs for those protocols, and there is no mention of that. IANA assigns the port numbers, and it decided that ports below 1024 are Well-Known port numbers. See the Service Name and Transport Protocol Port Number Registry, where IANA has chosen different port ranges for different functions:

Port numbers are assigned in various ways, based on three ranges: System Ports (0-1023), User Ports (1024-49151), and the Dynamic and/or Private Ports (49152-65535); the difference uses of these ranges is described in [RFC6335]. According to Section 8.1.2 of [RFC6335], System Ports are assigned by the "IETF Review" or "IESG Approval" procedures described in [RFC8126]. User Ports are assigned by IANA using the "IETF Review" process, the "IESG Approval" process, or the "Expert Review" process, as per [RFC6335]. Dynamic Ports are not assigned.

It just so happens that OS manufacturers have decided to restrict some port numbers, but that is off-topic here. Even the different OS vendors do not agree on all the port assignments. What IANA calls Dynamic or Private Ports (ephemeral ports) are actually different ranges on different OSes.

The distinction you see is not part of the protocol, it is something that the OS manufacturers have implemented based on the IANA assignment distinctions.

1
  • Thanks Ron, your answer helped me to make order for myself, about that subject. Jun 23, 2021 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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