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

No network access in WSL 2 while ethernet network interface is enabled #8287

Closed
1 of 2 tasks
KyleRAnderson opened this issue Apr 13, 2022 · 7 comments
Closed
1 of 2 tasks
Labels

Comments

@KyleRAnderson
Copy link

KyleRAnderson commented Apr 13, 2022

Version

Microsoft Windows [Version 10.0.22000.593]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1

Distro Version

All distros, though I use Ubuntu 21.10 mainly

Other Software

No response

Repro Steps

With a computer that has both a WiFi network interface and an ethernet one:

  1. Attempt to connect to the internet in any WSL 2 distribution, with something like: ping 8.8.8.8. For me, no packets get through. The same is true for anything that uses internet (e.g. apt-get, git, ...).

Expected Behavior

While connected to ethernet or WiFi, WSL 2 distributions will have network connectivity.

Actual Behavior

I'm running this on a Surface Book 2, so the ethernet is connected via a USB-C hub. I'm not sure if this would make a difference.

With both a WiFi and ethernet network interface enabled and active (both are connected to a network), I've tried to access the network from within any WSL 2 distribution with commands like ping 8.8.8.8 and had no success - no network is accessible from within the distribution. This is with no VPNs or any special network configurations. I am however still able to use Windows binaries from the distribution and they have network access, which is my current workaround for things like git clone that is far from optimal.
I've tried the same thing after disabling the WiFi interface so that the ethernet interface is the only one, and this still does not work.
However, if I disable the ethernet interface and enable only the WiFi one, then everything works fine. So it seems that if the ethernet interface is enabled at all, I have networking issues.

Other things I have tried:

  • Disabling Windows firewall completely.
  • Changing the network type from public to private.
  • Windows Network reset
  • Connecting to a VPN using the OpenVPN client. Oddly enough, this fixes the issue.
  • I have not tried plugging in to a different network to see if there's something specific about my current one that's causing this. I can try this soon.

An additional note: I experience the exact same behaviour when using the Windows Sandbox, and since I know the common denominator between Windows Sandbox and WSL 2 is Hyper-V, I believe the issue is there.

Similar issues: #5336, #4731.

Diagnostic Logs

Networking diagnostics retrieved from networking.bat:
wsl.etl.zip

@ghost ghost added the network label May 24, 2022
@JCMarques15
Copy link

Seems i have exactly the same issue, but on a Dell laptop. The moment i disabled the Ethernet adapter networking inside the WSL 2 started working, though now i am struggling with name resolution... its not easy to get WSL 2 to work 😆

@huiminghao
Copy link

same here.

@import-shiburin
Copy link

Exactly same issue here, any update?

@mikecirioli
Copy link

facing the same issue here...

@sorryusernameisalreadytaken

@KyleRAnderson, @JCMarques15, @huiminghao, @import-shiburin or @mikecirioli does anybody of you facing the problem in all kind of networks. I just want to know if your problems with connecting your wsl2 to the internet could be the same like my one here:
#10016

And please fill in your networking logs here. You can check:
['Networking issues']'https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#networking-issues)

THX :)

@sfc-gh-kyanderson
Copy link

I have recently been using WSL 2 on a different wired network from the one I originally reported this on and network connectivity was fine with both the WiFi and ethernet interfaces enabled. This plus the fact that connecting to a VPN fixed the issue originally makes me think that there was something peculiar about the network I reported this on that was causing it, though I don't know what. Hopefully that information would be in the network diagnostic package I attached, though there doesn't seem to be much interest in looking into this issue.

Copy link
Contributor

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!

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

7 participants