IssueRaiser

[WSL 2] NIC Bridge mode 🖧 (Has TCP Workaround🔨)

# Issue WSL 2 seems to NAT it's virtual network, instead of making it bridged to the host NIC. My goal is for a service running in Ubuntu in WSL 2 to be accessible from anywhere on my local network. ## Issue Details * Your Windows build number: `Microsoft Windows [Version 10.0.18917.1000]` * What you're doing and what's happening: Running `ipconfig` on my Windows 10 host machine ``` IPv4 Address. . . . . . . . . . . : 192.168.1.41 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 ``` Running `ifconfig` in Ubuntu WSL 2 ``` eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.18.72.60 netmask 255.255.0.0 broadcast 172.18.255.255 ``` Accessing 172.18.72.60 from my Window host does work, however this IP is not accessible from another system on my network. * What's wrong / what should be happening instead: I would expect to `ifconfig` in Ubuntu WSL 2 to have an IP address in the same network as my host machine. * Searching the docs: The only detail I have found about WSL 2 networking is the following that notes that it will have it's own IP and that localhost is something that will be used for WSL 2 in the future. https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes This is fine, however I would like the IP WSL 2 is getting to be on my local LAN which means I need to configure the virtual NIC to be bridged. # Workaround See @edwindijas https://github.com/microsoft/WSL/issues/4150#is

Posted by jkasten2 on Jun 16, 2019, 1:35 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

ux (Network)

[WSL 2] NIC Bridge mode 🖧 (Has TCP Workaround🔨)

jkasten2Jun 16, 2019, 1:35 AM

# Issue WSL 2 seems to NAT it's virtual network, instead of making it bridged to the host NIC. My goal is for a service running in Ubuntu in WSL 2 to be accessible from anywhere on my local network. ## Issue Details * Your Windows build number: `Microsoft Windows [Version 10.0.18917.1000]` * What you're doing and what's happening: Running `ipconfig` on my Windows 10 host machine ``` IPv4 Address. . . . . . . . . . . : 192.168.1.41 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 ``` Running `ifconfig` in Ubuntu WSL 2 ``` eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.18.72.60 netmask 255.255.0.0 broadcast 172.18.255.255 ``` Accessing 172.18.72.60 from my Window host does work, however this IP is not accessible from another system on my network. * What's wrong / what should be happening instead: I would expect to `ifconfig` in Ubuntu WSL 2 to have an IP address in the same network as my host machine. * Searching the docs: The only detail I have found about WSL 2 networking is the following that notes that it will have it's own IP and that localhost is something that will be used for WSL 2 in the future. https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes This is fine, however I would like the IP WSL 2 is getting to be on my local LAN which means I need to configure the virtual NIC to be bridged. # Workaround See @edwindijas https://github.com/microsoft/WSL/issues/4150#is

Comments (0)

No comments yet. Start the discussion.

Comment on this issue