You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a series of questions/discussion items than an issue - some of which may well relate to Hyper-V and network namespaces, per #4304 - but a few things have occurred to me to ask after assorted fiddling done in the wake of my network issues ( #4342 ). The whole of the thing, really, is a request for a quick outline of how networking's implemented in WSL 2, but these are some specific questions I had:
How does the WSL 2 interface get its IP address? It's not configured statically Linux-side, and it doesn't appear to be using DHCP, so where does that come from?
Could it be made to use DHCP (which also I suppose is the "why doesn't it?" question? In my flailing around with [WSL 2] No network connectivity after upgrade to 18945 #4342 I observed that a DHCP client inside WSL 2 is perfectly capable of picking up an address, etc., if the WSL virtual switch is bridged to the external network, so it seemed a little odd that it wasn't)?
(I don't have a particular need for this ATM, but I note that in this brave new systemd world, mDNS support, et. al., is build into systemd-resolved rather than using avahi-daemon and can't be turned on except on interfaces configured by systemd-networkd, which so far as I can tell can either entirely ignore the WSL 2 eth0, or else can break it by not being able to get a DHCP IP. It can't set some settings and leave others alone.)
I'm curious as to the reasoning behind WSL 2 using a NATted network rather than just bridging to the existing external network; would appreciate any insight. Is it just as a step towards unifying the IP addresses with the Windows host?
Are there any current major barriers to IPv6 support? That's something that I couldn't get to come up even with a bridged network, which seemed curious, as I have seen it work in Hyper-V VMs before now.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
The network uses some kind of DHCP. First the Windows/Hyper-V side NIC is created with a random IPv4 address and configuration (subnet, guest IPv4, DNS, gateway). WSL side IP address is automatically added in that configuration. If WSL (aka. guest/container) is terminated the Windows side NIC remains but WSL side IPv4 address is automatically picked up from previous subnet. More network information can be found in LxssManager.dll and computenetwork.dll.
This is more of a series of questions/discussion items than an issue - some of which may well relate to Hyper-V and network namespaces, per #4304 - but a few things have occurred to me to ask after assorted fiddling done in the wake of my network issues ( #4342 ). The whole of the thing, really, is a request for a quick outline of how networking's implemented in WSL 2, but these are some specific questions I had:
(I don't have a particular need for this ATM, but I note that in this brave new systemd world, mDNS support, et. al., is build into systemd-resolved rather than using avahi-daemon and can't be turned on except on interfaces configured by systemd-networkd, which so far as I can tell can either entirely ignore the WSL 2 eth0, or else can break it by not being able to get a DHCP IP. It can't set some settings and leave others alone.)
Thanks in advance.
The text was updated successfully, but these errors were encountered: