0

In basic networking services, (e.g ssh) why we use statically assigned port number? What are potential problems with allowing services to select their own port in the applications provided by us?

Mike Pennington
  • 30,049
  • 12
  • 82
  • 153
user14945
  • 47
  • 1
  • 5

3 Answers3

1

Ultimately you are free to do what you like but avoiding common ports is always a plus and stops conflicts of services.

Smithy2k3
  • 311
  • 2
  • 9
0

Imagine the World Wide Web (www) without standardization of port [tcp] 80 for HTTP or 443 for HTTPS. Or email if SMTP wasn't typically found on port 25. How would browsers or mail servers know which port to use to reach the multitudes of servers littered all over the internet?

As @smithy2k3 noted, you can configure whatever port you want, assuming that port is communicated to the client somehow -- sneakernet or email come to mind -- and you're able to traverse your protocol through firewalls that may be inspecting the traffic on certain ports for rewrite -- FTP on tcp/21 and SIP on udp/5060, for example.

generalnetworkerror
  • 7,144
  • 6
  • 34
  • 66
0

If you were to allow applications to select ephemeral port numbers at their own discretion, there would be no layer of security at the network level.

Solitarium
  • 21
  • 1