microsoft / microsoft/WSL

WSL can't reach network when host adapter is on VLAN

Open
#12,537 8 comments 3 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

Microsoft Windows [Version 10.0.22621.4317]

### WSL Version

0.0.0.0 ??

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

5.10.16

### Distro Version

Debian

### Other Software

Nothing, fresh install

### Repro Steps

In Windows; specify a VLAN on the host NIC
In WSL:
ping the host IP (192.168.3.10 in my case); note that the ping responds
ping the gateway IP (192.168.3.1); note that there is no response

`Get-NetNatSession` shows an active NAT session, but the traffic appears to disappear at the NAT.

If I disable the VLAN on the host's NIC, it works.

### Expected Behavior

WSL NAT works when the host NIC has a VLAN set.

### Actual Behavior

Packets are lost at the NAT; perhaps the host adapter does not add the VLAN tag as it should to WSL traffic like it does to other windows traffic for some reason?

### Diagnostic Logs

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the WSL 2 networking failure with Debian while the Windows host NIC has a VLAN configured. Check whether the host IP remains reachable while the gateway at 192.168.3.1 is not, and inspect Get-NetNatSession as described. Done means WSL NAT can reach the gateway with the VLAN enabled; no source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.