WSL does not have an access to the WiFi hotspot network
Windows Version
Microsoft Windows [Version 10.0.22631.3593]
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
- [X] 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
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:
- Cannot connect WSL2 vEth interfaces in Mirrored mode even hostAddressLoopback is true. (#10731), similarity score: 0.75
Closed similar issues:
- When opening windows mobile hotspot, WSL has no network connecting. Is there any solution for this? (#8123), similarity score: 0.79
- Cannot ping both from Windows host and WSL (#8462), similarity score: 0.77
- Access to windows host service from WSL2 (#10440), similarity score: 0.77
- WSL network does not work (#8601), similarity score: 0.76
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0
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.
Well, I have the same issue!
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
Any update on this issue?
@ODtian thanks for reaching out. If you can reproduce the issue, could you please collect and share networking logs using the steps in my previous comment? thanks!
@CatalinFetoiu Sure! Here you go.
- Hot spot not activated: WslNetworkingLogs-2024-12-07_22-16-36.zip
- Hot spot activated: WslNetworkingLogs-2024-12-07_22-13-33.zip
There is the same issue for me.
@CatalinFetoiu, is this issue under investigation? Is there any prospect of solving the problem?
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
I'm facing the same issue as well. @CatalinFetoiu However, when I'm trying to collect the log, the script didn't wait for me to do anything. I just starts and stops collecting the logs.
This is my procedure. Did I miss anything?
- Whether or not open WSL in advance. I not, execute
wsl --shutdownas well - In a privileged PowerShell:
# setup permission Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process # run the script .\wsl-collect-networking-logs.ps1 - See the outputs on screen:
PS C:\Users\tim\Documents> .\wsl-collect-networking-logs.ps1 目錄: C:\Users\tim\Documents Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 2025/2/14 下午 10:41 WslNetworkingLogs-2025-02-14_22-41-25 wsl_networking.wprp not found in the current directory. Downloading it from GitHub. networking.sh not found in the current directory. Downloading it from GitHub. 正在初始化資料收集 -- 請稍候。 初始化完成。請重現案例,然後執行 'capture stop'。 Log collection is running. Please reproduce the problem and press any key to save the logs. Saving logs... tcpdump: no process found 資料收集成功; 輸出 = WslNetworkingLogs-2025-02-14_22-41-25/wfpdiag.cab 100% [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Logs saved in: C:\Users\tim\Documents\WslNetworkingLogs-2025-02-14_22-41-25.zip. Please attach that file to the GitHub issue.
After pressing the enter to execute the command, I didn't do anything, even net.exe stop WslService, but the script just go on and on.
OS: Win11 23H2 Linux distro: Ubuntu 24.04.2 on WSL 2 PowerShell version:
Name Value
---- -----
PSVersion 5.1.22621.4391
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.4391
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Windows Terminal: 1.21.10351.0
@CatalinFetoiu, is this issue under investigation? Is there any prospect of solving the problem?
@CatalinFetoiu Can you give some feedback?
I am having the exact same issue, I have tried the mirrored mode, still can't see the port.
@CatalinFetoiu please provide any status
it's still not working