linrob-2023 / Linrob_ROS_Bridge

0 stars 0 forks source link

WSL and Windows localhost Ethernet connection #2

Closed K-Zanaty closed 10 months ago

K-Zanaty commented 11 months ago

When installing WSL, connection in ethernet between WSL and Windows does not succeed (localhost).

Could be solved with separate laptop.

MilesOuirari commented 10 months ago

Issue Resolved: TCP Connection Between Windows Server and WSL Client

Problem: The Linux client in WSL was unable to establish a TCP connection with the server running on the same Windows machine.

Solution:

The solution involved using the specific IP address of the Ethernet Adapter for WSL (Hyper-V firewall), which was found to be 172.31.176.1. This IP is essential for communication between the Windows host and WSL.

The client application in WSL was updated to connect to this IP address, allowing it to communicate with the server on the Windows host.

Ethernet_wsl

Used ipconfig in the Windows command prompt to identify the IP address of the Ethernet Adapter for WSL. Configured the client in WSL to connect to 172.31.176.1, aligning with the server's network. Verified that the Windows firewall settings permitted incoming connections on the server's port. Outcome: By using the identified IP address, the client in WSL successfully established a connection with the server on the Windows host. This approach is particularly relevant for ensuring connectivity in a mixed environment involving WSL and Windows.