IPv6 support for WSL2! 🥳

Date posted: 2023-09-19
Last updated: 2026-01-29

Windows Subsystem for Linux (WSL) 2 now has native support for IPv6! 🥳


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 and is called “mirrored networking mode”.

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 4009msrtt min/avg/max/mdev = 21.711/25.289/26.823/1.822 ms

Update: WSL2 setting networkMode is moved to the [wsl2] section label in .wslconfig. See Advanced settings configuration in WSL.

Key Takeaways

  • WSL 2 now supports IPv6 natively, a feature requested by users last year.
  • This improvement enhances workflows, particularly for tasks like using virt-manager without workarounds.
  • The announcement came from Craig Loewen in the September 2023 WSL update, introducing ‘mirrored networking mode’.
  • Users on the Insider Program can enable IPv6 in their .wslconfig file after restarting WSL.
  • The ‘networkMode’ setting moved to the [wsl2] section in .wslconfig for easier configuration.
Rate this post!

1 thought on “IPv6 support for WSL2! 🥳”

Leave a Comment


Share via
Copy link