microsoft / microsoft/WSL

WSL does not have an access to the WiFi hotspot network

Open
#11,741 17 comments 8 reactions 0 assignees View on GitHub
network
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### 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 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 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 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
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 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_

Contributor guide

Open the contributing guide

Research direction

Start with the reported .wslconfig settings, especially networkingMode=mirrored, and reproduce the failure by pinging 192.168.137.1 from Ubuntu in WSL 2 while the Windows WiFi hotspot is active. Compare the available interfaces from the supplied ifconfig output with the expected hotspot path. Done means WSL can reach the hotspot's local IP and the UDP server is accessible on that network.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ubuntu
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.