Why does the client end of a connection use high port number(ephemeral ports) whereas the applications listen on typically small port numbers ?
Thx in advans, Karthik Balaguru
Ports numbers under 1024 are called "registered", while those above (limit of 65,535) are called "unregistered". All these two terms mean is that ports under 1024 have standard services associated with them. IE: 53 for DNS, 80 for HTTP, 25 for SMTP, etc. Note they are associated - there is nothing to stop you from setting your application to use port 53, 25, etc but it's not recommended because other services will attempt to connect and or operate on these ports so it could cause problems.
The unregistered port region is dynamically used by client applications. IE: You are reading this answer while connecting to port 80 of the StackOverflow.com webserver(s), but your browser is using an unregistered port to initiate that request.