Mildly cursed factoid about UNC paths:

- UNC Paths can contain IP addresses such as \\192.168.1.1\share
- IPv6 addresses are supported as well
- IPv6 addresses contain colons
- can't have colons in Windows paths since colons are reserved for drive letters

So Microsoft came up with the the ipv6-literal.net domain that's special-cased by Windows so you can to write IPv6 addresses in UNC paths as 2a0e-3c0--21.ipv6-literal.net without it hitting any resolvers.

Turns out, it's worse than this: The ipv6-literal.net shenanigans aren't limited to UNC paths.

It works in all places:
> ping 2a0e-3c0--21.ipv6-literal.net

Pinging 2a0e:3c0::21 with 32 bytes of data:

Also works in browsers: http://2a0e-3c0--21.ipv6-literal.net/

Thanks to @casandro for asking.

@karotte @casandro: The domain ipv6-literal.net doesn't look as if it belongs to Microsoft (as @GossiTheDog already mentioned in his posting). It is parked at GoDaddy.

@xtaran @karotte @casandro @GossiTheDog

That's an old one! We came up with it for IPv6 when I was working at Microsoft. I think it was introduced in Windows XP SP1. We were worried that typing addresses like 2001:2:3::abcd was not going to work well in a variety of user interfaces, hence the "2001-2-3--abcd.ipv6-literal.net" hack. One of the team members (maybe me, not sure now) registered it on a personal account, and then transferred ownership to Microsoft before shipping.

@karotte @casandro someone registered this domain name on GoDaddy and hosts it on Amazon

@karotte @casandro Not on Linux it seems:

```
stuartl@vk4msl-tp:~$ ping 2a0e-3c0--21.ipv6-literal.net
ping: 2a0e-3c0--21.ipv6-literal.net: Name or service not known
stuartl@vk4msl-tp:~$ uname -a
Linux vk4msl-tp 6.12.12+bpo-rt-amd64 #1 SMP PREEMPT_RT Debian 6.12.12-1~bpo12+1 (2025-02-23) x86_64 GNU/Linux
```

@stuartl @karotte Yeah it's a Windows only thingy, but only few Windows variants even come with an IP-stack in their default installation... and only a few of them even have an IPv6 stack available. So it might be largely irrelevant.

@casandro @karotte

As I recall…
Windows 2000 had IPv6 as a "technology preview" that had to be separately downloaded and installed.
Windows XP whad it disabled by default, but did otherwise ship with it.
Windows Vista and later turned it on by default.

Anything currently supported by Microsoft right now will have it turned on unless the user/administrator turns it off manually.

So "only few" actually covers a lot of users.

@stuartl @karotte Did Microsoft start support their operating systems again? I always thought they stopped providing free support in the mid 1990s, reducing their post-sales involvement to bug-fixes.

@casandro @karotte "Support" in the form of security fixes and service packs.

The bare minimum.

@stuartl @karotte Also I know there is a very loud Windows XP fanbase out there, but outside of some companies and statistics based on web-ad servers, I don't think Microsoft still has a wide market share. I did make some cursory statistics during a camping trip in 2009... and there the market share was well below 10%.
@casandro @stuartl @karotte IPv6 is mandatory since Vista, and while you can turn it off, that puts your system in a state that's not supported by Microsoft (and there are things that break with IPv6 disabled).
@karotte @casandro To add insult to injury there isn't even an AAAA record, only A on the public DNS
@karotte @casandro @catsalad Looks about as cursed as `curl http://2398796366`

@karotte
Huh, I'm curious.. If an invalid IPv6 (or "foo") is specified before .ipv6-literal.net, will Windows fall back to do a DNS lookup?

I'm assuming it won't.. 🤞

@casandro

@karotte @casandro whee. Yet another way to refer to localhost in a surprising way
@mxshift Ah yes, --1.ipv6-literal.net the windows-only localhost
@karotte @mxshift dashes at the start of domains are not well liked by browsers. this is probably fun

@leftpaddotpy The funny thing is: Both Edge and Firefox had no problem with the hostname starting with a dash.

Ping however couldn't be convinced that --1.ipv6-literal.net isn't a command line argument.

Index of /~idra/code/nss-ipv6literal

@erincandescent @mxshift

> Current Status
> Works for me.

I like that energy.

@karotte @mxshift honestly given the amount of issues ive had with random software not supporting %scope addresses properly its the kind of thing I wish was actually standardised
@erincandescent @karotte @mxshift page just says “Upgrade required” :/
@karotte @casandro Hmm, I wonder what would happen if you have a domain with a CNAME record that points to such an ipv6-literal.net domain 🤔 . Would windows then just connect to that IP? I might need to spin up a windows VM this weekend 🤓
@karotte @casandro this is more than a little bit cursed; thanks I hate it
@karotte hmm, how would it work for ::1 localhost? --1.ipv6literal.net ?
@karotte @casandro They could at least have made it resolve globally as well.
@nik @karotte @casandro This is interesting - the domain is registered, but not to Microsoft and it seems like it has been that way for a while! https://serverfault.com/questions/566382/is-it-possible-to-use-an-ipv6-address-to-connect-to-a-remote-share
@karotte @casandro So you can detect genuine windows browsers/users by embedding a CSS file from such an URL?
@satmd @karotte Well I don't think this works on most versions of Windows, probably just on some of the Windows NT versions. People have said that before that it might work on Vista.