-
Notifications
You must be signed in to change notification settings - Fork 840
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
Unable to get internet when connected to 192.168.81.0/24 network #10016
Comments
Thanks for reporting this @sorryusernameisalreadytaken. Does running If not, can you follow the ['Networking issues']'https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#networking-issues) section and share the output ? |
No it does not help. I have immediately no internet when I change to a 192.168.81.0/24 / 192.168.82.0/24 network with the wsl2. If I then switch back to e.g. my cell phone's internet (mobile hotspot) it works immediately. Also in my private network at home (10.0.0.1/16).
I did that already. In the initial issues there is a wsl.zip containing the wsl.etl and the |
@sorryusernameisalreadytaken |
Why can you say that with such confidence? I can recreate the network at home with a completely different network hardware and get the same behavior. My Windows 10 was installed normally with no special extra setups. This is how it happens with all employees. I still see more of a WSL2 bug here. We have the WSL2 probably now 4 times completely uninstalled and again installed. The "vEthernet (WSL)" always gets the same static IP. No matter if I install wsl in my home network (10.0.0.1/16 ip range) or at work. |
Newer version of WSL creates some registry key to store static IP addresses. Could you please check if deleting or modifying those registry values fix the issue? I have explained those here #9580 |
Awesome! That worked. Sorry for the late reply but the person responsible in out IT-Service was on vacation and so was I. Deleting the NatNetwork and NatGatewayIpAddress value in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss fixed the issue.
I am a bit unsure about this issue here. My problem is fixed, but I think the wsl-installer should choose static IPs more carefully or should always recreate by random a new static ip when reinstalling the wsl. |
It is not required to uninstall Linux distribution in WSL2. The network IP related registries can be changed without that. |
Doing these solved my problem: Select your pc, open Virtual Switch Manager Select WSL Set to external network Select the network card the traffic runs through Then login to wsl2 terminal and configure an IP address. E.g.
This is where i found it: https://stackoverflow.com/a/62438375/10853017 |
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! |
Windows Version
Microsoft Windows [Version 10.0.19045.2846]
WSL Version
1.2.0.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.90.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Jan 27 02:56:13 UTC 2023
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
Unfortunately, I can't say what triggered it. Suddenly it was no longer possible to access the internet with my WSL2 Ubuntu 22.04 instance at my workplace.
Other colleagues have the same wsl2 setup as me and can connect to the internet with their WSL2 without any problems.
The office network has two possible DHCP ranges:
192.168.81.0/24 (WLAN/LAN)
192.168.82.0/24 (guest WLAN)
At home in the home office I have no problems in the network 10.0.0.1/16. If I change the network to 192.168.81.0/24 at home, the WSL has no internet again.
The other colleagues have got other IPs to their WSL-Virtual Adapter. But even after uninstalling and reinstalling the WSL feature, I still get the same IP on the virtual MS adapter.
Maybe an important information. We use in the team wsl as a non-administrator under windows. This means that the wsl2 is installed by it-support and then the remaining software can be installed by non-admin (ubuntu etc.).
Expected Behavior
No matter what network I am on, my WSL2 instance should always have internet if the network allows it.
Actual Behavior
I can't get internet on the following networks:
192.168.81.0/24 (WLAN/LAN)
192.168.82.0/24 (guest WLAN)
I get internet in the following:
10.0.0.1/16
Diagnostic Logs
wsl.zip
packets.zip
The text was updated successfully, but these errors were encountered: