-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
Allow Specification of IP or Interface to bind to #985
Comments
That's an interesting use case. I will consider it. But I am not sure whether you are right. However, I think you can already accomplish what you suggest by running |
@dorssel I am not entirely sure how WSL is told to initate the connection to windows hosts. What I have noticed is when it connectes and a interface with the default route is available it uses that. Another issue maybe that I am using bridged networking but IIRC it still tries to connect to the host IP when soley using internal. From what I'm seeing if there was a way to specify the IP WSL uses to "reach the host", that woud solve it. Could you give me an example of your statement?
Do you mean like this fom within WSL?:
Here is a snippet of output that lead me to the conclusion:
^ Problem being the IP it decided to use is ephemeral Now if I disable all active external interfaces it will utilize my "stable" interface:
Running it with the Thank you again; I am just trying to be incredibly clear here. Hopefully this describes things better. |
When you use In any case, once the matching address has been determined ( Now I understand that you added (besides the automatic WSL internal switch) a second interface common to the host and to WSL. And that it sometimes selects one, sometimes the other. That is correct, as it will simply use the first interface that it finds with a matching WSL/host IP address combination within the same subnet. I could add an |
hey i think i am having a similar issue... i have WSL configured using bridged mode via a hyper-v virtual switch so that the WSL instance is routable with a static IP on my local network, and -no other network interfaces active-.
|
@ryankurte |
usbipd: info: Using WSL distribution 'Ubuntu-22.04' to attach; the device will be available in all WSL 2 distributions. Can confirm it does not work with WSL in bridged mode |
When WSL is running, what is the output of |
I noticed when trying to utilize my USB WIFI adapter that it would disconnect from WSL when my active connection dropped. I quickly realized this is because usbipd binds to the IP of my host active interface and when it's IP evaporates so does the USB over IP connection from host to WSL. I've found a way around the issue by creating a virtual interface with static IP available to the host and WSL.. I can get usbipd to use that interface if all other connections are off when WSL initially starts and I attach the USB device. It even stays after turning my internal WIFI off/on from that point forward. If we could specify the IP or interface that usbip daemon binds to at startup it would definetly be a way more robust solution than having to fiddle with connections before starting anything. For a lil context I'm using the usb adapter on a laptop and not a stationary device with a stable connection.
Thank you for usbipd and any consideration in this matter!
The text was updated successfully, but these errors were encountered: