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 does not have an access to the WiFi hotspot network #11741

Open
1 of 2 tasks
Kosterio opened this issue Jul 3, 2024 · 6 comments
Open
1 of 2 tasks

WSL does not have an access to the WiFi hotspot network #11741

Kosterio opened this issue Jul 3, 2024 · 6 comments
Labels

Comments

@Kosterio
Copy link

Kosterio commented Jul 3, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3593]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

I have a running UDP server in the WSL Ubuntu instance.
I need to make it public for the network of the WiFi hotspot on Windows side.
But when I activated the hotspot there is no access even to its local ip address from WSL (ping 192.168.137.1 is not responding).

I tried to use the networkingMode=mirrored in the .wslconfig, but the behavior is the same. Hotspot interface is not presented in the ifconfig, only interface with WiFi MAC (for using as client):

$ ifconfig -a
eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 90:de:80:a3:10:fb  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.199.178.200  netmask 255.255.254.0  broadcast 10.199.179.255
        ether e8:9c:25:de:62:1b  txqueuelen 1000  (Ethernet)
        RX packets 7513  bytes 556095 (556.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 448  bytes 44396 (44.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 184  bytes 31013 (31.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 184  bytes 31013 (31.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

loopback0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:15:5d:bd:df:d5  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

my .wslconfig:

[wsl2]
memory=64GB
processors=24
networkingMode=mirrored
dnsTunneling=true
dnsProxy=false
firewall=false
autoProxy=false

[experimental]
hostAddressLoopback=true

How is it possible that I have an interface on Windows and it cannot be pinged from WSL?

Expected Behavior

ping 192.168.137.1 from WSL should be successful.

Actual Behavior

ping 192.168.137.1 is not responding.

Diagnostic Logs

No response

Copy link

github-actions bot commented Jul 3, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Kosterio
Copy link
Author

Kosterio commented Jul 3, 2024

Copy link

github-actions bot commented Jul 3, 2024

Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0

@Kosterio
Copy link
Author

Kosterio commented Jul 9, 2024

I've tried to install one more repo (Debian), but on WSL 1, and it works - besides eth interfaces the wifi interfaces are appeared and wifi2 is hotspot interface with 192.168.137.1 address.
So, it means that this is the bug of WSL 2 - in mirrored mode the wifi interfaces should be the same as on WSL 1, and in NAT mode the hotspot network should be accessible from the WSL. Hopefully Microsoft will fix it.

For now I cannot change WSL version for my distro and still looking for the workaround for this issue.

@OneBlue OneBlue added the network label Jul 9, 2024
@Zorik28
Copy link

Zorik28 commented Aug 27, 2024

Well, I have the same issue!

@CatalinFetoiu
Copy link
Collaborator

thanks for reporting the issue
can you please collect networking logs using https://github.com/microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1

please do the following steps:
run collect-networking-logs.ps1
run net.exe stop WslService
start WSL and reproduce the issue
stop collect-networking-logs.ps1

the script should create a zip with name starting with WslNetworkingLogs

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