-
Notifications
You must be signed in to change notification settings - Fork 832
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
WSL2 gets the broadcast (.255) IP from the Hyper-V Adapter. #12256
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging |
/question |
Diagnostic information
|
@Roemer: I'm surprised that you're getting |
I was not able to reproduce this anywhere and it worked for 40+ workstations just this one failed by getting the *.255 IP. As the user was completely blocked, we searched for a workaround and found that the IP of the WSL Instance is stored in a registry key found in So to reproduce that it is not working, one can just set this registry key to *.255. But I cannot reproduce how it got that IP in the first place. |
Well this would be expected, since a .255 ip address is a broadcast address, so networking can't function with it. I'll close this for now, but feel free to reopen if you reproduce WSL automatically generating a .255 ip address |
We are using the inofficial registry keys to fix the IP range for WSL. For this, we use the following script:
This worked good so far but not we have one case, where the IP inside WSL for
eth0
is the broadcast IP (10.20.30.255) which I think leads to the networking issues this user has.The output from
ip addr show
is like:The WSL instance indeed is not able to do any networking and I suspect this is because of the IP it got. We tried getting a new IP from DHCP (
dhclient -r
) but that didn't do anything. Also restarting and even re-creating the WSL2 (Debian) from scratch did not help.Is there maybe a possible issue that WSL wrongly uses the broadcast address? Also is there any way to fix this for this user?
The text was updated successfully, but these errors were encountered: