我在混合的IPv4 / IPv6环境中工作.我读到可以使用这种语法将IPv4地址映射到IPv6空间
::ffff:1.2.3.4 (1.2.3.4 is the IPv4 address)
ping6 ::ffff:1.2.3.4 # to the server IP ping6 ::ffff:127.0.0.1
解决方法
而不是使用ping6,尝试ssh’ing到:: ffff:127.0.0.1.
我认为这里的具体失败与ping6有关,而不是IP4映射地址.
IPv4映射的IPv6地址实际上不是使用IPv4,因此不适合ping6吗?
Linux有一个套接字选项IPV6_V6ONLY,它可以防止某些应用程序使用IPv4映射地址.但是,我认为ping6的具体问题是它在内部的工作方式.
This来自netbsd,但我认为它涵盖了这个问题.
You should be aware that IPv4 mapped IPv6 is still IPv4 – it’s only
presented in a IPv6-resembling text format (or actually,when calling
your operating system’s libraries or kernel,binary socket address
format.)For dual-protocol applications this is no problem – they know how to switch (implicitly,when using the right (modern) library calls).