问题描述
在IPv6网络中,IPV6_V6ONLY标志用于确保套接字仅使用IPv6,尤其是不会将IPv4到IPv6映射用于该套接字.在许多操作系统上,默认情况下未设置IPV6_V6ONLY,但在某些操作系统(例如Windows 7)上,则默认设置.
In IPv6 networking, the IPV6_V6ONLY flag is used to ensure that a socket will only use IPv6, and in particular that IPv4-to-IPv6 mapping won't be used for that socket. On many OS's, the IPV6_V6ONLY is not set by default, but on some OS's (e.g. Windows 7), it is set by default.
我的问题是:引入此标志的动机是什么? IPv4到IPv6映射是否存在某些问题,因此人们需要一种禁用它的方法吗?在我看来,如果某人不想使用IPv4到IPv6的映射,他们根本无法指定IPv4映射的IPv6地址.我在这里想念什么?
My question is: What was the motivation for introducing this flag? Is there something about IPv4-to-IPv6 mapping that was causing problems, and thus people needed a way to disable it? It would seem to me that if someone didn't want to use IPv4-to-IPv6 mapping, they could simply not specify a IPv4-mapped IPv6 address. What am I missing here?
推荐答案
我不知道为什么它是默认设置;但这是我总是会明确显示的标记,无论默认值是什么.
I don't know why it would be default; but it's the kind of flags that i would always put explicit, no matter what the default is.
首先为什么要存在它,我想它可以让您保留现有的仅IPv4服务器,而只在同一端口上运行新服务器,但仅用于IPv6连接.或者,也许新服务器可以简单地将客户端代理到旧服务器,从而使IPv6功能轻松,轻松地添加到旧服务中.
About why does it exist in the first place, i guess that it allows you to keep existing IPv4-only servers, and just run new ones on the same port but just for IPv6 connections. Or maybe the new server can simply proxy clients to the old one, making the IPv6 functionality easy and painless to add to old services.
这篇关于添加IPV6_V6ONLY标志的动机是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!