3 ms·
I expected (20+ years ago), that IPv6 address space will be extension of IPv4 address space, so `ping6 IPv4_ADRESS` will use IPv4 protocol internally, bind6(IPv
by drran 5y ago
I expected (20+ years ago), that IPv6 address space will be extension of IPv4 address space, so `ping6 IPv4_ADRESS` will use IPv4 protocol internally, bind6(IPv4_ADDRESS, IPv4_PORT) will use IPv4 socket internally, and so on. It's easy to implement:
an_ipv6_function(address) {
if (address & 0xffffffffffff0000 == 0) {
// Use legacy ipv4 protocol ...
} else {
// Use modern ipv6 protocol ...
}
}
Actual result: I cannot ping an ipv4 address using an ipv6 tool, or connect to an ipv4 server using an ipv6 only tool.
- cesarb 5y agoThat already exists, it's called an "IPv4-mapped address". The IPv4 address 198.51.100.15 can be represented in IPv6 as ::ffff:c633:640f (normally shown as ::ffff:198.51.100.15). See in particular at https://man7.org/linux/man-pages/man7/ipv6.7.html https://man7.org/linux/man-pages/man7/ipv6.7.html the IPV6_V6ONLY option which can be used to disable that mapping.
- drran 5y agoYes, I know about this mapping (I can read man pages too), but a) ping6 ::ffff:127.0.0.1 doesn't work too; b) it's not an IPv4 address, because the binary representation of ::ffff:127.0.0.1 != 127.0.0.1. It's the IPv4 address space mapped to an IPv6 address space (IPv4-mapped-on-IPv6). c) IPv4 addresses in IPv6 address space are deprecated: https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.1 https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.... . In short, IPv6 and IPv4 cannot coexist, so they must be separated, so we must keep IPv4, because it's mandatory, and we may skip IPv6, because it's optional. So, all internet providers in my area are skipping IPv6, because they can. All that problems are created by lack of backward compatibility in IPv6 protocol. Why? «Because backward compatibility with IPv4 is unnecessary. IPv6 is so much better. Everyone will jump to IPv6 till end of the next (1995) year.»