-
Notifications
You must be signed in to change notification settings - Fork 797
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
[WSL 2] No network connectivity after upgrade to 18945 #4342
Comments
(The new localhost feature works great, though! ...I feel this is somehow ironic.) |
I just observed this and resolved it: I saw that linux eth0 interface was on 192.168.116.25 and wsl host interface was 192.168.112.1. By running
networking was restored to my WSL. |
Must be a slightly different variation - I don't seem to have a wsl host interface any more. :( Glad you got it working, though. |
I could ping the default gateway, but not outside the host. I worked around it by just uninstalling the distros, then uninstalled the feature WSL. The reinstalled after a reboot and reinstalled the distros. After reboot I got internet connectivity in the distros. |
I resolved mine similarly, now, by uninstalling the virtual machine platform and WSL, rebooting, then reinstalling them. (I left the distro in place; it was still there after the reinstall of both of them.) That seemed to fix whatever was up with the config of the WSL virtual switch (it showed as internal again afterwards, and the interface was once again present), and restored networking. |
I lose internet connectivity after doing some |
Looks like sometimes the WSL virtual interface is using a narrower network on the linux side so the default gateway ends up invalid (IINM windows does not complain about default gateway being outside the main interface network but linux does):
On the windows side, the WSL interface was:
I think the problem is that the default gateway on the linux side should be If I change the netmask to
This is just a temporary workaround though, when the DHCP lease expires the netmask will be reset, same if you restart WSL. Lets wait for a fix, I bet |
I think this is a dupe of #3438 |
I got internet working after setting gateway and subnetmask to the same as the WSL adapter on windows, then randomly it'd stop again..
and doing:
it worked again... very strange, got those commands from the feature @pauloscardine mentioned |
Build 18970 has some fixes in this area, if you are continuing to see issues after this build please open a new issue. |
I stopped my antivirus Fireball and Network started working |
i was able to fix the problem by changing the resolve.conf file and some netsh commands. But this seemed way better and more accurate (and it worked for me) |
I also see this issue currently (happened after taking the most recent security update on Windows). In my case, and in the original poster's case, the vEthernet (WSL) adapter is missing on the Windows side. There is nothing to reference and no amount of WSL routing will fix it. This happened to me a few months ago also, and the only way I could get the vEthernet (WSL) adapter to reappear was uninstall, disable, restart, reinstall WSL as suggested in previous posts. Otherwise, there's nothing helpful in this thread and this is still an outstanding bug. If you can see your vEthernet (WSL) adapter in windows' ipconfig, then here is your thread: |
Another Windows Update, another missing vEthernet (WSL) Adapter..... six weeks later |
I'm facing the same issue as @andymule at the moment. I'm on OS build 20211.1000, which is the latest one from the dev channel.
(may be a duplicate of #4810) |
Same, no WSL adapter after an upgrade to 10.0.19041.450. Two "Wireless LAN adapters" have appeared in the
|
Microsoft has an outstanding reputation of closing non-resolved issue. Looks like the WSL distro IP address and netmask are hardcoded somewhere, and they won't change when you modify the settings in the Windows host adapter. In adapter settings, enable DHCP: Shutdown WSL and restart the vEthernet adapter from an elevated Powershell: wsl --shutdown
Restart-NetAdapter "vEthernet (WSL)" On the Windows host, my WSL adapter has been assigned this non-routable APIPA address that I cannot seem to change:
Open WSL and run the following command: ip addr show dev eth0 Here is my output:
For some reasons, the range Also, no Internet access from/to your WSL distro, since the NAT adapter is actually built-in into the WSL vEthernet adapter and configuration is hidden. |
Was running WSL1 with no issues. Updated to WSL 2 using set version command broke things... DNS was working with 1, broken with 2. Suggestion to set a manual DNS rather than using the host worked. |
Your Windows build number: 10.0.18945.1001
What you're doing and what's happening:
After upgrading to 18945, I cannot connect to any network locations from inside WSL. While eth0 appears to get an IP address, it is not routable. For example, with this network configuration seen inside WSL:
the only address that can be pinged is the local interface, 172.28.121.226. Pinging the default gateway (172.28.112.1), the Windows host (172.16.1.2), a local LAN address (172.16.0.128), or the Internet (8.8.8.8) all fail, thus:
All of the above addresses should be reachable.
The virtual network addresses for WSL are also unreachable from the Windows host; i.e., from a command prompt, it is impossible to ping either 172.28.121.226 or 172.28.112.1.
The "vEthernet (WSL)" adapter on the Windows host seems to have gone missing; no such adapter is showing up in ipconfig.
Taken together, I think this indicates that something's gone adrift in the virtual switch configuration that WSL uses? Is there any way to recreate that?
The text was updated successfully, but these errors were encountered: