Open PramSin opened 4 months ago
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.
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!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
The network log for the mirrored mode WslNetworkingLogs-2024-04-22_11-00-25.zip
The network log for the bridged mode WslNetworkingLogs-2024-04-22_11-02-54.zip
This issue is still not solved. Can any maintainer give me some feedback?
@PramSin try these commands:
sudo ip route del 0.0.0.0/1 dev eth2
sudo ip route del 128.0.0.0/1 dev eth2
You might need to run ip route
to see which one to run
thanks for attaching the logs. sorry for the delay following up on this
at the moment this is not supported when using mirrored networking mode
mirrored mode allows communication between WSL and the Windows host using 127.0.0.1 or using an IPv4 address assigned to the Windows host, but not communication with another VM running on Windows
Windows Version
Microsoft Windows [Version 10.0.22631.3447]
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.146.1
Distro Version
Ubuntu 22.04
Other Software
Hyper-V 10.0.22621.1
Repro Steps
I have a Hyper-V VirtualMachine connected with the VMSwitch "vEthernet (Default Switch)"(an internal switch with NAT). And it works well to access VM networking apps from host or access host networking apps from the VM.
Now I want to connect the VM from my WSL distro. I tried two approaches.
The ip address given by the "vEthernet (Default Switch)":
Use mirrored networkingMode
.wslconfig
file[experimental] ignoredPorts=22 hostAddressLoopback=true
ping 172.16.0.2
PING 172.16.0.2 (172.16.0.2) 56(84) bytes of data. From 172.16.0.3 icmp_seq=1 Destination Host Unreachable From 172.16.0.3 icmp_seq=2 Destination Host Unreachable From 172.16.0.3 icmp_seq=3 Destination Host Unreachable From 172.16.0.3 icmp_seq=4 Destination Host Unreachable From 172.16.0.3 icmp_seq=5 Destination Host Unreachable ^C --- 172.16.0.2 ping statistics --- 7 packets transmitted, 0 received, +5 errors, 100% packet loss, time 6280ms pipe 4
[wsl2] networkingMode=bridged vmSwitch="Default Switch" ipv6=true
ping 172.16.0.2
ping: connect: Network is unreachable
Pinging 172.16.0.2 with 32 bytes of data: Reply from 172.16.0.2: bytes=32 time<1ms TTL=64 Reply from 172.16.0.2: bytes=32 time<1ms TTL=64 Reply from 172.16.0.2: bytes=32 time<1ms TTL=64 Reply from 172.16.0.2: bytes=32 time<1ms TTL=64
Ping statistics for 172.16.0.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
PING 172.16.0.2 (172.16.0.2) 56(84) bytes of data. From 172.16.0.3 icmp_seq=1 Destination Host Unreachable From 172.16.0.3 icmp_seq=2 Destination Host Unreachable From 172.16.0.3 icmp_seq=3 Destination Host Unreachable From 172.16.0.3 icmp_seq=4 Destination Host Unreachable From 172.16.0.3 icmp_seq=5 Destination Host Unreachable ^C --- 172.16.0.2 ping statistics --- 7 packets transmitted, 0 received, +5 errors, 100% packet loss, time 6280ms pipe 4
ping: connect: Network is unreachable
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::2848:7b8:601d:94bf%23 IPv4 Address. . . . . . . . . . . : 172.16.0.1 Subnet Mask . . . . . . . . . . . : 255.255.240.0 Default Gateway . . . . . . . . . : 0.0.0.0
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 b0:22:7a:f4:56:8a brd ff:ff:ff:ff:ff:ff inet 10.155.122.144/24 brd 10.155.122.255 scope global noprefixroute eth0 valid_lft forever preferred_lft forever inet6 2001:da8:8001:7553:eadb:26d5:2317:5c28/64 scope global nodad deprecated noprefixroute valid_lft forever preferred_lft 0sec inet6 2001:da8:8001:7553:a80e:c45e:91f:b896/128 scope global nodad noprefixroute valid_lft forever preferred_lft forever inet6 fe80::87e2:fb75:1d53:b934/64 scope link nodad noprefixroute valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether a4:42:3b:2d:27:c4 brd ff:ff:ff:ff:ff:ff 4: loopback0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:15:5d:7c:94:29 brd ff:ff:ff:ff:ff:ff 5: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 00:15:5d:ce:fd:bf brd ff:ff:ff:ff:ff:ff
default via 10.155.122.1 dev eth0 proto kernel metric 35 10.155.122.0/24 dev eth0 proto kernel scope link metric 291 10.155.122.1 dev eth0 proto kernel scope link metric 35
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.155.122.144 netmask 255.255.255.0 broadcast 10.155.122.255 inet6 2001:da8:8001:7553:a80e:c45e:91f:b896 prefixlen 128 scopeid 0x0
inet6 fe80::87e2:fb75:1d53:b934 prefixlen 64 scopeid 0x20
inet6 2001:da8:8001:7553:eadb:26d5:2317:5c28 prefixlen 64 scopeid 0x0
ether b0:22:7a:f4:56:8a txqueuelen 1000 (Ethernet)
RX packets 7 bytes 526 (526.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14 bytes 1232 (1.2 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
loop txqueuelen 1000 (Local Loopback)
RX packets 8 bytes 1804 (1.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 1804 (1.8 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:7c:94:29 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
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> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 5e:bb:f6:9e:ee:fa brd ff:ff:ff:ff:ff:ff
lo: flags=73<UP,LOOPBACK,RUNNING> 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 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