microsoft / microsoft/WSL

Feature req: Separate network subsystem per-distribution

Open
#10,154 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Lots of mentions of this, and related (i.e. being able to fix the address) but I could not find an actual feature req.

**Is your feature request related to a problem? Please describe.**
Currently all the WSL distribution images share the same networking subsystem as they share a single VM.
I am guessing with some sort of HyperVisor on the VM as otherwise they'd have to run the same Kernel? (Comment if you know more) but the upshot is that though there is more than one Kernel they share the same network 'hardware' (virtualised).

Example: Issue with port sharing:
- Network s/w can be unreliable: If you try and run the same service on two running distributions (e.g. for regression testing) with a fixed TCP/UDP then only one will work.

The current implementation means changing the network configuration on one distribution immediately changes the network configuration on all distributions.
That includes
- Adding interfaces
- Setting network protocol/address
- Altering routing table
- Expect Kernel PF too? (not tested that yet)

**Describe the solution you'd like**
As a minimum, In the same way that we can --mount when we start WSL, Could there be a --bind where the latter is defined in Hyper-V Manager or in the Network Adapter configuration dialog in Windows.

That way multiple running WSL have the choice of sharing a network configuration, as now, or at least being on a different NAT network even if they have the same address. Port forwarding in Windows would allow indiration.

A more complete solution would be a more conventional virtual ethernet adapter device. So it would just honor the more flexible and traditional /etc/network/interfaces. That woud add the benefit of being able to have more than one interface, e.g. for bonding or briding.

**Describe alternatives you've considered**
RealVM: VMWare, VirtualBox, Qubes, Xen, QEmu, HyperV?
Buy another PC, use Xen and configure Windows in a VM?

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

The issue names no repository files, tests, or entry points. Start by reviewing WSL’s shared networking behavior and the referenced Hyper-V Manager or Network Adapter configuration, then compare it with the requested --bind model and /etc/network/interfaces support. Done means defining and implementing an agreed per-distribution networking design with verified isolation and sharing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
networking, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.