-
Notifications
You must be signed in to change notification settings - Fork 822
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 USB Tethering Network issue #5313
Comments
Okay since this issue was really eating away at my mind I decided to take a look at the "vEthernet (WSL)" interface with Wireshark. Seeing the above in the capture log I took a look at the ARP table with Just mentioning this in case it is relevant to the issue. |
Please collect WSL logs and post the backlink to the feedback item here. Also please identify any third-party networking software that has been installed on Windows. |
I am not sure what WSL logs would be relevant as not much is seen when re-creating the problem. When I ping www.google.com it just hangs at "PING www.google.com (172.217.9.196) 56(84) bytes of data." until I kill the command and it returns some variant of "59 packets transmitted, 0 received, 100% packet loss, time 60330ms". The same with if pinging 8.8.8.4. A sudo apt-get update eventually returns a connection timed out error. Previously, Cisco Anyconnect and SonicWall VPNs were previously installed (removed as no longer in use), PIA VPN was temporarily removed, and Comodo firewall was also removed. Windows firewall is on. VMWare 15 is installed which created two virtual network adapters. As SuhasHebbar mentioned above the tethered USB network interface is temporary and is deleted when the MiFi is turned off/unplugged. |
Same issue here.I use a android phone to share its connection. |
I am facing the same issue as well for example when trying to do I am using 20231.1000 dev build |
related issue here as well #5827 |
The issue still exists with the latest update.
|
still |
Same problem here .... |
I'm seeing the same issue... @therealkenc There are too many things to consider, but basically what I did:
Not taking Bluetooth/WiFi into account: At the end I was left with only 1 network adapter (+ the one generated by HyperV for WSL). It still didnt work. hint. I "log" all my changes I do to my Windows (+WSL) in a file and it all started happening when I updated from WSL1 to WSL2 but at the same time I was installing other software too (eg. Docker, which is why I upgraded to WSL2 in the first place). Things to consider (or lets say "which are strange"):
but tbh I have absolutely 0 clue whats going on and even less regarding networking in general My current workaround:
After doing this your WSL should share the same nic as your windows (so even tunneling with vpns work). |
same |
Still.... |
what worked for my Android is installing Easytether on my Xiaomi android device and also on pc. http://www.mobile-stream.com/easytether/android.html I don't know why it worked but I guess it uses its own RNDIS driver than using default Windows driver. installing a different tethering worked for me. |
It works!Thank you so much! |
Same thing:
|
Thanks to you to. apparently you can use the same tool on Linux too have you tried using it on WSL? |
Having the same issue on Windows 11. |
wait, I don't want to update to windows 11 |
not yet fixed for windows 10 |
They no longer care about windows 10 and yet this thing is frustrating. If wifi works why not tethering |
I'm not sure it's quite the same issue, but since it's like #6121, I suspect it shares underlying problems. And I have a worked-once-for-me fix: TLDR; adjust route metrics with My normal internet connection (wired) went down so I connected to a wifi-hotspot. This got Windows (Edge, etc.) back in business. But WSL didn't pick up on the change. Gather some information from netstat. netstat.exe -rn (filtered output)> netstat.exe -rn
===========================================================================
Interface List
46...[REDACTED] d4 ......Hyper-V Virtual Ethernet Adapter
3...[REDACTED] bb ......Realtek USB GbE Family Controller #2
11...[REDACTED] 1a ......Microsoft Wi-Fi Direct Virtual Adapter
13...[REDACTED] 19 ......Microsoft Wi-Fi Direct Virtual Adapter #2
10...[REDACTED] 19 ......Intel(R) Wi-Fi 6 AX201 160MHz
1...........................Software Loopback Interface 1
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.136 25
0.0.0.0 0.0.0.0 192.168.151.74 192.168.151.81 50
192.168.1.0 255.255.255.0 On-link 192.168.1.136 281
192.168.151.255 255.255.255.255 On-link 192.168.151.81 306
[...]
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
10 66 ::/0 fe80::a4e4:7ff:fe6f:e60
10 306 fe80::/64 On-link
3 281 fe80::/64 On-link
46 271 fe80::/64 On-link
3 281 fe80::10d9:cacd:4eac:2d92/128
[...]
===========================================================================
Persistent Routes:
None Of note:
Normally those IPv4 metrics would make sense, but not while the internet is unreachable through interface 3. So I found that this > route.exe change 0.0.0.0 mask 0.0.0.0 ⚠192.168.1.1⚠ metric ⚠27⚠ IF ⚠3⚠
OK! The values are mostly direct from the from the IPv4 route table, with a carefully chosen metric addition (27) to make the wired gateway less attractive (25+27>50), applied explicitly to the wired interface (3). With the wireless route more attractive, wsl's I don't know what the underlying problem is. It could be that Windows didn't drop the wired IPv4 route when it identified the internet was unavailable. It could be that it applies bad metrics. It could be that Edge uses IPv6 while WSL uses IPv4. Or something else. But changing the metric got me up and running without any restarts. And, just in time, my wired internet came back. Without having to further modify the above, networking from WSL is still functional, both before and after disabling WIFI. (It may help that the next lowest metric is around 271, so there's plenty of wiggle room.) Why didn't I just disable the wired connection? Well, that's how I was remoting the laptop that could use my wifi hotspot... 😅 |
Broken on Windows 11 22621.674 |
Windows 11 22621.1992, still not working |
Still broken on Windows 11 build 22621.2134 |
Still broken |
Hi. Can you please collect networking logs by following the instructions below? |
It's been broken for 4 years. Any solutions for Windows 10? |
My friend. Format windows and install Linux. The next time this happens, a helpful netizen will have given you a patch, and the patch will be merged within a few weeks. |
@Aleksanaa I want to thank wsl, it made me switch to Linux. And this was exactly what I did |
I had been using Linux for development purposes but then switched back to Windows and WSL. That was my biggest life mistake. |
It's difficult to reproduce. I encountered this issue in the past on only one device, which was running WSL 1 (on Win 10). Since upgrading to WSL 2, I haven't experienced it anymore. |
For me that is reproduceable in 100% cases: just connecting the PC to the Internet with a USB dongle (phone), starting WSL and that's it: "No Internet Connection" |
First, there is no error message that says "No Internet Connection." Second, what you are describing sounds like a bug you’re experiencing (on your device), but we need more information to reproduce it. When I follow your instructions, I don’t encounter any "no internet connection" issue. The easiest way to help would be to upload a virtual machine or Docker file, so everyone can work with the exact environment where the bug occurs. |
So basically, I am plugging in the android device to my PC with enabled tethering. On my host machine it works fine but when I enter WSL, there's no internet access. It's probably because WSL doesn't care about my networks except Ethernet (hence one adapter vEthernet). I have tried internet connection sharing directly to the vEthernet adapter and I have got to say it worked, kind of. WSL had access to the internet but it was not reliable at all. Huge packet losses and 3000 ms for a request to hit back. As far as I know, WSL introduced network mirroring for latest WSL but only for Windows 11. WSL version: 2.3.24.0 |
Yes, that's not only happening when "tethering" Android devices but any "RNDIS" device, it seems (tried that connecting to a non-smartphone that can provide "USB ethernet" (an Alcatel 3080g 4G phone which is not running Android) and the same happens as described above. |
Your Windows build number: Microsoft Windows [Version 10.0.19041.264]
What you're doing and what's happening:
traceroute
commandNote: These steps were performed on a fresh distro setup with traceroute installed (sudo apt-get install traceroute).
So effectively no internet access in WSL 2 while USB Tethering..
traceroute
works fine with only the WiFi connected.I've put the output of
ipconfig
andGet-NetAdapter
with either WiFi or USB Tethering in a gist in case it is relevant.USB Tethering creates a temporary network interface (in my case "Ethernet 2") that is deleted on disconnecting. This interface is not present on boot/login.
The text was updated successfully, but these errors were encountered: