No network connection after upgrading to 1.1.6 (before it was republished as a pre-release)
Windows Version
Microsoft Windows [Version 10.0.19043.2364]
WSL Version
1.1.6.0
Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
Kernel Version
5.15.90.1
Distro Version
Ubuntu 18.04
Other Software
No response
Repro Steps
I attempted a wsl.exe --update from 1.1.3 to 1.1.6 yesterday afternoon.
But ran into a vague-ish error about not being able to set an IP address, but ignored and assumed it would probably just address itself on reboot.
However, none of my WSL images are working, I even tried disabling the WSL feature in Windows off and on but to no avail. I'm not particularly sure where WSL2 stores and fetches its IP address configuration, but something seems to have gone wrong there.
I even tried uninstalling the Windows Subsystem application itself as well as the distros but to no avail.
Expected Behavior
Simple ping 1.1.1.1 commands should work, meaning it's not DNS related, and it's a fundamental issue with the wrapping network itself.
Actual Behavior
Output of variable network diagnostics commands:
codebymikey@localhost:~$ ip address show eth0
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1420 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:71:cc:75 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.226/20 brd 192.168.15.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fe71:cc75/64 scope link
valid_lft forever preferred_lft forever
codebymikey@localhost:~$ ip route list
default via 192.168.0.1 dev eth0 proto kernel
192.168.0.0/20 dev eth0 proto kernel scope link src 192.168.7.226
codebymikey@localhost:~$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
From 192.168.7.226 icmp_seq=1 Destination Host Unreachable
From 192.168.7.226 icmp_seq=2 Destination Host Unreachable
From 192.168.7.226 icmp_seq=3 Destination Host Unreachable
From 192.168.7.226 icmp_seq=4 Destination Host Unreachable
From 192.168.7.226 icmp_seq=5 Destination Host Unreachable
From 192.168.7.226 icmp_seq=6 Destination Host Unreachable
From 192.168.7.226 icmp_seq=7 Destination Host Unreachable
Diagnostic Logs
https://aka.ms/AAk8s50
NB:
~After running the diagnostics tool, it seems to have fixed the network issues. But still going to report it here for reference purposes.~
It was a placebo, and upon opening back up, I no longer have any network connection.
codebymikey@localhost:~$ ip address show eth0
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1420 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:05:41:7b brd ff:ff:ff:ff:ff:ff
inet 192.168.7.226/20 brd 192.168.15.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fe05:417b/64 scope link
valid_lft forever preferred_lft forever
codebymikey@localhost:~$ ip route list
default via 192.168.0.1 dev eth0 proto kernel
192.168.0.0/20 dev eth0 proto kernel scope link src 192.168.7.226
codebymikey@localhost:~$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=54 time=30.8 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=54 time=113 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=54 time=25.7 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=54 time=87.6 ms
64 bytes from 1.1.1.1: icmp_seq=5 ttl=54 time=18.9 ms
^C
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 18.969/55.338/113.538/38.038 ms
Could you specify what you mean by diagnostic tool? I've had this issue for a long time now and could really use a fix.
Same issue here, after running wsl --update on W11 2H22 network connectivity went kaboom! 💥
I basically followed the networking instructions detailed here.
Looking at the batch script, I think it deletes and recreates the "WSL HNS network" which might be what got corrupted.
Hopefully the same script fixes it for you!
Thank you for the link, unfortunately it did not fix the problem for me. I'll open a separete issue then.
@krippix you could try a more forceful approach. Terminate WSL, open an elevated console and run hnsdiag.exe reset all followed by a system reboot.
I managed it work with the following %USERPROFILE%\.wslconfig (Hyper-V: ON):
[wsl2]
dhcp=true
ipv6=true
networkingMode=bridged
vmSwitch=WSL
but its refuses to work with Cisco AnyConnect VPN by any means 😬
My initial suggestion regarding the diagnostics tool fixing it was apparently a false positive, as the issue returned after rebooting.
I was able to address the networking issue after upgrading to Windows 11. Upon starting WSL again, I received the following (in case that provides some additional context as to how to trigger the fix):
wsl: Failed to create network endpoint with address: '192.168.7.226', assigned new address: '172.17.66.192'
@krippix you could try a more forceful approach. Terminate WSL, open an elevated console and run
hnsdiag.exe reset allfollowed by a system reboot.
I tried that out now, unfortunately the problem persists.
run the following code:
sudo vim /etc/resolv.conf
Then add: nameserver 8.8.8.8 nameserver 8.8.4.4
Save
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!