microsoft / WSL

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

WSL2 ping issue when NIC has mutiple IP addresses - reopened #11751

Closed escherstair closed 1 week ago

escherstair commented 2 weeks ago

Windows Version

Microsoft Windows [Versione 10.0.19045.4529]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.146.1-2

Distro Version

Ubuntu-22.04

Other Software

No response

Repro Steps

  1. Assign two IP addresses (on different subnets) to a Network Interface Card (NIC)
  2. Using that NIC, connect an ethernet cable to a device which has an IP address on the network of the second IP address of the NIC (not the first one)
  3. ping the device from Windows, and check that it answers
  4. ping the device from WSL2

Expected Behavior

The device should answer to the ping.

Actual Behavior

No answer from the ping. If the device has an IP address on the network of the first IP of the NIC, the ping is successful.

Diagnostic Logs

This is a re-file of issue #9803 that has been closed for no activity

github-actions[bot] commented 2 weeks ago

Logs are required for review from WSL team

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.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

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.

escherstair commented 2 weeks ago

WslLogs-2024-07-04_16-35-21.zip

github-actions[bot] commented 2 weeks ago
Diagnostic information ``` Detected appx version: 2.1.5.0 ```
OneBlue commented 1 week ago

@escherstair: In step 1, you're saying that you have a Windows NIC that has two Ip addresses on different subnets ?

If so, it makes sense that WSL fails to ping the secondary IP address, given that there's most likely not routing table entry that would allow WSL to reach that NIC via that ip address.

Feel free to reopen if I misunderstood the issue and add more info. In the meantime I'll close this as by design.