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

send a UDP packet to 255.255.255.255 on host os failed when wsl installed #5671

Closed
xspeed1989 opened this issue Jul 29, 2020 · 9 comments
Closed
Labels

Comments

@xspeed1989
Copy link

Environment

Windows build number:Microsoft Windows NT 10.0.19041.0
Your Distribution version: none
the issue is on WSL 2 and WSL 1

Steps to reproduce

  1. install windows 10 2004
  2. send a UDP packet to 255.255.255.255 on the host os by any software you want
  3. install Windows Subsystem for Linux
  4. send a UDP packet to 255.255.255.255 on the host os by any software you want

Expected behavior

two UDP packets can be captured on Wireshark

Actual behavior

The step 1 UDP packet can be captured on Wireshark
The step 2 UDP packet can't be captured on Wireshark

@therealkenc
Copy link
Collaborator

Your Distribution version: none
the issue is on WSL 2 and WSL 1
any software you want

In a less friendly place that would be two strikes on #5667. [And there's only two.] Let's pretend you answered: Ubuntu 20.04, WSL2, and socat.

image

That wireshark part of the screencap above is supposed to represent an absence of traffic going out the physical NIC, watching from the Windows side. Normal (non-broadcast) UDP traffic goes out, natch. As a practical matter, anything that wants to broadcast is going to suffer #4825 as well, independent of broadcast. Blocks implementation of DHCP (and else) for anyone venturing to try. The submission is not novel, but I can't find a good dupe target.

@xspeed1989
Copy link
Author

xspeed1989 commented Jul 29, 2020

@therealkenc
Sorry for duplicate issue,
because English is not my mother language,i submit a terrible issue

PS C:\Windows\system32> route PRINT -4
===========================================================================
Interface List
  8...00 ff 4f 2e cb 33 ......TAP-Windows Adapter V9
 25...00 15 5d c9 65 78 ......Hyper-V Virtual Ethernet Adapter
  6...00 e0 6e 68 00 fa ......Realtek PCIe GbE Family Controller
  1...........................Software Loopback Interface 1
 36...00 15 5d 8b db 2a ......Hyper-V Virtual Ethernet Adapter #2
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    172.16.60.254     172.16.60.81    291
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
      172.16.60.0    255.255.252.0         On-link      172.16.60.81    291
     172.16.60.81  255.255.255.255         On-link      172.16.60.81    291
    172.16.63.255  255.255.255.255         On-link      172.16.60.81    291
     172.20.240.0    255.255.240.0         On-link      172.20.240.1    271
     172.20.240.1  255.255.255.255         On-link      172.20.240.1    271
   172.20.255.255  255.255.255.255         On-link      172.20.240.1    271
      172.21.64.0    255.255.240.0         On-link       172.21.64.1   5256
      172.21.64.1  255.255.255.255         On-link       172.21.64.1   5256
    172.21.79.255  255.255.255.255         On-link       172.21.64.1   5256
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link      172.16.60.81    291
        224.0.0.0        240.0.0.0         On-link      172.20.240.1    271
        224.0.0.0        240.0.0.0         On-link       172.21.64.1   5256
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link      172.16.60.81    291
  **255.255.255.255  255.255.255.255         On-link      172.20.240.1    271**
  255.255.255.255  255.255.255.255         On-link       172.21.64.1   5256
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0    172.16.60.254  Default
===========================================================================

Look at the bold part, the metric is lower than 172.16.60.81 291
if change 291 to lower than 271 or change 271 to greater than 291
the issue is not existed

@therealkenc therealkenc added the needs-investigation likely actionable and/or needs more investigation label Jul 29, 2020
@craigloewen-msft
Copy link
Member

@xspeed1989 could you take a trace for us using feedback hub for this issue? Instructions here on how to do so. And then could you link us to the feedback hub item?

Thanks!

@xspeed1989
Copy link
Author

@xspeed1989 could you take a trace for us using feedback hub for this issue? Instructions here on how to do so. And then could you link us to the feedback hub item?

Thanks!

OK I will do it

@BrianGithubber
Copy link

We suspect that winnat may be at fault. Is it possible to attempt this simple repro to confirm/deny that hypothesis?

Just setup the repro. Then do:
net stop winnat

Then:
sc query winnat

to make sure it is stopped.

Then see if the repro still happens. Note that you'll have to reboot your machine afterwards to get it back into the normal state.

@therealkenc
Copy link
Collaborator

Started or stopped winnat appears to have no effect here on WSL2. A dive of WSL1 seems okay started or stopped. This is on 20185.

WSL2:

image

WSL1 (winnat still stopped below, but get same result started):

image

With reflection I'm not fully convinced my repro is the same as the what the OP is intending to describe. His "on host os" (read: On Windows) can be taken at its word. If your 'suspect' is Windows Hypervisor Platform related (contrast WSL) I can do my repro under a different cover and go away.

@therealkenc
Copy link
Collaborator

@xspeed1989 please try net stop winnat and see if that helps your scenario.

@ghost
Copy link

ghost commented Aug 17, 2020

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

@therealkenc therealkenc removed needs-investigation likely actionable and/or needs more investigation needs-author-feedback labels Aug 17, 2020
@BWhitten
Copy link

I have the same issue so perhaps can provide the information needed.

Following the repro above with net stop winnat doesn't resolve sending the broadcasts from within WLS2
image

My problem case being slightly different, with WSL2 installed, sending a broadcast from the host and receiving direct replies on the host.
The problem appears to be in the sending of a broadcast as I am able to receive broadcasts on the box with WSL2 installed.

The following is a working UDP broadcast from a machine without WSL2 (or virtualbox) installed .
image

This issue was closed.
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

5 participants