IPv6 Addresses and UNC Path Names – Overcoming Illegal

The beloved UNC path name, familiar to all who administer Microsoft. After all these years there is something comfortable and familiar in the simple act of cracking open open that run line and busting out a pair of backslashes followed by the name or IP address to which I want to connect. Simple. Easy. Classic.

But the Uniform Naming Convention (UNC) path names and IPv6 addresses don’t play nicely together. If, for instance, you were to try \fe80::21a:a0ff:fe89:9dc4%12 (the %12 identifies the interface and is technically needed because the address is a link-local address) you would be immediately met with an error message. After slamming your head against the wall for a few hours you might come to realize that UNC names don’t support colons (or the percent sign, for that matter). Oops. UNC and IPv6 and incompatible with each other.

Microsoft worked around this by implementing something called IPv6 Literal Names. There is absolutely nothing elegant about this solution but …it works. If you want to use IPv6 addresses in your UNC paths you have to do the following:

  1. Replace colons (:) with dashes (-)
  2. Replace percent sign (%) with the letter ‘s’. This is only necessary if you are using a link-local IPv6 address. Global Unicast and Unique Local addresses don’t require interface identifiers.
  3. Slap an .ipv6-literal.net at the end of the IPv6 address (after the interface ID, if required)

That means that this (which is wrong): \fe80::21a:a0ff:fe89:9dc4%12,
will be re-written to this (which is right): \fe80–21a-a0ff-fe89-9dc4s12.ipv6-literal.net (note the double-dash used to represent the double-colon)

Really? Seriously?

Yep, really. Seriously. Thanks for the aneurysm, Microsoft.

It’s been a long time and I still forget about the lack of support for IPv6 addresses in UNC path names. I’m glad the workaround is there but it’s about as ugly as it can get. One thing is for certain: I love DNS and multicast name resolution even more than ever.

Cheers,

Colin Weaver

Posted in:
About the Author

Colin Weaver

Colin Weaver is co-owner and lead instructor at ITdojo, Inc., a network security and information assurance training center and consulting firm located in Virginia Beach, VA. His passion for technology, networks, and security has led him to become enthralled with the idea of IPv6 and its implementation. In this blog he will share with you glimpses of what he has learned and a hint at what you’ll learn in his classes.