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

Cannot connect WSL2 vEth interfaces in Mirrored mode even hostAddressLoopback is true. #10731

Open
1 of 2 tasks
kenvix opened this issue Nov 9, 2023 · 1 comment
Open
1 of 2 tasks
Labels

Comments

@kenvix
Copy link

kenvix commented Nov 9, 2023

Windows Version

Microsoft Windows [Version 10.0.22631.2506]

WSL Version

2.0.7.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04.3 LTS

Other Software

.wslconfig:

[wsl2]
memory=4GB
localhostForwarding=true
#networkingMode=bridged
#vmSwitch=vNAT
#networkingMode=mirrored
guiApplications=true

[experimental]
autoMemoryReclaim=gradual #
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
sparseVhd=true
hostAddressLoopback=true

Repro Steps

  1. Enter WSL2 and create a network space and veth device with commands below
ip netns add ns1
  1. Create a pair of veth devices and activate them with commands below
ip link add type veth
ip link set up dev veth0
ip link set veth1 netns ns1
ip a a 192.168.99.1/24 dev veth0
  1. Enter ns1 and allocate an IP.
ip netns exec ns1 bash
ip link set up dev veth1
ip a a 192.168.99.2/24 dev veth1
  1. Ping each other to make sure that netns is working
ping  192.168.99.1 # in ns1
ping 192.168.99.2 # in wsl2 root

PING 192.168.99.2 (192.168.99.2) 56(84) bytes of data.
64 bytes from 192.168.99.2: icmp_seq=1 ttl=64 time=0.034 ms
  1. Ping either 192.168.99.1 or 192.168.99.2 in Windows cmd.
ping 192.168.99.1

Windows firewall is disabled.

Expected Behavior

Windows can ping and connect the veth network normally.

Actual Behavior

Windows can't ping or connect the veth network at all.

22:08:29 -1 ❯ ping 192.168.99.1

Pinging 192.168.99.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.99.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


15:28:32 ERROR ❯ ping 192.168.99.2

Pinging 192.168.99.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.99.2:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Diagnostic Logs

No response

Tasks

No tasks being tracked yet.
@kenvix kenvix closed this as completed Nov 9, 2023
@kenvix kenvix reopened this Nov 9, 2023
@kenvix kenvix changed the title Cannot connect WSL2 vEth interfaces in Mirrored mode. Cannot connect WSL2 vEth interfaces in Mirrored mode even hostAddressLoopback is true. Nov 9, 2023
@kenvix kenvix closed this as completed Nov 9, 2023
@brett19
Copy link

brett19 commented Jan 20, 2024

I was also trying to do something similar to @kenvix and am unable to get the Windows host to be able ping the veth (192.168.99.x addresses). I don't believe this issue is related to hostAddressLoopback, having it enabled or disabled both yield the same failure.

My environment is broadly the same as theirs:
Ubuntu 22.04

WSL version: 2.1.0.0
Kernel version: 5.15.137.3-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.3007

.wslconfig

[experimental]
networkingMode=mirrored
hostAddressLoopback=true ***also disabled yields same result

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

3 participants