In the early internet years, your ip address was your identifier. It would have been absurd for your ip address to ever change. That changed quickly.
In the early internet years, fixed ports were the service locator. Yet this has not evolved.
As another commentor said, you can now only run one instance of a service per IP, which is aburdly wasteful of the possible ~65k inbound ports. TLS and SNI have come up with workarounds, but the root problem is still, port numbers should be available for anything, and we should have a system for service location. DNS is certainly an option, but there are other practical ways to do it.
Sadly it probably won't ever happen because of the numerous packet forwarding layers that have baked-in security expectations that "HTTP = 80" and "HTTPS = 443", etc. It'd still be nice to reach that promised land, but I think the damage has already been done.
I know it's not viable, but yet I've always felt IPv6 would have been a nice opportunity to extinguish port numbers. Just give each service its own IP from the /64 the host was allocated.
Then you could have one DNS entry per service. That would have been perfect for residential IPv6 with dynamic prefixes, which require dynamic DNS anyway.
Ah I get what you mean now. For the most part I just don't care about similar things running on the same port, because I've got many thousands of addresses I could just choose to listen to. I can have tons of different things listening on :80 or :443 or whatever on IPv6.
> which is aburdly wasteful of the possible ~65k inbound ports
What is being wasted? It's not as if those extra ports have additional bandwidth or processing power available to them that you wouldn't otherwise have. You also need a spare port if you're going to do any outbound connections.
Worst case, as far as I can see, is that CGNAT providers might require more outbound IP addresses than they might ideally need if more ports were actually used; but in the general case, there is no reason to care about "wasted" ports.
what is wasted?
IPs.
not like IP addresses themself were not an actifical limit - but let set aside this for now.
if i setup an MX, it still needs to be on port 25, because the vast majority of MTAs are not capable of service discovery; and there is no Host header or SNI/ECH for SMTP, so for each mail.DOMAIN.TLD i have to buy an IP, just to put them over a single multi-domain postfix/exim in order to please those MTAs who are requisiting the HELO name to match to the MX's reverse record.
how wonderful a world-wide adoption of rfc 6186 would be to able to put multi-domain mail server on a single IP.
In the early internet years, fixed ports were the service locator. Yet this has not evolved.
As another commentor said, you can now only run one instance of a service per IP, which is aburdly wasteful of the possible ~65k inbound ports. TLS and SNI have come up with workarounds, but the root problem is still, port numbers should be available for anything, and we should have a system for service location. DNS is certainly an option, but there are other practical ways to do it.