You are here: Sysadmins of the North » Windows Server » IPv6 support for WSL2! 🥳

IPv6 support for WSL2! 🥳

Ok, this one is huge: Windows Subsystem for Linux (WSL) 2 now has native support for IPv6! Almost exactly a year ago I asked about when we’d get IPv6 support in WSL2 on Twitter X, and now we have it.

Last year I really needed IPv6 support in WSL 2 to streamline my virt-manager workflow. You can read about my workaround to connect to a KVM host through an ssh tunnel and arbitrary port in Windows 11 and WSL 2. Now that workaround shouldn’t be necessary anymore.

The news was announced by Craig Loewen (Program Manager II, Windows Developer Platform) on the Windows Command Line blog in the Windows Subsystem for Linux September 2023 update.

IPv6 support in WSL2 networkingMode

Please note this feature is currently only available to Windows Insiders (across all Insider Channels) including the Release Preview Channel with the latest Windows 11, version 22H2 update here. You can get access now by joining the Windows Insider Program and choosing to opt in your device into the Release Preview Channel.

If you are on the Insider Program, you can enable this in your .wslconfig file:

[experimental]
networkingMode=mirrored

Shutdown and restart WSL (wsl.exe --shutdown). When enabled, you can get your IPv6 address using ip -6 a, and ping google.com using IPv6:

$ ping -6 -c 5 google.com
PING google.com(ams15s44-in-x0e.1e100.net (2a00:1450:400e:80f::200e)) 56 data bytes
64 bytes from ams15s44-in-x0e.1e100.net (2a00:1450:400e:80f::200e): icmp_seq=1 ttl=118 time=21.7 ms
64 bytes from ams15s44-in-x0e.1e100.net (2a00:1450:400e:80f::200e): icmp_seq=2 ttl=118 time=25.9 ms
64 bytes from ams15s44-in-x0e.1e100.net (2a00:1450:400e:80f::200e): icmp_seq=3 ttl=118 time=25.9 ms
64 bytes from ams15s44-in-x0e.1e100.net (2a00:1450:400e:80f::200e): icmp_seq=4 ttl=118 time=26.2 ms
64 bytes from ams15s44-in-x0e.1e100.net (2a00:1450:400e:80f::200e): icmp_seq=5 ttl=118 time=26.8 ms

--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4009ms
rtt min/avg/max/mdev = 21.711/25.289/26.823/1.822 msCode language: JavaScript (javascript)

Show Your Support

donate with Paypal

If you want to step in to help me cover the costs for running this website, that would be awesome. Just use this link to donate a cup of coffee ☕($10 USD or €10 EUR for example). And please share the love and help others make use of this website. Thank you very much! <3 ❤️

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top