3 ms·
ipv6 packet does not have any port field. ports are on the level of tcp and udp, and you don't have to use tcp or udp on top of ipv6. ipv4 packet does not have
by pratyahava 5mo ago
ipv6 packet does not have any port field. ports are on the level of tcp and udp, and you don't have to use tcp or udp on top of ipv6. ipv4 packet does not have any port information as well.
- magicalhippo 5mo ago> ipv6 packet does not have any port field Yes, that's why I said I know it was mixing of layers. However ports are a layer violation in a strict sense, introduced as a workaround because there was no easy way to just add thousands of new IPs to a single host back in the IPv4 days. No need to continue a workaround that causes grief on a daily basis.
- allarm 5mo agoWhat do you mean? You’ll still have to use TCP or UDP over IPv6, and both of those protocols use ports. Nothing is stopping you from creating a transport protocol that doesn’t use ports if you want to, but that has nothing to do with the network layer.
- magicalhippo 5mo agoI mean that to connect to a service you wouldn't need to know the port, the IPv6 address would be enough. This is why I consider ports a layer violation of sorts. You never talk to a machine with TCP/UDP, you talk to a service on a machine. And so as it is the full address to the service isn't just the layer 3 address. As I mentioned this would be especially interesting when hosting multiple services, same or different, on the same machine since there would be no port conflict.
- allarm 5mo agoYeah, but I mean you just have to have something on the transport layer, you can't just encapsulate application layer into network skipping network, that's not how the network stack works.
- magicalhippo 5mo agoPerhaps it's because I'm tired but I can't make sense of your objection. As I said you could implement it by having TCP/UDP as is, just with a fixed port number. This wouldn't be unlike the myriad of other conventions that litter IPv6, such as using /64 for a host or ULA's having a certain prefix.
- allarm 5mo agoNo it's me - I'm tired too, and I misread you) Got it, makes sense. It just seems more like an architectural decision to me than something related to the network stack - that's why I got confused. You can come up with your own convention and use it within a local network. One of the downsides of this approach - it will clutter up the routing table, but that’s probably not a big deal. I usually prefer to use some kind of demultiplexer, like a reverse proxy, to handle the conversions.
- chuckadams 5mo agotcp6 is a thing though, was created at the same time as ipv6, and it does have ports, along with udp6. But if you really want one ip per stream and just hardwire port 1 or something, it's not like IPv6 does anything to stand in the way of that. Mght have performance issues on some OS's binding thousands of IPs to one interface, but that's on them to fix. Bigger lift would be the APIs that would need to change to manage whole prefixes at a time instead of single IPs.
- pratyahava 5mo agoafaik tcp and udp are the same on top of ipv6 as they are on top of ipv4, there are no tcp6 and udp6, the "6" suffix just hints they are comminucated on top of ipv6, but the packets are the same as before, no new standards.
- chuckadams 5mo agoI could have sworn there was a different and simplified format for segments (datagrams are already about as simple as they can be), but I apparently had hallucinated it all these years. Turns out the only difference is using the larger addresses in the checksum algorithm. Still, I do have to wonder about a port-free world. Seems a lot of things would get simpler.