-
Hi, We are using Rancher desktop with WSL2. Each time we open the Rancher desktop or after restarting computer , the WSL machine behind Rancher Desktop takes random IP's. This conflicts sometimes with other subnets in my LAN creating "no route to host" conflict when trying to connect from WSL guest to one of those other subnets. I need to be able to set more specific /20 block for WSL2 so that the conflict never occurs any longer. The only workaround I found was to reboot the host computer, so that WSL network is randomly re-assigned from a different block that does not conflict with my other subnets. I was not able to find any way to modify the settings of vEthernet (WSL) adapter or in Rancher Desktop. While this adapter is enumerated by ipconfig, it does not show up in Control Panel / Settings. Is there a way to set the vEthernet (WSL) subnet to a specific block range? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @buaydin, wsl2 version 1.2.5 and later supports the registry entries in the link below. After updating WSL with the command "wsl --update" or "wsl --update --web-download" (you can check the version with the command "wsl --version"), you can apply the solution in the following link: #9580 (reply in thread). Note: After updating the registry, you can restart Windows for the WSL network adapter to be recreated. |
Beta Was this translation helpful? Give feedback.
Hello @buaydin,
wsl2 version 1.2.5 and later supports the registry entries in the link below. After updating WSL with the command "wsl --update" or "wsl --update --web-download" (you can check the version with the command "wsl --version"), you can apply the solution in the following link: #9580 (reply in thread).
Note: After updating the registry, you can restart Windows for the WSL network adapter to be recreated.
Note2: In some cases, you may encounter an error saying that the network could not be updated when the WSL distribution is starting up. Reapplying the registry entry and restarting Windows will fix the issue.