[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:127.0.0.1:5555"
>> 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
identifiers.
Example: In a URL the IPv6-Address is enclosed in brackets, e.g.,
http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7348]/.
If the URL also contains a port number the notation is:
https://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]:443/
This is not only useful but mandated when using shortform:
https://[2001:db8::1428:57ab]:443/
Martin
More information about the zeromq-dev
mailing list