WSL: cannot reach ipv6 only address
-
Your Windows build number: 10.0.18980.1
-
What you’re doing and what’s happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
I tried to access a ipv6 only website and failed. My commands run in Debian Buster with WSL 2:
$ curl -I https://ocaml.debian.net
curl: (7) Couldn't connect to server
$ sudo ping6 2001:913:c01:0:d52c:1903:be09:265f
connect: Network is unreachable
- What’s wrong / what should be happening instead:
The curl command should succeed. Here is the result if I run it in Windows (outside of WSL):
>curl -I https://ocaml.debian.net
HTTP/1.1 200 OK
Server: nginx/1.14.2
Date: Wed, 18 Sep 2019 04:15:40 GMT
Content-Type: text/html
Content-Length: 341
Last-Modified: Sat, 03 Aug 2019 04:57:55 GMT
Connection: keep-alive
ETag: "5d451453-155"
Accept-Ranges: bytes
>ping 2001:913:c01:0:d52c:1903:be09:265f
Pinging 2001:913:c01:0:d52c:1903:be09:265f with 32 bytes of data:
Reply from 2001:913:c01:0:d52c:1903:be09:265f: time=208ms
Reply from 2001:913:c01:0:d52c:1903:be09:265f: time=206ms
Reply from 2001:913:c01:0:d52c:1903:be09:265f: time=206ms
Reply from 2001:913:c01:0:d52c:1903:be09:265f: time=206ms
Ping statistics for 2001:913:c01:0:d52c:1903:be09:265f:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 206ms, Maximum = 208ms, Average = 206ms
FYI, here is my network interface info:
C:\Users\Andy>ipconfig
Windows IP Configuration
Ethernet adapter VPN - VPN Client:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter vEthernet (DockerNAT) 2:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 10.0.75.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : lan
IPv6 Address. . . . . . . . . . . : 2002:d206:9dd2::100
IPv6 Address. . . . . . . . . . . : 2002:d206:9dd2:0:7940:661e:9b71:38ca
IPv6 Address. . . . . . . . . . . : fd3a:95fa:b06b::100
IPv6 Address. . . . . . . . . . . : fd3a:95fa:b06b:0:7940:661e:9b71:38ca
Temporary IPv6 Address. . . . . . : 2002:d206:9dd2:0:c8d1:e8bc:b818:9b48
Temporary IPv6 Address. . . . . . : fd3a:95fa:b06b:0:c8d1:e8bc:b818:9b48
Link-local IPv6 Address . . . . . : fe80::7940:661e:9b71:38ca%14
IPv4 Address. . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::7ad2:94ff:fe7e:41e9%14
192.168.1.1
Ethernet adapter Ethernet 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter Bluetooth Network Connection 4:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::e0:3fd0:91b9:ca2a%45
IPv4 Address. . . . . . . . . . . : 172.17.96.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
Ethernet adapter vEthernet (WSL):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::d42c:c288:563c:b292%53
IPv4 Address. . . . . . . . . . . : 172.29.48.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
andy@Hawk:/mnt/c/Users/Andy$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.29.49.132 netmask 255.255.240.0 broadcast 172.29.63.255
inet6 fe80::215:5dff:fed7:3bf8 prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:d7:3b:f8 txqueuelen 1000 (Ethernet)
RX packets 856 bytes 101884 (99.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 39 bytes 3349 (3.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 31
- Comments: 89 (10 by maintainers)
As of right now the Host Network service does not support ipv6 only websites. We’ve filed this as a feature request with them and we will post any updates on this thread as they become available! Thank you for filing this.
We’re working on it! This feature won’t be available in the initial general release of WSL2. Thanks for your patience here, this is something that we are actively looking into improving.
Hi folks, we have put out a new update that aims to address networking issues in WSL. In your
.wslconfigfile you can setexperimental.networkingMode=mirrored, as well as some other key settings that should improve your network compatibility, and add support for IPv6! Please try them out and let us know what you think.More info on this release and the changes can be found here in the blog post.
Please note: You need to be on a Windows Insiders version to use the new networking settings (Any channel of Windows Insiders will do, including release preview). If you see the “These are not supported” messages it means that your current Windows version doesn’t have support, and you will need to upgrade. These features will eventually be coming to Windows 11 22H2.
@craigloewen-msft could the wsl2 upgrade docs be updated to explicit mention breaking IPv6? I would have probably waited a little longer had I know. Thanks.
We don’t yet have a rough ETA on this item, so please stay tuned. I read the responses on this thread, so thank you for commenting to let us know about the details for why you need IPV6 support. Once we do have a concrete update I’ll be sure to post here. 😃
Guys, come on! I’ve updated to w10 2004 only because of WSL2 and I can’t connect to most of my intranet? How is it still not solved since first insider builds?? Looks more like a serious bug to me, since almost everybody now uses IPv6 primarily
… Wow… we’re in February (nearly 6 months) and this is still an issue? That’s disappointing.
Is there any ETA for a fix for this? At Facebook, our internal network is mostly IPv6-only (see https://www.internetsociety.org/blog/2014/06/facebook-moving-to-an-ipv6-only-internal-network/) so this issue limits the usefulness of WSL2 in this environment.
These new networking features are now available on the latest version of Win11 22H2!
@NiKiZe currently this is not planned to go back to Win10.
Please make sure you’re on the latest build to get these features, you can do that by clicking “Check for Updates” in Windows settings. You can check you have the right build by either ensuring you have KB5031354 installed, or run
cmd.exe /c verand ensure that your build number is 22621.2428 or higher (Including the minor build number which is after the.as this was a backport!)Will the fix also reach win10?
Basically anything that lights up usage of IPv6. I’m thinking more of a network pen test perspective using Kali tools but I’m sure there are some more enterprise-y workflows that would benefit as well if hosted on Windows Server 2019. Something that comes to mind is mostly being able to serve up DHCPv6 and DNS from WSL2 for multiple hosts.
For everyone having issues, in the meantime it’s without the experimental prefix
In 2020 I would expect “IPv6 first, IPv4 second”. Apparently not so at Microsoft. But good to know, so I will not update to WSL 2.
Today I upgraded to build 2004 and subsequently updated Docker Desktop to use WSL2 as I’ve been looking forward to the performance increases: I installed Ubuntu from the Microsoft Store, set it up and then ran
sudo apt update: only for it to fail withfetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable).So why do I need IPv6 support? Just for the basic updating and install Linux software packages as otherwise it’s broken on our dual-stack network. [edit: I can confirm I am able to connect to archive.ubuntu.com from a browser on the same host machine ]
For those playing at home, you may need to run: wsl --update --pre-release
This is a deal breaker for me as well… spent countless hours to setup a test laptop to later find out that IPv6 does not work… Do we have an ETA on this?
What is worse is that if you are on an IPv6-only network (NAT64 for IPv4 access), WSLv2 has no internet access whatsoever. Is there a timeline on the fix? Microsoft said they are working on it (good) but working on it could mean “will deliver in May 2021 update or even later”.
Writing to confirm that I have had success creating a
.wslconfigfile and having the following entry:Well, technically i’d argue that there should not be NAT, but the hyper-v host should actually do rfc4389 (https://tools.ietf.org/html/rfc4389) style proxy nd. This is v6 after all…
Have done that on 2 systems. One worked, one not. Both running WSL 2.2.4.0. I tried also the
[experimental]config.I can ping the own WSL IPv6 but not a IPv6 outside of WSL…
Network is unreachable. I can connect to any IPv6 from Windows, but not the WSL IPv6.@TurnOffNOD Latest stable, you don’t need an Insiders version anymore.
Hi, @craigloewen-msft , is there any schedule for ipv6 support?
I usually use
ipv6only=off, which works on normal Linux but breaks in WSL2.Hi,
There is article which describes how to configure IPv6 connectivity on WSL Linux manually: https://www.linkedin.com/pulse/how-configure-ipv6-support-wsl-2-distributions-maxim-tseitlin-do8je/ It is obviously, that it is possible to write script which performs all above described manual actions.
Also, (at least to me) not only briding is lost, but old bridged interface remains in a “half bridged” state and I have to manually disable bridging before functionality is recovered (thus, after each reboot I’m offline until I do it), which is even worse. Still, I prefer to do that that using WSL2 in the default IPv4-only NAT mode.
yes, each time WSL2 is started (means - not only on reboot), WSL adapter is recreated and manual bridging to anyting (incl. VMnet) is being lost.
Issue still remains. WSL2 only has IPv4 in the 172.x.y.z (forgot what x was exactly) and no IPv6 at all (unless I do weird tricks on the host). Any NAT64 and shit available on the host Windows system never reaches the WSL2 distro.
I don’t think Windows will even proxy the IPv4 requests through the NAT64…
@paulstelian97
The default in a lot of distributions is to prefer public IP addresses over private. 99% of the time IPv6 is provisioned using public IPs, while 99% of the time IPv4 is provisioned using private. Furthermore, it is also common to prefer IPv6 over IPv4 wholesale when both are public.
In summary: you shouldn’t be surprised to see Linux prefer IPv6. 😃
Source: man gai.conf(5) and RFC 3484
As for why WSL should add IPv6? There are homes and offices that are IPv6 only, using centralised NAT64 to get to IPv4. This means that the physical machine will never see or talk IPv4. For all these people WSL 2 is useless.
That was (a bit sparse) in the link of my previous comment, but let me recap: First executing this in admin powershell first in order to configure thw “wsl” virtual switch to bridged mode (“LAN” is how I renamed by ethernet card):
set-vmswitch -name wsl -NetAdapterName LANthen this in sudo bash:(where 192.168.1.8/24 is but the static IP I chose for my WSL2, but YMMV)
Since most systems using WSL 2 probably will be configured using IPv6-SLAAC the easiest solution for IPv6 would be if WSL 2 supports bridging network adapters. And the second option some style of NDP-Proxy. I believe this is similar to what Android/iOS do when using tethering on an IPv6-only network?
@craigloewen-msft just wondering if there is a rough ETA or timeline you can provide? Is v6 support something like a month or two out or something to hope for with the 20H2 release, or even further out than that?
@paulstelian97 Can you describe more? As I see, in my case host adapter and eth0 in wsl has different ipv6 prefixes. But I didn’t manage to setup routing
upd: found your question here https://superuser.com/questions/1545629/how-can-i-give-ipv6-to-wsl2
If you have multiple distros, you can pick and choose which of them uses WSL1 and which uses WSL2. Just do
wsl --set-version "Distro name" 2orwsl --set-version "Distro name" 1, and wait for the conversion process which can take a while and shows no progress bar (it takes longer or shorter dependent on the amount of data you already have in your distro)I don’t have any updates for this feature request.
@WSLUser what kernel modules would you like added to the kernel? And what workflows would it enable for you?
Here you are: https://aka.ms/AA63cvl