WSL2 Network Routes



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 (  On my local network, I have two distinct networks. and  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 network.


When I attempt to access anything within the WSL2 distro on the network communication fails.  I can access anything on the 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 network.  This is all I have on current routes. 

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

2 Replies

Hi @John Wildes , 

I have the same behavior since I updated to 2004, on my personal machine that did not have WSL previously installed, but I have another machine that does work and the difference is that I had previously installed the WSL before the 2004 update, I have done everything that I have found myself on the internet, put a dns, modify the nameserver, modify the ips and the routes but it still doesn't work for me, haven't you found any other solution?




@John Wildes I managed to repair the problem, first open the installed distribution (ubuntu, fedora, etc.), locate the vEthernet network card in the network connection, in the properties of the card in the IPv4 section, place in the DNS, see to the installed distribution and run the following command sudo nano /etc/resolv.conf edit the nameserver and put saves and run a sudo apt update and it should run without problem.