-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WSL2] No network #4731
Comments
I'm having the same problem on 19033. This is bizarre. |
Are you using a VPN? Or any other kind of networking configuration that could affect it? And could you please take a networking trace for us and post the feedback item here? Thanks! |
I use no VPN and/or any other peculiar networking configuration, at least I've changed nothing since previous days when things were OK. I've created and sent the feedback according to your link but I don't know what "feedback item" is, and what should I post here (I'm also not logged in and I can't retrieve my feedback then). I've also checked "Save log data locally" or similar (I don't remember the wording) checkbox but nothing interested happened. I've looked into |
Upgraded to 19035 and it seems to magically be working again. |
Same here. Have just upgraded and it works now. Are there |
This is happening to me after my pc goes to sleep for long hours. Shutting down wsl2 (wsl.exe --shutdown) and open it again solves the problem until the next time the pc goes to sleep again for long hours. |
Sleep/Hibernate isn't enabled on my machine, though. I have noticed a lot more free space on my system disk with 20H1, and so I'm wondering if this might have something to do with the compression tech Windows is now using to shrink the size of system files. Perhaps it's touching WSL, or something WSL interacts with. It hasn't happened to me since the 19035 update, though. |
I am using WSL2 in Windows 10 insider build 19035 without any issue. You can check something like -- if eth0 interface present in wsl2, if ping to ip address work, if vEthernet (wsl) present in Windows, if Windows firewall has two inbound rules containing hns string etc. Also add the strace and/event logs as stated here. |
I was using build 19033 without problems. Updated to 19037 and my internet stopped working. To be able to use the internet I had to set the nameserver to 8.8.8.8 in the /etc/resolv.conf which solves the connection failure but keeps me from using the X410. Any suggestions? |
@CalBR We're all as confused as to why it randomly breaks as you are, and the tools to try and diagnose it aren't able to gather any useful information. 19041 is out and it might be a good idea to build an iso with https://UUPdump.ml and do an in-place upgrade. |
I am using Window 10 Insider Beta version 2004 Build 19041.1. I installed latest Ubuntu app from MS App Store. It works fine in WSL version 1. But after conversion to WSL 2 , network does not work. I tried various fix suggested in other threads but they does not work. TCP/IP network socket just stopped working in WSL 2 on Window 10 Build 19041. Only working solution is converting back to WSL 1. Then it works fine again. In attached text file, there is |
I have exactly the same problem. No problems with WSL2 on my office PC, only my home PC. |
Finally I solved my problem. In Hyper-V Manager > Virtual Switch Manager > WSL Adapter, switched to |
Same problem if/when my laptop hibernates, rebooting is the only thing that currently resolves. Did you need to do anything before changing the connection type @rm-bergmann when I try to change my WSL Adapter to any External Network I'm getting the error below.
|
@secopsbot I think I hit that error a few times, then I hat to shut down WSL2 and run Hyper-V as administrator. The annoying thing was I had to repeat the process after every reboot. I also remember I had to right click on the wifi network adapter (in the 'view network connections' windows) and click "Remove from Bridge". I have since deleted that instance of WSL2, and set up a new one using that same process. I can get network, but now I get the DNS resolving issue. |
I had the "unreachable" problem when I turned on compression on parts of the C: partition. It solved itself after turning it off again. |
I figured it was my VPN [Wireguard]. Worked fine after I disabled it. |
WSL2 worked fine in 19035, But after update to 19041, WSL2 no longer has internet. Although WSL1 working fine. I am not using any VPN, it is just my PC connected via wifi to my router. |
I'm observing same problem on 10.0.19041.208. Everything was working yesterday. Today, after hibernate/standby, WSL2 network is down.
But I cannot ping it from WSL2, eth0 interface has
Tried to flap the port on both sides (windows and WSL) - didn't help. Any workarounds other than restart Windows or WSL2? |
Same here, I just reset my Windows 10 installation after a motherboard upgrade and was unable to install any WSL instances as new version 2 instances. Got them installed as version 1 instances and then was able to convert them to version 2 and none of them have working networking in version 2. |
I've installed ubuntu 20.04 on WSL2 and I started a VM with qemu and kvm,running mac os x as guest os. It works great,except for the configuration of the net. Infact it is not able to connect to internet. Sometime from WSL I get a 192.x.x.x ip number,like : 192.168.69.65 ; 192.168.71.185 ; 192.168.73.223 ; 192.168.69.33 ; 192.168.100.101 sometime I get a 172.x.x.x ip address,like : 172.22.250.54 ; 172.22.253.128 ; 172.21.138.120 ; 172.22.88.142. The vEthernet (WSL) adapter on Windows 10 is configued like this : 172.26.80.1 as IP address,subnet mask = 255.255.240.0 I have created a bridge in WIndows 10,between my Intel ethernet adapter and the tap0 / Tap-windows. It's IP is 192.168.1.6 ; subnet mask = 255.255.255.0 ; gateway = 192.169.1.1 ; dns primary = 8.8.8.8 In WSL2 I have configured th network like this : root@DESKTOP-N9UN2H3:/mnt/c/Android/sdk/platform-tools# brctl addbr br0 root@DESKTOP-N9UN2H3:/mnt/c/Android/sdk/platform-tools# tunctl -t tap0 -u root root@DESKTOP-N9UN2H3:/mnt/c/Android/sdk/platform-tools# brctl addif br0 tap0 root@DESKTOP-N9UN2H3:/mnt/c/Android/sdk/platform-tools# brctl show root@DESKTOP-N9UN2H3:/mnt/c/Android/sdk/platform-tools# dhclient -v br0 Internet Systems Consortium DHCP Client 4.4.1 Listening on LPF/br0/00:15:5d:99:cf:a4 root@DESKTOP-N9UN2H3:/mnt/c/Android/sdk/platform-tools# ifconfig br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 tap0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 root@DESKTOP-N9UN2H3:/mnt/c/Android/sdk/platform-tools# ping www.google.it I think IPv4 issue can be solved with configuring DHCP, but I don't know how to do that. I dont know why after removing address from eth0, which had an ipv4 address, and creating a bridge,it becomes no ipv4. |
This happened to me after updating to 20206 |
me 2, almost no more connectivity. Sporadic something works. I had to update realtek nic drivers because of some sleep/resume device error, no idea if that relates... |
Thank you very much, @IskanderNovena! That PowerShell script really helped! |
@IskanderNovena , you fixed it, thanks! |
The powershell solution looks cool but unfortunately running scripts on my system is disabled. Any other workarounds available, except rebooting? |
|
You probably don't have administrative rights, which means none of the workaround will work for you. Adding routes and restarting services both need admin-rights. |
It's a policy that prevents scripts from being executed. So the workaround won't work for us. |
In that case you could run the commands in a PowerShell-prompt, except for the first line (the one starting with |
It was firewall for me. My VPN allowed WSL1, but not WSL2. |
I'm having this issue as well. I converted a working WSL v1 instance into a WSL v2 instance. Now I have no networking. Bringing eth0 Ubuntu 20.04 running on Windows 10 Version 21H1. |
I have a potentially interesting finding. On my end, it appears that after failing to resolve a host (I can confirm that the host doesn't work both on the WSL instance and on Windows itself, but the others do), it will fail to resolve anything else. In my case, this happened when I was trying to build neovim, which downloads libraries from the internet. When Edit: the last sentence does not hold true if I change to another DNS server in /etc/resolv.conf. This is some very interesting behavior. |
@willeccles there is a bunch of related issues on DNS resolution in WSL(2), some of which are indeed contaminated by different network issues - anyway, I believe this issue here is about network connectively overall, including being able to access a DNS server in the first place. So maybe your comment would be best placed in other issues. |
Ubuntu 18.04 and 20.04 (i.e. all WSL distributions) do not have any network connectivity (not even localhost). OS Name Microsoft Windows 10 Pro Virtualization-based security Running |
No connectivity from wsl2 to the internet after Windows update KB5003537 was applied automatically last night. |
@janfrederik if you're seeing this from the latest update could you please collect networking logs and post them to this Github issue: #7141 Instructions here: #7141 (comment) |
Do I have to write that cmd, powershell or wsl? P.S. Oh right I tried it in powershell and it worked. Thanks. |
@craigloewen-msft Yesterday I installed the "2021-07 Cumulative Update for Windows 10 Version 20H2 for x64-based Systems (KB5004945)" and had no problems afterwards. |
Thank you very much, this worked perfectly on my end! I didn't need to restart the cmservice though. I actually don't even have it in my copy of Windows. Just stopping |
WSL2 has network, startup and installation issues - solution: Disable encryption and file compression:
Disable encryption and compression on directories with distributions:
|
https://gist.github.com/mandeepsmagh/f1d062fc59e4e6115385c2609b5f0448 This works like a charm. Just had to set the servername according to the wifi gateway |
check this solution. It worked for me after trying all the above suggestions. |
Just leaving another potential solution when all solutions telling you to change Edit: I just verified that I actually need both solutions for the system to work. I need to have the correct nameservers (the ones from my corporate network to have connectivity when behind VPN, and also some generic ones like google's dns as fallback for having it work outside of the VPN) on |
Experiencing the same issue on Windows 11 build 22000.978 (edit: still happening on 22621.1413). I have isloated the problem and found a (bad) workaround. The issue is that the Hyper-V Default Switch used for WSL2 NAT networking selects/uses the wrong uplink interface, consistently. In addition to a few different VPN interfaces (not relevant), I primarily use the on-board Ethernet interface for networking. I also have a PCIe-connected Wi-Fi card installed, which WSL2 consistently uses as the uplink interface for reasons unknown to me. List of things I have attempted which made no difference at all and did not solve the issue:
Workaround:
It is surprising to me that there is no option to select desired uplink network interface for the Hyper-V Default Switch or NAT solution. This would solve the issue. |
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! |
I am still experiencing the issue exactly as described. I'm sure many others also are. This issue should not be closed. |
Microsoft Windows [Version 10.0.19025.1]
Any network activity from inside WSL2 ends up with:
ifconfig -a
reports:vEthernet (WSL)
adapter is present and enabled and reports no problems.It all worked fine till today. Today it stopped working with absolutely no apparent reason. No installations, no updates ...
I tried everything except reinstalling the whole system (which apparently I won't do, since I'll install release if decide to remove insider's), nothing helps.
The text was updated successfully, but these errors were encountered: