-
Notifications
You must be signed in to change notification settings - Fork 23
Static IP for 2 different wsl2 distros on same pc #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I haven't tested with them running at the same time, it should work, just set one IP in one OS, other IP in other OS. You should NOT use static MAC in that case (I think) as it would likely confuse networking stacks. So let the WSL handle mac, and you handle the IPs. |
Hey thanks for that. But that is my issue. I do not know how to set it. Do you have any idea how to do that? |
Sure, here's the general idea. Note that "global" settings (eg. Hyper-V vSwitch, and options inside wslconfig) apply to all VMs / distros / instances. So when setting 2nd one, you don't actually need to set anything, because you've already done it when setting 1st one. Both will use same vSwitch and same wslconfig settings. Hope that helped! P.S. IP s above are just an example, make sure to adjust them to your real network |
Here a detailed working procedure on how to use WSLAttachSwitch Script : microsoft/WSL#4799 (comment) Text : microsoft/WSL#4799 (comment) |
Hey there,
Thanks so much for your guide! Has helped me immensely. I'm wondering if there would be an easy solution to set static IP for 2x wsl2 Linux on the same pc?
Cheers!
The text was updated successfully, but these errors were encountered: