Paul Gregory | 27 February 2012
With the world being dragged kicking and screaming towards IPv6, (and I think the world is winning), a senior colleague (Steven Ashworth) posed an interesting question last week. How do you (if you can), use an IPv6 address within a UNC name.
As I am sure you are all aware IPv4 addresses can be used in a UNC name instead of using a host name when connecting to a resource, for example\\10.10.0.101\PublicData One of the challenges is here is that IPv6 addresses are colon separated hexadecimal, (rather than dotted decimal for IPv4), and the colon is an illegal character within a UNC name. When connecting to a resource via a UNC name with an IPv6 address there are three basic rules:
- Replace each colon with a hyphen. If the double colon syntax is used then use a double hyphen. For example:
2001:abcd::1234:0001 would be 2001-abcd--1234-0001
- Apply the suffix of .ipv6-literal.net - for example:
- In some instances, especially if using link-local address (fe80) if the Index ID needs to be specified, (the % followed by a number at the end), the percent sign is replaced with the letter s. For example:
fe80::2814:24b4:53ee:ed59%22 would be fe80--2814-24b4-53ee-ed59s22.ipv6-literal.net
Another place that IPv6 addresses might start to appear will be in the address bar of your favourite web browser. As the colon is a reserved within a URI address. In this instance the IPv6 address needs to be enclosed in square brackets  for example http://[2001:abcd::0001]. Be careful some web browsers only partially support this syntax. They will let you enter the address and connect through to the web page but will then remove the square brackets and therefore subsequent requests will fail.
Updated 1/3/12 - seems word removes the double hypens. Thank you to Ian Button of Calderdale for spotting that.