WSL2 Network Routes

%3CLINGO-SUB%20id%3D%22lingo-sub-1402469%22%20slang%3D%22en-US%22%3EWSL2%20Network%20Routes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1402469%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%3C%2FP%3E%3CP%3EI've%20upgraded%20to%202004%2C%20and%20upgraded%20my%20WSL%20installations%20to%20WSL2.%26nbsp%3B%20Under%20WSL1%20the%20linux%20distros%20shared%20the%20local%20PC%20nic.%26nbsp%3B%20Under%20WSL2%20they%20have%20their%20own%20nic%2C%20and%20IP%20address%20behind%20an%20internal%20switch%20(%3C!--%20StartFragment%20%20--%3E%3CSPAN%3E172.25.168.87%3C%2FSPAN%3E%3C!--%20EndFragment%20%20--%3E).%26nbsp%3B%20On%20my%20local%20network%2C%20I%20have%20two%20distinct%20networks.%20192.168.1.0%2F24%20and%20172.16.0.0%2F24.%26nbsp%3B%20I%20have%20a%20virtual%20machine%20acting%20as%20a%20router%20between%20them%2C%20and%20a%20static%20route%20on%20the%20local%20pc%20that%20directs%20traffic%20to%20the%20router%20for%20the%20172.16.0.0%2F24%20network.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20attempt%20to%20access%20anything%20within%20the%20WSL2%20distro%20on%20the%20172.16.0.0%2F24%20network%20communication%20fails.%26nbsp%3B%20I%20can%20access%20anything%20on%20the%20192.168.1.0%2F24%20network%20because%20that's%20local%20to%20the%20PC%2C%20even%20though%20the%20WSL%20distro%20is%20behind%20another%20switch.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20route%20would%20I%20add%20within%20the%20WSL2%20Distro%20to%20access%20the%20172.16.0.0%2F24%20network.%26nbsp%3B%20This%20is%20all%20I%20have%20on%20current%20routes.%26nbsp%3B%3CBR%20%2F%3E%3C!--%20StartFragment%20%20--%3E%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eip%20route%20show%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Edefault%20via%20172.25.160.1%20dev%20eth0%3CBR%20%2F%3E172.25.160.0%2F20%20dev%20eth0%20proto%20kernel%20scope%20link%20src%20172.25.168.87%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eroute%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3E%3C!--%20StartFragment%20%20--%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CDIV%3E%3CSPAN%3EKernel%20IP%20routing%20table%3CBR%20%2F%3EDestination%20Gateway%20Genmask%20Flags%20Metric%20Ref%20Use%20Iface%3CBR%20%2F%3Edefault%20ENTDESKTOP%200.0.0.0%20UG%200%200%200%20eth0%3CBR%20%2F%3E172.25.160.0%200.0.0.0%20255.255.240.0%20U%200%200%200%20eth0%3C%2FSPAN%3E%3C%2FDIV%3E%3CSPAN%3E%3C!--%20EndFragment%20%20--%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EThanks%20for%20the%20help.%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%3C!--%20EndFragment%20%20--%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hello!

I've upgraded to 2004, and upgraded my WSL installations to WSL2.  Under WSL1 the linux distros shared the local PC nic.  Under WSL2 they have their own nic, and IP address behind an internal switch (172.25.168.87).  On my local network, I have two distinct networks. 192.168.1.0/24 and 172.16.0.0/24.  I have a virtual machine acting as a router between them, and a static route on the local pc that directs traffic to the router for the 172.16.0.0/24 network.

 

When I attempt to access anything within the WSL2 distro on the 172.16.0.0/24 network communication fails.  I can access anything on the 192.168.1.0/24 network because that's local to the PC, even though the WSL distro is behind another switch.  

 

What route would I add within the WSL2 Distro to access the 172.16.0.0/24 network.  This is all I have on current routes. 

 
ip route show
default via 172.25.160.1 dev eth0
172.25.160.0/20 dev eth0 proto kernel scope link src 172.25.168.87
 
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default ENTDESKTOP 0.0.0.0 UG 0 0 0 eth0
172.25.160.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0
 
 
Thanks for the help.