3 ms·
Ports are needed. Destination ports map to "listening" processes on a single machine; the abstraction is needed because more than one process on a system can u
by tenebrisalietum 5y ago
Ports are needed. Destination ports map to "listening" processes on a single machine; the abstraction is needed because more than one process on a system can use the TCP/IP stack.
> It makes way more sense to think of an IP address as the entire “address”+port tuple.
There's already a term for that - they call that a socket.
SNI has to do more with the "Host:" header of HTTP and the behavior of HTTP servers than anything else. Web servers started using that due to IPv4 address exhaustion and the need to host multiple "sites" on a single IP. IPv4 scarcity created a lot of twists in the end-to-end design, including this and NAT.
I think it would be cool if DNS gained the explicit capability to resolve names not only to IP addresses but also destination port. Not sure why it didn't. Certain apps can use SRV records or whatever but it's not standard.
- bblb 5y agoSRV solves so many issues. It was codified as a standard 22 years ago. Maybe because it was invented at Microsoft, and the "year 2000 M$" was evil, the free software/open source people weren't interested in it and now it's mainly used by Microsoft products; as far as I can tell from my own experience with it.
- dcow 5y agoIn IPv6 each host has 2^64 addresses and the kernel just advertises its configured prefix to its router which then delegates routing to it. Instead of one address multiplexed onto 65535 ports, since every host now has 1.844674407371e19 addresses just use those.
- qwertywert_ 5y agoThat does not seem easier to think about, which address was this process on, you now have 1 interface with possibly 100s of addresses, need to keep track which address is for what application.. Seems more logical to just do the IP+port tuple. Maybe having TCP and UDP on separate port "namespaces" is the confusing part here and someone above mentioned could be simplified.
- nybble41 5y agoIt's already typical to have multiple IPv6 addresses per interface, due to privacy extensions. You can see which IP address an application is listening on with netstat in the same way you see the port number. You would need to allocate addresses differently—each host would get a /112 instead of a /128 so that the port number can be placed in the lowest 16 bits, and the tooling (e.g. "ip addr") would by default show the 112-bit prefix assigned to the host rather than hundreds of individual /128 addresses. The real casualty from merging IP addresses and ports, however, is that it would no longer make sense to listen on a certain port on "any" address/prefix (::/0); if there is more than one interface or prefix assigned to a host and an application wants to accept incoming connections from each of them it will need to listen on multiple sockets, and open and close those sockets as prefixes are added or removed.