So each windows machine creates a local virtual network for all the WSL2 instances running on that particular machine, who's addresses run from 172.16.0.0 to 172.31.255.255
Just like the two windows machines are on your own private network who's addresses run from 192.168.0.0 to 192.168.255.255
https://en.wikipedia.org/wiki/Reserved_IP_addresses
The addresses of interest are these.
talker-linux - 172.21.143.234
talker-win32 - 192.168.1.16
talker-bridge - 172.21.128.1
listener-linux - 172.20.72.249
listener-win32 - 192.168.1.11
listener-bridge - 172.20.64.1
|
Running wireshark (from
https://www.wireshark.org/ ) on both Windows machines will tell you how far messages are getting from talker to listener.
The first goal is to make sure each WSL2 instance can ping it's peer on the other host.
talker:
ping 172.20.72.249
listener:
ping 172.21.143.234
My guess would be that the routing tables are only set up to allow a WSL2 instance to talk to it's host and the outside world.
https://ss64.com/nt/route.html
https://ss64.com/nt/netstat.html (netstat -rn in particular)
So you would need to tell the various machines (two windows machines, and two WSL2 instances) how to route messages from one 172.x.y.z network to another 172.a.b.c network.
Are the 172 addresses the same every time you run a WSL2 instance on a given host, or the same following each reboot of a host? Or are they randomly assigned every time?
If it's all dynamic, there's going to be a lot of fiddling each time you restart.
Running two WSL2 instances on the same machine would be a lot easier, because both instances would be on the same 172 subnet.