[zeromq-dev] [PATCH] IPv4/IPv6 wiring for 3.0
Martin Sustrik
sustrik at 250bpm.com
Mon Aug 8 08:46:20 CEST 2011
On 08/08/2011 06:33 AM, Steven McCoy wrote:
> Conclusion:
>
> * Within 0mq use IPv6 sockets by default unless the platform has
> only IPv4 support.
> * Drop down to IPv4 sockets if the option ZMQ_IPV4ONLY is set.
> * Force dual-stack behaviour in order to enumerate IPv4 interfaces
> for binding.
I like that. AFAICS it would work as follows:
1. IPv4 server & IPv4 client - use IPv4
2. IPv4 server & IPv6 client - when calling getaddrinfo, client will get
IPv4-in-IPv6 address, the communication will happen in IPv4
3. IPv6 server & IPv4 client - when client connects to the server,
server will get IPv4-in-IPv6 address, the communication will happen in IPv4
4. IPv6 server & IPv6 clinet - use IPv6
The only problem I see is IPv6 server and IPv6 client over Internet. If
there's a lack of IPv6 support on the path (ISPs and so on), the won't
be able to speak each to another. The only way to make it work would be
to set ZMQ_IP4ONLY option on at least one side.
Given the current state of IPv4-to-IPv6 transition, wouldn't it be wise
to switch ZMQ_IP4ONLY on by default?
Martin
More information about the zeromq-dev
mailing list