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 2 Network Connectivity Issue #10433

Open
1 of 2 tasks
uiteoi opened this issue Aug 30, 2023 · 3 comments
Open
1 of 2 tasks

WSL 2 Network Connectivity Issue #10433

uiteoi opened this issue Aug 30, 2023 · 3 comments

Comments

@uiteoi
Copy link

uiteoi commented Aug 30, 2023

Windows Version

Microsoft Windows [version 10.0.22621.2215]

WSL Version

Version WSL : 1.2.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu-22.04

Other Software

This is a fresh install.

If I switch to WSL version 1 it works with a very different network configuration:
$ ping google.com
PING google.com(par21s18-in-x0e.1e100.net (2a00:1450:4007:806::200e)) 56 data bytes
64 bytes from par21s18-in-x0e.1e100.net (2a00:1450:4007:806::200e): icmp_seq=1 ttl=115 time=41.7 ms
64 bytes from par21s18-in-x0e.1e100.net (2a00:1450:4007:806::200e): icmp_seq=2 ttl=115 time=56.9 ms
64 bytes from par21s18-in-x0e.1e100.net (2a00:1450:4007:806::200e): icmp_seq=3 ttl=115 time=55.8 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 41.689/51.448/56.857/6.914 ms

Note the use of ipv6 addresses when using WSL version 1 vs ipv4 addresses in WSL 2.

I have tried a lot of things, from plenty of forums then ChatGPT help, to no avail.

I have reinstalled wsl multiple times, updated windows, checked defender configuration (I have no other firewall), I do not use a VPN, tryed other distros including non-debian Fedora.

My network adapater is a USB Wifi, and I have a disconnected Ethernet adapter on this machine.

Repro Steps

Launch any WSL 2 distribution (e.g., Ubuntu 22.04).

Attempt to ping external websites (e.g., ping google.com).

Observe that network connectivity fails with "Destination Net Unreachable" error:
ping google.com
PING google.com (142.250.179.78) 56(84) bytes of data.
From 192.168.138.193 (192.168.138.193) icmp_seq=1 Destination Net Unreachable
From 192.168.138.193 (192.168.138.193) icmp_seq=2 Destination Net Unreachable
From 192.168.138.193 (192.168.138.193) icmp_seq=3 Destination Net Unreachable
^CFrom 192.168.138.193 icmp_seq=4 Destination Net Unreachable

--- google.com ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3050ms

Observe that tracepath also is reports an unreachable google.com:
tracepath -n google.com
1?: [LOCALHOST] pmtu 1500
1: 172.24.96.1 0.262ms
1: 172.24.96.1 0.263ms
2: 192.168.138.193 206.020ms !N
Resume: pmtu 1500

Expected Behavior

Should be able to ping external network

Actual Behavior

Destination Net Unreachable

Diagnostic Logs

$ip route
default via 172.24.96.1 dev eth0 proto kernel
172.24.96.0/20 dev eth0 proto kernel scope link src 172.24.110.255

$ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:1c:9e:c7 brd ff:ff:ff:ff:ff:ff
inet 172.24.110.255/20 brd 172.24.111.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fe1c:9ec7/64 scope link
valid_lft forever preferred_lft forever

!!! Note the weird configuration: inet 172.24.110.255/20 brd 172.24.111.255 scope global eth0
!!! It does not match the ip route configuration nor the ip address in the following ipconfig output below which is 172.24.96.1

ipconfig output (from powershell):

Configuration IP de Windows

Carte réseau sans fil Connexion au réseau local* 1 :

Statut du média. . . . . . . . . . . . : Média déconnecté
Suffixe DNS propre à la connexion. . . :

Carte réseau sans fil Wi-Fi 2 :

Suffixe DNS propre à la connexion. . . :
Adresse IPv6. . . . . . . . . . . . . .: 2a04:cec0:113f:288b:981a:7d7e:60a9:fc02
Adresse IPv6 temporaire . . . . . . . .: 2a04:cec0:113f:288b:14d2:1f45:a1e5:a866
Adresse IPv6 de liaison locale. . . . .: fe80::d87:3a75:ca7b:cef1%3
Adresse IPv4. . . . . . . . . . . . . .: 192.168.138.50
Masque de sous-réseau. . . . . . . . . : 255.255.255.0
Passerelle par défaut. . . . . . . . . : fe80::ec24:8dff:fe54:bca7%3
192.168.138.193

Carte Ethernet vEthernet (Default Switch) :

Suffixe DNS propre à la connexion. . . :
Adresse IPv6 de liaison locale. . . . .: fe80::13d6:1406:e5db:b9ad%19
Adresse IPv4. . . . . . . . . . . . . .: 192.168.240.1
Masque de sous-réseau. . . . . . . . . : 255.255.240.0
Passerelle par défaut. . . . . . . . . :

Carte Ethernet vEthernet (WSL) :

Suffixe DNS propre à la connexion. . . :
Adresse IPv6 de liaison locale. . . . .: fe80::bea2:86c6:7335:b775%30
Adresse IPv4. . . . . . . . . . . . . .: 172.24.96.1
Masque de sous-réseau. . . . . . . . . : 255.255.240.0
Passerelle par défaut. . . . . . . . . :

@Jai-GAY
Copy link

Jai-GAY commented Sep 5, 2023

It could be an antivirus settings issue. my case is Symantec (Broadcom).

symantec_works

@uiteoi
Copy link
Author

uiteoi commented Sep 5, 2023

As mentionned in the other software of the issue: I have no other firewall (other than defender). Plus it works with WSL 1 so this cannot be a firewall isue.

@berecat
Copy link

berecat commented Nov 28, 2023

the same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants