microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
16.98k stars 798 forks source link

'networkingMode=mirrored' not work with systemd #11143

Open OPPO9008 opened 5 months ago

OPPO9008 commented 5 months ago

Windows Version

Microsoft Windows [版本 10.0.22635.3140]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

Kernel Version

6.1.21.2-microsoft-standard-WSL2

Distro Version

debian 12

Other Software

No response

Repro Steps

add .wslconfig

[experimental]
networkingMode=mirrored

add wsl.conf

[boot]
systemd=true

wsl --shutdown

re open debian

Expected Behavior

systemd ok network ok

eth0 ip is windows 's ip

Actual Behavior

network eth0 ip is not windows 's ip network not connect

3: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 70:85:c2:ae:46:77 brd ff:ff:ff:ff:ff:ff
    inet 169.254.144.159/16 brd 169.254.255.255 scope global eth0
       valid_lft forever preferred_lft forever

Diagnostic Logs

~$ systemctl status networking ● networking.service - Raise network interfaces Loaded: loaded (/lib/systemd/system/networking.service; enabled; preset: enabled) Active: active (exited) since Fri 2024-02-09 21:44:28 CST; 31min ago Docs: man:interfaces(5) Process: 52 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS) Process: 78 ExecStart=/bin/sh -c if [ -f /run/network/restart-hotplug ]; then /sbin/ifup -a --read-environment --al> Main PID: 78 (code=exited, status=0/SUCCESS)

Feb 09 21:44:28 DESKTOP-I03RFSB systemd[1]: Starting networking.service - Raise network interfaces... Feb 09 21:44:28 DESKTOP-I03RFSB systemd[1]: Finished networking.service - Raise network interfaces. lines 1-10/10 (END)

github-actions[bot] commented 5 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

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. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

chanpreetdhanjal commented 5 months ago

Hi. Can you please collect networking logs by following the instructions below? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues