[zeromq-dev] IPv6

Martin Sustrik sustrik at fastmq.com
Wed Dec 10 13:26:22 CET 2008

>>> 1. Is IPv4 NIC address in textual format determistically distiguishable 
>>> from IPv6 address? If not so, we would have to prefix the address is 
>>> some way, e.g. "IPv4:"
>>   Yes, IPv4 and IPv6 addresses are determistically distiguishable. IPV6 uses
>> ":" to separate groups whereas IPv4 uses ".". But we have to change the
>> ":port" suffix so that it is both compatible with IPv4 and IPv6.
>>> 2. When IP address is entered as NIC or host name, does it make any 
>>> difference if the name is translated to IPv4 or IPv6 address? If so, 
>>> user has to have option to specify the protocol.
> This kind of change (e.g. "eth0:5555" -> eth0#5555") is not very nice as 
> it would break backward compatibility. However, I guess there's no way 
> to achieve backward compatibility and IPv6 support at the same time. Any 
> suggestions for the new format of the string?

Btw, here's the corresponding paragraph from IPv6 article on wikipedia:

Since an IPv6 address contains colon (":") characters, network 
administrators must take care to avoid conflicts with other syntactic 
meanings of the colon in network resource labels. In IPv4 the colon is 
used to separate an IP address from a transport protocol port number. 
This usage has been extended to IPv6, however, when a port is specified 
in an address string, the proper IPv6 address must be enclosed in square 
brackets ("[", "]"). This convention is used in other more complex 

Example: In a URL the IPv6-Address is enclosed in brackets, e.g.,


If the URL also contains a port number the notation is:


This is not only useful but mandated when using shortform:



More information about the zeromq-dev mailing list