microsoft / WSL

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

Always lost IP address with LAN or WiFi #11655

Open YiHui-Liu opened 3 months ago

YiHui-Liu commented 3 months ago

Windows Version

Microsoft Windows [Version 10.0.22631.3593]

WSL Version

2.1.1.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.146.1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Connect to the network. When the amount of data used reaches a certain threshold, the IP is lost.

Expected Behavior

normal

Actual Behavior

image

Diagnostic Logs

WslLogs-2024-05-31_12-07-19.zip

YiHui-Liu commented 3 months ago
[wsl2]
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
github-actions[bot] commented 3 months ago

View similar issues

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!

Open similar issues:

Closed similar issues:

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

Diagnostic information
.wslconfig found
Detected appx version: 2.1.1.0

github-actions[bot] commented 3 months ago

View similar issues

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!

Open similar issues:

Closed similar issues:

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

Diagnostic information
.wslconfig found
Detected appx version: 2.1.1.0

YiHui-Liu commented 3 months ago

Update Logs: WslNetworkingLogs-2024-06-05_17-12-37.zip WslNetworkingLogs-2024-06-05_17-13-54.zip

github-actions[bot] commented 3 months ago
Diagnostic information ``` .wslconfig found Detected appx version: 2.1.1.0 optional-components.txt not found ```
CatalinFetoiu commented 1 month ago

thanks for sending the logs

the logs show that before the repro the Linux eth0 interface has an IPv4 address assigned and multiple IPv6 addresses, but after the repro those are missing. The logs don't show WSL deleting those addresses

this points to either Linux itself deleting the addresses or some Linux agent/process deleting them sorry, unfortunately the current traces don't give us visibility into what in Linux deleted the addresses

@YiHui-Liu , you mentioned "When the amount of data used reaches a certain threshold" - is there a particular network traffic test you are doing or does this happen after regular WSL usage?

thanks

alex-klimov commented 1 week ago

For my case the problem seemed to come from cloud-init tool, which was included in Ubuntu 20 distribution in my case.

This fixed the connectivity issue for me:

sudo touch /etc/cloud/cloud-init.disabled

and then restart WSL.