3 ms·
tcp[1] added an additional address segment, what is called the "port". in a perfect world this would not exists and it would be a single unified address(the ip
by somat 4y ago
tcp[1] added an additional address segment, what is called the "port". in a perfect world this would not exists and it would be a single unified address(the ip address) all the way down[2], but this was before the ip6 post address scarcity future and the port was seen as the way to allow each host to deliver many services.
The SRV record was the way invented to expose ports to the dns system. like how A records expose addresses to dns.
But sadly this too was in the future. so the interim method used was to have services running on commonly agreed ports, the well known ports.
And so here we are stuck with ports, those will never go away, and stuck with the "well known ports", at least we have a mechanism to name ports. if only more programs would get with the act.
1. yes yes udp exists and has ports, I know, feel free to fill in TCP/UDP whenever you see TCP, if that makes you happy.
2. the narrow waist is an amazingly useful phenomenon, everything being addressed the same gives you great flexibility... And... I have just seen the light, the skies opened up, an angel spoke. you are right. ignore ports completely(or at least as much as you can) and give each service it's own ip6 address. not sarcasm, but genuine enlightenment. I already do this for dns servers, dns servers hate to run off port 53, while there are ways to change the port nobody is happy about it, it is less pain to give each one it's own address and bind to that. (Q: why do you run multiple dns severs on one box? A: because I run unbound and nsd)