Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

What exactly is a Registered port [ 1024-49151 ] and how to use it?

Writer Matthew Barrera

I've come across the below definition for registered ports,

  • Registered Ports 1024-49151 are available for registration at IANA for more common purposes since they are available for regular users to bind to.
  • 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)

According to the above definition, I've some questions to clarify

  1. What exactly is a registration at IANA? and how to register a port at IANA?

  2. Is it good practice to use the registered port for client's own purpose? If not, why is that?

  3. If 2nd question's answer is No then, Why dynamic ports [ 49,592 - 65,535 ] should only be used for clients and not the registered ports?

1 Answer

Q: What exactly is a registration at IANA?

A: IANA is responsible for coordinating some of the key elements that keep the Internet running smoothly to include providing a list of "service names" (for protocols like FTP, HTTP, etc) coupled with the ports they will operate on. If there was no IANA, chaos would ensue.

Q: How do I register a port with IANA?

A:

Q: Is it good practice to use the registered port for client's own purpose? or If not why is that?

A: No, not for a client's own purpose. I doubt the IANA would give you one anyway without a good reason. Generally port registration exists for protocols that are intended to be used outside of a closed system where many (and I mean MANY) people might be using it. You just need to pick a commonly unassigned port and move on (or better still, ask your friendly neighborhood IT professional what port to use). Please note that ports should NEVER be hardcoded. You will tie the hands of admins who might need to juggle them around. THAT is what makes the registration unnecessary. Even if you did get a registered port number, it is just a suggestion. For instance, an HTTP web server doesn't HAVE TO BE on port 80.

Q: Why dynamic ports [ 49,592 - 65,535 ] should only be used for clients and not the registered ports?

A: You shouldn't think of these as available for use until you have a much better understanding of network ports. MOST services and network applications do not address these ports directly. These ports are often called ephemeral ports and are needed by the operating system and applications to assign temporary (or private) ports to return traffic. Only advanced programmers and the operating system itself should be using them directly. When you need to use one, you will know it. Think of them as "random and temporary".


TCP/IP and networking in general is fairly complicated and I barely scratched the surface to your questions but this is the basic gist of it. Some of what I said is arguably wrong (for simplification) but close enough for you to get the idea.

I suggest you take what I said above and read these:

This is religion for some people so I say to any haters.. if I made a mistake, just tell me and I will fix it (or fix it yourself). Your suggestions are welcome :)

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy