WSL2 share IP address with host
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
Is your feature request related to a problem? Please describe.
In WSL 1 the IP addresses of the host and the distro were shared, meaning that both the Windows host and the Ubuntu could bind TCP sockets on the same IP using different ports.
This allowed us developers to start some http servers on the WSL distro but others on the Windows host and they'd share they'd be bound to the same IP.
This is not possible in WSL 2 today.
Instead, what we end up is WSL distro with its own IP. The Windows host cannot bind sockets to it. And vice-versa - the Ubuntu cannot bind sockets on the Windows host IP.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue describes sharing the host and WSL2 distro IP addresses so both can bind TCP sockets on different ports. No files, tests, or entry points are named; start by locating the WSL2 networking implementation and its existing host/distro socket tests. Done means the requested shared-IP behavior works for both Windows and Ubuntu without regressing current networking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- networking, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100