Your definition for dynamic ports looks clearer in some ways, than any of the answers.
You write
dynamic ports are client side and are used only for the active
session. once it expires the port becomes available again. These are
only used so the traffic comes back to the correct user".
I'd just amend that last word to "client".
Users aren't relevant, it's all about the computers. Users just facilitate the communication of the computers!
The server can use the IP to send it to the right computer(the client computer). It got a packet it sees the source IP of the packet it got and it can write that in as the dest IP when it sends the packet out.
Toomgo points out in his comment, that a process can start many "conversations".
The client port will identify which conversation that packet is part of.
You write
well known ports are used for listening and are port forwarded to
send traffic to a specific ip
I'd say well known ports are for listening. So, as you know, they're server side. The computer with the port that listens is the server (according to a main definition for server anyway)
NAT Routers if they're doing port forwarding, would port forward to them. But Port forwarding is something that if done, is done on the "NAT router" but you could connect from one computer in your LAN, to another computer in your LAN. No port forwarding. So it's not part of any definition of when you are using a well known port.
Registered - don't understand at all
i'm not sure that I do either.
It looks like they might just be the same as well known ports but not as well known.. i.e. one could call them less well known ports. And the so-called well known ports are < 1024, and the so-called registered ports are over 1023.
Really technically it doesn't matter what IANA say a port is for. People can run servers on any port they want as long as they know or find out what is running on the port so they know what they're connecting to / what port to connect on. Of course if you're dealing with people that expect something to on a particular port or software expects it, then you might want to use that port. Like port 80 for webpages.. and some use port 8080 for internal web. Or as a memory aid you might want to stick to convention. As one layer of security people sometimes run a server on a high port so a hacker can't guess it.
A NAT router if doing port forwarding, would port forward to them too.
So the distinction you made, is the best. The dynamic client side ports, and the server side ports. And yeah if any NAT router is doing port forwarding, they'd do it to the server side ports. And IANA seems to have lists that name the server side ports numbers with what conventionally would be on there, and they categorize the lists, with the conventions for ports < 1024 as "well known"and the conventions for ports > 1023 as "registered" which I guess is like less well known. But technically I guess there isn't really a difference beyond that.
Simon, if you have any question on any post then comment on the answer that has been posted, and they can clarify. That can make answers, and your understanding of them, even better. – barlop – 2015-08-13T11:38:11.777