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

Network is unreachable on ethernet connection but Ping, Traceroute work on Debian wsl2 on windows11 version 23H2 #10744

Closed
1 of 2 tasks
abdullah-bin-hasan opened this issue Nov 13, 2023 · 4 comments
Labels

Comments

@abdullah-bin-hasan
Copy link

abdullah-bin-hasan commented Nov 13, 2023

Windows Version

Microsoft Windows [Version 10.0.22631.2428]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Debian

Other Software

No response

Repro Steps

  1. Install wsl
  2. Convert/upgrade to wsl2

Expected Behavior

able to use wget, apt, curl commands

Actual Behavior

connection timed out Cannot initiate the connection.
Network is unreachable.

Diagnostic Logs

WslLogs-2023-11-15_21-14-23.zip

@abdullah-bin-hasan abdullah-bin-hasan changed the title Network is unreachable but Ping, Traceroute work on Debian Wsl2 on windows11 version 23H2 Network is unreachable but Ping, Traceroute work on Debian wsl2 on windows11 version 23H2 Nov 13, 2023
@abdullah-bin-hasan abdullah-bin-hasan changed the title Network is unreachable but Ping, Traceroute work on Debian wsl2 on windows11 version 23H2 Network is unreachable on ethernet connection but Ping, Traceroute work on Debian wsl2 on windows11 version 23H2 Nov 15, 2023
@abdullah-bin-hasan
Copy link
Author

abdullah-bin-hasan commented Nov 15, 2023

When connected with Ethernet only ICMP requests work, but with direct PPPOE connection without any router, there is not any problem.

PPPOE Networking properties:

Enabled:

  • IPv6
  • IPv4

Disabled:

  • Client for Microsoft Networks
  • File and Printer Sharing for Microsoft Networks
    Ethernet Networking properties:

Enabled:

  • Client for Microsoft Networks
  • File and Printer Sharing for Microsoft Networks
  • QoS Packet Sheduler
  • Bridge Driver
  • Microsoft LLDP Protocol Driver
  • Link-Layer Topology Discovery Responder
  • Link-Layer Topology Discovery Mapper I/O Driver

Disabled:

  • Microsoft Network Adapter Multiplexor Protocol
  • IPv6
  • Hyper-V Extensible virtual switch

@abdullah-bin-hasan
Copy link
Author

ipconfig on ethernet connection:

ipconfig

Windows IP Configuration

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : lan
IPv4 Address. . . . . . . . . . . : 192.168.1.103
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Ethernet adapter vEthernet (Default Switch):

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::d4e5:e9b4:d71b:9a65%17
IPv4 Address. . . . . . . . . . . : 172.31.16.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (WSL (Hyper-V firewall)):

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::e929:1811:3437:2a13%39
IPv4 Address. . . . . . . . . . . : 172.17.96.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :

@abdullah-bin-hasan
Copy link
Author

ip command from wsl with PPPOE:

$ ip addr
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 1480 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:62:22:b0 brd ff:ff:ff:ff:ff:ff
inet 172.17.104.36/20 brd 172.17.111.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fe62:22b0/64 scope link
valid_lft forever preferred_lft forever

ip command from wsl with ethernet connection:

$ ip addr
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:5c:4d:39 brd ff:ff:ff:ff:ff:ff
inet 172.17.104.36/20 brd 172.17.111.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fe5c:4d39/64 scope link
valid_lft forever preferred_lft forever

@abdullah-bin-hasan
Copy link
Author

Doing these solved my problem:
Open Hyper-V Manager as administrator

Select your pc, open Virtual Switch Manager

Select WSL

Set to external network

Select the network card the traffic runs through

Then login to wsl2 terminal and configure an IP address. E.g.

sudo ip addr flush dev eth0
sudo dhclient eth0

This is where i found it: https://stackoverflow.com/a/62438375/10853017

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

2 participants