microsoft / microsoft/WSL

Please support Docker macvlan

Open
#11,648 11 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature network
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

#11292
https://github.com/microsoft/WSL/issues/11292#issuecomment-2142728474

Same problem here, docker macvlan is not available on win11 WSL2. docker macvlan is available on win11 Hyper-V Ubuntu, two conditions are required: 1. mac address spoofing is turned on for the NIC in Hyper-V Ubuntu
![屏幕截图(413)zz](https://github.com/microsoft/WSL/assets/30049891/44861583-545e-4bcf-93af-fcb5c08b9513)
2. Enabled Promiscuous mode for Ubuntu.

The reason macvlan is not available for WSL2 is that mac address spoofing cannot be turned on for WSL2 (the option can be turned on for the NIC in Hyper-V, but there is no place to configure it for the NIC in WSL2)

This problem is actually very easy to solve, just make the WSL2's network interface enable mac address spoofing through the configuration file.
Such as
[wsl2]
memory=8G
[experimental]
networkingMode=bridged
_macspoofing=enabled_

This is log file
[WslLogs-2024-06-03_17-30-06.zip](https://github.com/user-attachments/files/15531786/WslLogs-2024-06-03_17-30-06.zip)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with linked issue #11292 and the attached WSL logs; no source file or test is named in this report. Investigate the WSL2 networking configuration path and how macvlan depends on MAC address spoofing and promiscuous mode. Done means Docker macvlan works on Windows 11 WSL2 when the requested configuration is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, ubuntu
Domain
networking, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.