Skip to content
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 networking doesn't work at all for me #5908

Closed
naikrovek opened this issue Sep 11, 2020 · 8 comments
Closed

WSL 2 networking doesn't work at all for me #5908

naikrovek opened this issue Sep 11, 2020 · 8 comments
Labels

Comments

@naikrovek
Copy link

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.508]
Your Distribution version: Release:        20.04  (It's Ubuntu)
Whether the issue is on WSL 2 and/or WSL 1: WSL 2 - cat /proc/version gives this: MSYS_NT-10.0-19041 version 3.0.7-338.x86_64 (Alexx@WARLOCK) (gcc version 9.1.0 (GCC) ) 2019-07-11 10:58 UTC

Steps to reproduce

Not sure how to reproduce this, specifically, but it has happened on two of my machines in which I installed Hyper-V before enabling WSL, and I can't reproduce this on a new machine where WSL was enabled first.

When using WSL 2, networking doesn't work in any way. Some of this may be due to my employer's firewall configuration, I don't know. DNS lookups don't work, pinging the host WSL interface doesn't work, nothing. No networking works at all.

Setting the WSL instance to V1, uninstalling Hyper-V, rebooting, then setting the WSL instance to V2 made networking work, but only once, and only until I rebooted next, and I can't reproduce that success, now. I'm not sure what was going on there. I'm back to no network connectivity at all in WSL 2 instances, no matter what I try.

I collected logs per Craig Loewen's instructions on twitter and they're attached below.

WSL logs:
logs.zip

Expected behavior

Networking should work. I should be able to ping stuff and do DNS lookups and apt should be able to do its thing.

Actual behavior

Networking doesn't seem to be working at all in WSL 2 instances.

If there is further details I can collect, let me know, and I'll collect them. Edit the bug subject/title as desired.

@mahdi7839
Copy link

mahdi7839 commented Sep 17, 2020

hi, i have the same problem, but on my machine i will access the outside via Wifi and not Ethernet.
0000000000000000000000 -----> Wifi ----> INETRNET (ok)
WSL2 ----> Pyhsical Laptop |
0000000000000000000000 -----> Eth0 -----> INTERNET (X)
theoretically between Wsl2 and Internet ( on the windows ) musst runed a NAT or PAT function.
can you please test it that have you outside access over Wifi or conversely?

@naikrovek naikrovek changed the title WSL 2 networking doesn't seem to work if Hyper-V is installed before WSL is enabled. WSL 2 networking doesn't work at all for me Sep 23, 2020
@naikrovek
Copy link
Author

naikrovek commented Sep 23, 2020

#5831 appears to be related. Same basic symptoms at least.

Actually no, that is a DNS thing, and I can't get a single packet out of WSL 2, nevermind DNS.

@naikrovek
Copy link
Author

naikrovek commented Sep 23, 2020

@mahdi7839 I switched to Wi-Fi and WSL 2 networking is broken either way. I notice now that I have two virtual Ethernet adapters with the same IP address, and a third with an overlapping subnet. That may or may not be related to this WSL 2 issue, but it probably isn't great in any case.

...

Ethernet adapter vEthernet (WSL):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::81dc:177c:46ef:2535%81
   IPv4 Address. . . . . . . . . . . : 172.24.240.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :

...

Ethernet adapter vEthernet (Ethernet):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::79b5:4ea9:47f5:356f%54
   IPv4 Address. . . . . . . . . . . : 172.29.240.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (Ethernet 3):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::bcf7:1940:76e9:5582%59
   IPv4 Address. . . . . . . . . . . : 172.29.224.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :

All of these are of course managed by Windows and I didn't set them up.

does this give you any clues as to what's going on?

@naikrovek
Copy link
Author

naikrovek commented Sep 23, 2020

https://gist.github.com/danvy/9486bf730371436131cb888ff4c2ceb6 does not fix the issue for me.

Disabling the non-WSL ethernet adapters which share IPs or networks does not resolve the issue for me.

@naikrovek
Copy link
Author

if the cause of this particular issue has been found, can anyone let me know if there is a workaround? anything short of a complete OS reinstall is acceptable to me.

I really want to use WSL 2...

@lukee1234
Copy link

If you modified, moved or compressed the temp folder, look at #5437 for the solution

@naikrovek
Copy link
Author

If you modified, moved or compressed the temp folder, look at #5437 for the solution

Thank you. That isn't the problem, in my case. I tried the fix anyway, and still no network.

@naikrovek
Copy link
Author

I am no longer convinced that this problem is related to anything I posted in the issue originally.

There is a far more pedestrian problem in my cases, that I failed to take into consideration. Company mandated firewall on non-domain networks, and all WSL 2 networks are non-domain networks.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants