ipv6向后兼容ipv4吗? [英] is ipv6 backward compatible with ipv4?

查看:159
本文介绍了ipv6向后兼容ipv4吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用ipv4编写的udp示例程序.如果我将代码更改为ipv6,我是否仍可以使用具有ipv4地址的侦听器与任何人进行通信?我在

I've got a little udp example program written using ipv4. If I alter the code to ipv6 would I still be able to communicate with anyone using the listener with an ipv4 address? I was looking at porting examples at

http://ou800doc.caldera.com/en/SDK_netapi/sockC .PortIPv4appIPv6.html

我不确定是否只是更改代码就能确保它能正常工作,还是我必须以对决堆栈模式编写它.

I'm not sure if simply altering the code would ensure that it worked or if I'd have to write it in duel-stack mode.

推荐答案

是,不是.IPv6确实包含完全不同的寻址,因此,您必须重新编码应用程序以使用备用标头和结构大小.

Yes and no... IPv6 does contain completely different addressing, so you'll have to recode your app to use the alternative headers and structure sizes.

但是,IPv4地址范围在IPv6中可用,其语法是在标准地址(例如:: 10.11.12.13)之前添加两个冒号.您还可以在IPv6数据包中嵌入IPv4地址.

However, the IPv4 address range is available within IPv6, the syntax is to add two colons before the standard address (eg ::10.11.12.13). You can also embed IPv4 addresses within IPv6 packets.

这篇关于ipv6向后兼容ipv4吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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