如何将地址从IPv4转换为IPv6 [英] How to convert an address from IPv4 to IPv6

查看:278
本文介绍了如何将地址从IPv4转换为IPv6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能吗?如何将ipv4转换为ipv6地址?



这里有几个例子:

  0.0.0.0  - > :: 
127.0.0.1 - > :: 1

我正在用Java搜索解决方案。



谢谢,

解决方案

没有有意义的IPv4到IPv6映射。像0.0.0.0和127.0.0.1这样的东西是规范中的特例,所以它们具有相同的含义。但是考虑到IPv4地址,它不会告诉您具体的IPv6地址是什么。您可以使用DNS查找来查看给定的IP地址是否解析为主机,而该主机除了IPv4地址之外还可以解析为IPv6地址,但DNS服务器必须配置为支持特定计算机的IP地址。 / p>

Is this possible? How can you convert an ipv4 to an ipv6 address?

a few example from here:

0.0.0.0   -> ::
127.0.0.1 -> ::1

I'm searching a solution in Java.

Thanks,

解决方案

There is no IPv4 to IPv6 mapping that is meaningful. things like 0.0.0.0 and 127.0.0.1 are special cases in the spec, so they have equivalent meaning. But given an IPv4 address it tells you nothing about what its specific IPv6 address would be. You can use a DNS lookup to see if a given IP address resolves to a host which in turn resolves to an IPv6 address in addition to an IPv4 address, but the DNS server would have to be configured to support that for the specific machine.

这篇关于如何将地址从IPv4转换为IPv6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆